You are not logged in.

#1 2015-08-03 08:28:13

jamespharvey20
Member
Registered: 2015-06-09
Posts: 129

devtools doesn't find pre-made dep in local repo, unless also in cache

I have a local repository at /persistent/arch/localRepo/.  It is in both /etc/pacman.conf and /usr/share/devtools/pacman-extra.conf.

I often execute extra-x86_64-build in a directory with an AUR PKGBUILD, that depends on another AUR package.  And, it will give me an error like:

Packages (5) elfutils-0.163-1  licenses-20140629-1  pyalpm-git-0.6.2.r3.g3c4692b-1  python-3.4.3-2
             python-pyelftools-0.23-1

Total Download Size:   15.50 MiB
Total Installed Size:  93.56 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages ...
 licenses-20140629-1-any               62.0 KiB   940K/s 00:00 [##################################] 100%
 python-3.4.3-2-x86_64                 14.6 MiB  10.2M/s 00:01 [##################################] 100%
 elfutils-0.163-1-x86_64              695.9 KiB  11.9M/s 00:00 [##################################] 100%
 python-pyelftools-0.23-1-any         139.7 KiB  13.6M/s 00:00 [##################################] 100%
error: failed retrieving file 'pyalpm-git-0.6.2.r3.g3c4692b-1-x86_64.pkg.tar.xz' from disk : Couldn't open file /persistent/arch/localRepo/pyalpm-git-0.6.2.r3.g3c4692b-1-x86_64.pkg.tar.xz
warning: failed to retrieve some files
error: failed to commit transaction (download library error)
Errors occurred, no packages were upgraded.

BUT:

$ ls -la /persistent/arch/localRepo/pyalpm-git-0.6.2.r3.g3c4692b-1-x86_64.pkg.tar.xz
-rw-r--r-- 1 jamespharvey20 jamespharvey20 43384 Aug  3 08:06 /persistent/arch/localRepo/pyalpm-git-0.6.2.r3.g3c4692b-1-x86_64.pkg.tar.xz

extra-x86_64-build happily finds it if I install then immediately remove the dependent AUR package, by:

pacman -Sy pyalpm-git
pacman -Rcns pyalpm-git

I think by doing this the only thing that has changed is the package was copied into /var/cache/pacman/pkg/.  (In fact, manually copying it into the cache rather than installing/removing has the same effect of making it find it.)

The entire time, the AUR .pkg.tar.xz was already in the localRepo.db.tar.gz.

devtools bug?  pacman bug?  User error?

How can I have the devtools scripts find and use packages made by previous devtools instances, without installing them outside of devtools?  I love having a minimal install, minimal explicitly installed packages, not having makedepends packages installed globally, and keep forgetting to run my install/remove workaround, getting failures a ways into devtools scripts...

Last edited by jamespharvey20 (2015-08-03 08:30:59)

Offline

#2 2015-08-03 22:19:58

jamespharvey20
Member
Registered: 2015-06-09
Posts: 129

Re: devtools doesn't find pre-made dep in local repo, unless also in cache

Dug into this.  Filed https://bugs.archlinux.org/task/45882

The "Couldn't open file" errors come just after the chroot is entered, and arch-nspawn doesn't bind mount the top-level system's local repositories to be within the chroot.

Offline

Board footer

Powered by FluxBB