Your message dated Sat, 9 Sep 2017 19:34:42 +0200
with message-id <20170909193414.ga11...@debian.org>
and subject line Re: Bug#874779: ratt: Use of /var/lib/apt/lists internals
has caused the Debian Bug report #874779,
regarding ratt: Use of /var/lib/apt/lists internals
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
874779: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=874779
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: ratt
Severity: important
User: de...@lists.debian.org
Usertags: apt-internals

Dear Maintainer of ratt,

your package appears to be relying on the internal layout of /var/lib/apt/lists
and the location of that directory (which is configurable), as it matches the
following regular expression (and a quick check did not rule out a false 
positive):

    /var/lib/apt/lists/.*(Packages|Sources)

For the matches found, you can have a quick look at:

    
https://codesearch.debian.net/search?q=%2Fvar%2Flib%2Fapt%2Flists%2F.*%28Packages%7CSources%29+package%3Aratt

APT since some time supports compressed indices using the option
`Acquire::gzipIndexes`. Starting with 1.2, index files are stored
with lz4 compression if that option is enabled, providing significant
space savings at low overhead.

Some platforms and users might already have these indexes compressed by default
in order to save space, and your package might not be working for them.

Instead of relying on internals, please use the interfaces provided by
APT 1.1 and newer:

## Command-line interfaces
In order to get paths to index files, please use:

    apt-get indextargets --format '$(FILENAME)' "Created-By: $creator"

where `$creator` is `Packages`, `Sources`, `Contents-deb`, `Contents-udeb`,
or `Contents-deb-legacy`, depending on which files you need.

To read the file, use

    /usr/lib/apt/apt-helper cat-file <FILE>...

This transparently handles compression supported by apt.

## C++ interface
When reading files in C++, you might want to use APT's FileFd class. It
provides the same transparent compression support as `apt-helper cat-file`
(if turned on).

--- End Message ---
--- Begin Message ---
On Sun, Sep 10, 2017 at 01:31:12AM +0800, Shengjing Zhu wrote:
> > your package appears to be relying on the internal layout of 
> > /var/lib/apt/lists
> > and the location of that directory (which is configurable), as it matches 
> > the
> > following regular expression (and a quick check did not rule out a false 
> > positive):
> >
> >     /var/lib/apt/lists/.*(Packages|Sources)
> >
> > For the matches found, you can have a quick look at:
> >
> >     
> > https://codesearch.debian.net/search?q=%2Fvar%2Flib%2Fapt%2Flists%2F.*%28Packages%7CSources%29+package%3Aratt
> >
> 
> These codes are in an `else` branch, which means ratt tries `apt-get
> indextargets` first and then fallbacks to /var/lib/apt/lists/.
> See 
> https://github.com/Debian/ratt/blob/b3977a68b0bc0767f23ea5695aaff7ddb0275af9/ratt.go#L250

Oh sorry, closing then.

-- 
Debian Developer - deb.li/jak | jak-linux.org - free software dev
                  |  Ubuntu Core Developer |
When replying, only quote what is necessary, and write each reply
directly below the part(s) it pertains to ('inline').  Thank you.

--- End Message ---
_______________________________________________
Pkg-go-maintainers mailing list
Pkg-go-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-go-maintainers

Reply via email to