Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 139979 - new emerge option to only use binary packages matching system config (USE, CHOST)
Summary: new emerge option to only use binary packages matching system config (USE, CH...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-11 03:51 UTC by mario
Modified: 2009-10-31 21:12 UTC (History)
2 users (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 mario 2006-07-11 03:51:40 UTC
Hello :)

when you compile a binary package on your desktop pc with X support and use the same binary package (to save time) for your server, you'll get a package with X dependancie on the server which is probably not what you want.

Is it possible to save the CFLAGS, USEFLAGS, Arch Settings in the tbz2 file as well?

That way the server could compare his useflag/cflag/arch settings to those in the package file and do fresh source compile if it differs.

emerge -k could compile from source
emerge -K could use the binary package anyways

(or use a new flag, so nobody gets confused)
Comment 1 Zac Medico gentoo-dev 2006-07-11 10:18:53 UTC
Actually, all then necessary information is stored in the binary package and portage will skip binary packages and build from source when the USE flags don't match if emerge's --newuse option is specified.  It does not check the CFLAGS, though it would be possible.  The --newuse thing isn't even documented, so I think we should at least do that.
Comment 2 mario 2006-07-11 13:00:56 UTC
Oh, ich looked through the tbz2 file, but could not find any informations about use/arch settings. Only the program files.

But there was an error message about garbled data, maybe it's in there :)
Comment 3 Leonid Evdokimov 2008-02-21 17:02:36 UTC
Is there some easy way to extract the information stored in the binary package?

I looked through binary package with hexdump, but I've not found USE-flags.
Comment 4 Zac Medico gentoo-dev 2008-02-23 01:31:49 UTC
The USE flags and other metadata are stored in an xpak segment that's appended to the end of the tbz2 file. Something like this will extract the metadata from $filename to $tempdir:

python -c "import xpak; xpak.tbz2('${filename}').unpackinfo('${tempdir}')"
Comment 5 Zac Medico gentoo-dev 2009-10-31 21:12:35 UTC
USE are handled by the new --binpkg-respect-use option in portage-2.1.7.x, or --newuse in older versions.

CHOST is handled byg ACCEPT_CHOSTS (see `man make.conf`).

ARCH might not be needed, because CHOST masking is probably close enough.