Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 831657 - Feature request: Offer flag for "If a problem occurs with binpkg, build locally"
Summary: Feature request: Offer flag for "If a problem occurs with binpkg, build locally"
Status: UNCONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Binary packages support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-20 23:37 UTC by Michael Jones
Modified: 2023-08-24 20:36 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Jones 2022-01-20 23:37:42 UTC
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.
Comment 1 Alec Warner (RETIRED) archtester gentoo-dev Security 2022-01-21 00:41:03 UTC
How are you calling emerge, what options are you passing?

-A
Comment 2 Michael Jones 2022-01-25 16:56:02 UTC
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.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-25 16:58:24 UTC
       --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..
Comment 4 Michael Jones 2022-01-25 17:03:13 UTC
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