summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:53:45 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:53:45 +0000
commit04f232fc729cabe3739fad8f107bb7bef674542b (patch)
treeea9a429d89d188e3a94d0e829d751bd6182ac48c /apt-pkg
parentdedbcda027c7c1a0e41b788d12d3428a64fe4520 (diff)
Fixed parsing of source: lines
Author: jgg Date: 1999-05-18 05:28:03 GMT Fixed parsing of source: lines
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/deb/debrecords.cc10
1 files changed, 7 insertions, 3 deletions
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);
}
/*}}}*/