[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#722549: apt-get source with more than one argument fails



On Thu, Sep 12, 2013 at 10:28:20AM +0200, Damien Wyart wrote:
> Package: apt
> Version: 0.9.11.3
> Severity: normal

Thanks for your bugreport.
 
> Starting with version 0.9.11, I can't use apt-get source with several
> package names :
> 
> $ apt-get source perl coreutils
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> NOTICE: 'perl' packaging is maintained in the 'Git' version control system at:
> git://anonscm.debian.org/perl/perl.git -b debian-5.18
> E: Unable to find a source package for coreutils
> 
> As a workaround, I can do
> $ for p in perl coreutils; do apt-get source $p; done
> 
> So this is not so annoying, but might be irritating.

This is a regression from the previous versions. It seems to be
releated to the recent changes in the pkgTagFile code, I haven't
looked further yet, but it seems like the attached patch fixes the
issue.

Cheers,
 Michael
=== modified file 'apt-pkg/deb/debsrcrecords.h'
--- apt-pkg/deb/debsrcrecords.h	2012-04-16 17:24:07 +0000
+++ apt-pkg/deb/debsrcrecords.h	2013-09-12 20:10:53 +0000
@@ -50,8 +50,8 @@
    virtual bool Files(std::vector<pkgSrcRecords::File> &F);
 
    debSrcRecordParser(std::string const &File,pkgIndexFile const *Index) 
-      : Parser(Index), Fd(File,FileFd::ReadOnly, FileFd::Extension), Tags(&Fd,102400), 
-        Buffer(NULL) {}
+      : Parser(Index), Fd(File,FileFd::ReadOnly, FileFd::Extension), 
+        Tags(&Fd, Fd.Size()), Buffer(NULL) {}
    virtual ~debSrcRecordParser();
 };
 


Reply to: