[Pkg-ltsp-devel] Bug#874775: Bug#874775: ltsp: Use of /var/lib/apt/lists internals

Julian Andres Klode jak at debian.org
Sat Sep 9 15:03:33 UTC 2017


On Sat, Sep 09, 2017 at 04:57:19PM +0200, Petter Reinholdtsen wrote:
> [Julian Andres Klode]
> > Instead of relying on internals, please use the interfaces provided by
> > APT 1.1 and newer:
> 
> Very good.  As you might have seen from the URL you sent, LTSP copies
> the package lists into its chroot to avoid having to download the same
> set of files again in the chroot.  What is the recommended way to do
> this using the API interfaces?  Is there a way to "inject" package
> lists, or should the script get the paths inside and outside the chroot
> before copying between the paths?

I'm not entirely sure why you just copy Packages files, but you could
just do the query for Packages with indextargets and copy them over into
$ROOT.

for file in $(apt-get indextargets --format '$(FILENAME)' "Created-By: Packages"); do
	mkdir -p $ROOT/"$(dirname "$file")"
	cp "$file" "$ROOT/$file"
done

(grr, quoting)

But I guess you also have to copy Release files, I don't see how that
works well with APT currently. But we don't store Release files
compressed, so it's sort of OK. Why not just copy everything?

-- 
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.



More information about the Pkg-ltsp-devel mailing list