From: Arch Librarian Date: Mon, 20 Sep 2004 16:53:45 +0000 (+0000) Subject: Fixed parsing of source: lines X-Git-Tag: 0.7.24ubuntu1~1362 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/04f232fc729cabe3739fad8f107bb7bef674542b?ds=inline Fixed parsing of source: lines Author: jgg Date: 1999-05-18 05:28:03 GMT Fixed parsing of source: lines --- diff --git a/apt-pkg/deb/debrecords.cc b/apt-pkg/deb/debrecords.cc index f86287b11..49e3d02c8 100644 --- a/apt-pkg/deb/debrecords.cc +++ b/apt-pkg/deb/debrecords.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: debrecords.cc,v 1.7 1999/04/07 05:30:18 jgg Exp $ +// $Id: debrecords.cc,v 1.8 1999/05/18 05:28:03 jgg Exp $ /* ###################################################################### Debian Package Records - Parser for debian package records @@ -75,11 +75,15 @@ string debRecordParser::LongDesc() return Section.FindS("Description"); } /*}}}*/ -// debRecordParser::SourcePkg - Return the source package name if any /*{{{*/ +// RecordParser::SourcePkg - Return the source package name if any /*{{{*/ // --------------------------------------------------------------------- /* */ string debRecordParser::SourcePkg() { - return Section.FindS("Source"); + string Res = Section.FindS("Source"); + string::size_type Pos = Res.find(' '); + if (Pos == string::npos) + return Res; + return string(Res,0,Pos); } /*}}}*/ diff --git a/debian/changelog b/debian/changelog index fa9f6b44e..69014fa2b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,7 @@ apt (0.3.6.1) unstable; urgency=low * Fixed handling of the -q option with not-entirely integer arguments Closes: #37499 * Man page typo Closes: #37762 + * Fixed parsing of the Source: line. Closes: #37679 -- Jason Gunthorpe Wed, 12 May 1999 09:18:49 -0700