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)
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.
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 :)
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.
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}')"
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.