I ran into a situation where a failure to download a binary package terminated my build script. In that situation, i would prefer to see portage fallback to building locally. Local copy of remote index is up-to-date and will be used. These are the packages that would be merged, in order: Calculating dependencies... done! [binary N ] app-misc/screen-4.8.0-r3-2::gentoo USE="pam -debug -multiuser -nethack (-selinux)" 697 KiB Total: 1 package (1 new, 1 binary), Size of downloads: 697 KiB >>> Emerging binary (1 of 1) app-misc/screen-4.8.0-r3::gentoo Warning: distcc requested but no masquerade dir can be found in /usr/lib*/distcc/bin --2022-01-20 17:28:16-- https://packages.genpi64.com/app-misc/screen/screen-4.8.0-r3-2.xpak Resolving packages.genpi64.com... 2604:a880:1:20::20:d001, 45.55.3.11 Connecting to packages.genpi64.com|2604:a880:1:20::20:d001|:443... connected. HTTP request sent, awaiting response... 404 Not Found 2022-01-20 17:28:17 ERROR 404: Not Found.
How are you calling emerge, what options are you passing? -A
The flags to emerge would have been something like: -v1bg --update --deep --newuse --jobs --tree --autounmask-backtrack=y --backtrack=3000 --binpkg-respect-use=y --binpkg-changed-deps=y --changed-slot=y The script has a bunch of different steps, and to be honest I'm not entirely sure which step is pulling in the "screen" package, but the steps all have the same flags, plus or minus a few for special situations.
--getbinpkg [ y | n ], -g Using the server and location defined in PORTAGE_BINHOST (see make.conf(5)), portage will download the information from each binary package found and it will use that information to help build the dependency list. This option implies -k. (Use -gK for binary-only merging.) --getbinpkgonly [ y | n ], -G This option is identical to -g, as above, except binaries from the remote server are preferred over local packages if they are not identical. I would've thought that with --getbinpkg, things would work fine..
Ah, right. That's why the question about options. Yes, the build doesn't use binpkgsonly. We use binpkgs when available, otherwise we fallback to building locally. The project is a cross-compiler for raspberrypis that produces a gentoo system that can be DD'ed onto an SD card with a default password to log into it. When Gentoo updates a package, we wouldn't have a binpkg for it on our binpkg host, so our build script builds it locally, and sticks the resulting binpkg in the pkghost. Subsequent builds will just download the previously built binpkg, unless there's a problem -- in this case, i was running the build script while the pkghost was undergoing maintanence. Which killed my build, even though i would have been perfectly happy to see portage fallback to building from source