Bug#783137: share parsing of sources.list files

2015-08-27 Thread Niels Thykier
Control: tags -1 wontfix

Hi,

Thanks for your interest in this.

On 2015-05-23 19:19, Damyan Ivanov wrote:
> Control: user debian-p...@lists.debian.org
> Control: usertag -1 bcn2015
> 
> -=| Niko Tyni, 22.04.2015 22:22:49 +0300 |=-
>> Package: dh-make-perl, apt-file
>> Severity: wishlist
>>
>> It looks like both apt-file and Debian::AptContents::get_contents_files()
>> in dh-make-perl parse /etc/apt/sources.list type files and try to
>> determine a path to Contents files from that. It would be nice if they
>> could share this code, perhaps by moving it into a separate module
>> shipped with apt-file that dh-make-perl could use.
> 
> [...]

With the new release of apt, I will migrate apt-file to make apt
download the Contents files for it.  Among other things, it means that
apt-file will *not* be parsing the sources.list file.

Locating the Contents will should thereafter be a matter of using
"apt-get indextargets" with some options.  I plan to make apt-file scan
any "^Created-By: Contents.*$" files by default (if you want to emulate
apt-file's behaviour in that regard in dh-make-perl).

Thanks,
~Niels






signature.asc
Description: OpenPGP digital signature


Bug#783137: share parsing of sources.list files

2015-05-23 Thread Damyan Ivanov
Control: user debian-p...@lists.debian.org
Control: usertag -1 bcn2015

-=| Niko Tyni, 22.04.2015 22:22:49 +0300 |=-
> Package: dh-make-perl, apt-file
> Severity: wishlist
> 
> It looks like both apt-file and Debian::AptContents::get_contents_files()
> in dh-make-perl parse /etc/apt/sources.list type files and try to
> determine a path to Contents files from that. It would be nice if they
> could share this code, perhaps by moving it into a separate module
> shipped with apt-file that dh-make-perl could use.

FTR, I tried moving the parse_sources_list() routine into a separate 
module (Apt::Parse::Sources), but it seems to use too much from 
apt-file's machinery - $Conf, debug(), error(), warningx(). Not that 
it isn't possible to re-implement that or hack something, but it 
started to feel uncomfortable messing with apt-file internals.

Sorry, no good news :/

> (This was prompted by #783110 FWIW.)
> 
> As for actually parsing the sources.list files, libapt-pkg-perl does
> some of that too but unfortunately there doesn't seem to be any interface
> for getting details about the source repositories...


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#783137: share parsing of sources.list files

2015-04-22 Thread Niko Tyni
Package: dh-make-perl, apt-file
Severity: wishlist

It looks like both apt-file and Debian::AptContents::get_contents_files()
in dh-make-perl parse /etc/apt/sources.list type files and try to
determine a path to Contents files from that. It would be nice if they
could share this code, perhaps by moving it into a separate module
shipped with apt-file that dh-make-perl could use.

(This was prompted by #783110 FWIW.)

As for actually parsing the sources.list files, libapt-pkg-perl does
some of that too but unfortunately there doesn't seem to be any interface
for getting details about the source repositories...
-- 
Niko Tyni   nt...@debian.org


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org