Re: Could/should you set Dir::Cache::{pkgcache, srcpkgcache} = ""; if all you are doing is locally downloading dependencies of an installation package?
On Sat 02 Dec 2023 at 02:10:48 (+0000), Albretch Mueller wrote:
> On 11/30/23, David Wright <deblis@lionunicorn.co.uk> wrote:
> > On Thu 30 Nov 2023 at 21:05:38 (+0000), Albretch Mueller wrote:
> >> I also notice repeated copies of {src-, pkgcache}.bin files for each
> >> downloaded package even though I am downloading them to specific
> >> subdirectories in order to then install them using dpkg.
> >> Do you really need those binaries and cache instructions if you are
> >> just downloading the installation dependencies? How do you remove,
> >> disregard those kinds of caching strategies in a graceful way?
> >
> > Perhaps you could elaborate on the commands you're running.
>
> I am using apt-rdepends --follow=Depends <deb package>
>
> to download all dependencies into a subdirectory for each package
> then I notice the same files: srcpkgcache.bin et pkgcache.bin in every
> subdirectory.
Obviously I'm trying to replicate what you do. In case it matters,
my bullseye system has package acl installed, but not acl2. (Despite
their names, they're unrelated.)
$ mkdir temp/rdepends ; cd $_
~/temp/rdepends$ apt-rdepends --follow=Depends acl
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
acl
Depends: libacl1 (= 2.2.53-10)
Depends: libc6 (>= 2.14)
libacl1
Depends: libc6 (>= 2.14)
libc6
Depends: libcrypt1
Depends: libgcc-s1
libcrypt1
Depends: libc6 (>= 2.25)
libgcc-s1
Depends: gcc-10-base (= 10.2.1-6)
Depends: libc6 (>= 2.14)
gcc-10-base
~/temp/rdepends$ apt-rdepends --follow=Depends acl2
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
acl2
Depends: libc6 (>= 2.29)
Depends: libgmp10
Depends: libreadline8 (>= 6.0)
Depends: libx11-6
libc6
Depends: libcrypt1
Depends: libgcc-s1
libcrypt1
Depends: libc6 (>= 2.25)
libgcc-s1
Depends: gcc-10-base (= 10.2.1-6)
Depends: libc6 (>= 2.14)
gcc-10-base
libgmp10
Depends: libc6 (>= 2.14)
libreadline8
Depends: libc6 (>= 2.15)
Depends: libtinfo6 (>= 6)
Depends: readline-common
libtinfo6
Depends: libc6 (>= 2.16)
readline-common
Depends: dpkg (>= 1.15.4)
Depends: install-info
dpkg
Depends: tar (>= 1.28-1)
PreDepends: libbz2-1.0
PreDepends: libc6 (>= 2.15)
PreDepends: liblzma5 (>= 5.2.2)
PreDepends: libselinux1 (>= 3.1~)
PreDepends: zlib1g (>= 1:1.1.4)
tar
PreDepends: libacl1 (>= 2.2.23)
PreDepends: libc6 (>= 2.28)
PreDepends: libselinux1 (>= 3.1~)
install-info
Depends: libc6 (>= 2.14)
PreDepends: dpkg (>= 1.16.1)
libx11-6
Depends: libc6 (>= 2.26)
Depends: libx11-data
Depends: libxcb1 (>= 1.11.1)
libx11-data
libxcb1
Depends: libc6 (>= 2.14)
Depends: libxau6 (>= 1:1.0.9)
Depends: libxdmcp6
libxau6
Depends: libc6 (>= 2.4)
libxdmcp6
Depends: libbsd0 (>= 0.2.0)
Depends: libc6 (>= 2.4)
libbsd0
Depends: libc6 (>= 2.25)
Depends: libmd0 (>= 1.0.3-2)
libmd0
Depends: libc6 (>= 2.14)
~/temp/rdepends$ ls -l
total 0
~/temp/rdepends$ ls -lR /var/cache/apt
/var/cache/apt:
total 69352
drwxr-xr-x 3 root root 57344 Dec 1 19:46 archives
-rw-r--r-- 1 root root 35492253 Dec 1 21:00 pkgcache.bin
-rw-r--r-- 1 root root 35451043 Dec 1 21:00 srcpkgcache.bin
/var/cache/apt/archives:
total 4
-rw-r----- 1 root root 0 Apr 16 2022 lock
drwx------ 2 _apt root 4096 Dec 1 15:00 partial
ls: cannot open directory '/var/cache/apt/archives/partial': Permission denied
~/temp/rdepends$
/var/cache/apt/archives/partial was used at 3pm when libnghttp2-14
was downloaded. The {src,}pkgcache.bin files were created when the
9pm update took place. I see no extra .bin files.
Presumably you're running more commands than you revealed above?
Cheers,
David.
Reply to: