Re: [gentoo-user] Re: Building and using binary packages with emerge/portage
On Mon, 2005-05-30 at 21:17 -0700, Zac Medico wrote: --- Ow Mun Heng [EMAIL PROTECTED] wrote: I'm sorry but I looked inside the content of a tbz2 file and didn't find that it has any references to the /var/db directory. The data not inside the tar archive. It's appended onto the end of the tbz2 file. You know it's there because if you unzip the tbz2 file then bunzip2 says trailing garbage after EOF ignored. In This case, how would one determine what IUSE values were used for the package said package then? How can one use to view this data? tbz2tool --help tbz2tool join DATAFILE DBFILE OUTFILE (datafile + dbfile - outfile) tbz2tool split INFILE DATAFILE DBFILE (infile - datafile + dbfile) And what does tbz2tool and xpak do? There's not much of a Man page for them. They take care of what's needed to handle the appended data. They're not documented because normally they're only used internally by portage. I see. In such case, when we emerge -kv package will it list the IUSE flag which the package was compiled with? Do you know off-hand w/o needing to compile it on one machine (with different use flags) and then use the package on another machine (which has a different USE flag) just to see the difference? -- Ow Mun Heng Gentoo/Linux on DELL D600 1.4Ghz 1.5GB RAM 98% Microsoft(tm) Free!! Neuromancer 14:00:20 up 16:02, 8 users, load average: 1.31, 1.65, 1.28 -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Re: Building and using binary packages with emerge/portage
--- Ow Mun Heng [EMAIL PROTECTED] wrote: In This case, how would one determine what IUSE values were used for the package said package then? How can one use to view this data? #!/usr/bin/python import sys if len(sys.argv)!=2: print usage: %s tbz2 file % sys.argv[0] sys.exit(1) sys.path = [/usr/lib/portage/pym]+sys.path import xpak mytbz2=xpak.tbz2(sys.argv[1]) myuse=mytbz2.getfile(IUSE) print myuse I see. In such case, when we emerge -kv package will it list the IUSE flag which the package was compiled with? /var/db/pkg/${CATEGORY}/${PN}-${PV}/IUSE Do you know off-hand w/o needing to compile it on one machine (with different use flags) and then use the package on another machine (which has a different USE flag) just to see the difference? I'm not sure I understand the question. You ant to know if the USE flags are different depending on which machine the package is compiled on? Can you use the above a variation of the above python script? Zac __ Do you Yahoo!? Yahoo! Small Business - Try our new Resources site http://smallbusiness.yahoo.com/resources/ -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Re: Building and using binary packages with emerge/portage
On Mon, 2005-05-30 at 23:57 -0700, Zac Medico wrote: --- Ow Mun Heng [EMAIL PROTECTED] wrote: In This case, how would one determine what IUSE values were used for the package said package then? How can one use to view this data? #!/usr/bin/python import sys if len(sys.argv)!=2: print usage: %s tbz2 file % sys.argv[0] sys.exit(1) sys.path = [/usr/lib/portage/pym]+sys.path import xpak mytbz2=xpak.tbz2(sys.argv[1]) myuse=mytbz2.getfile(IUSE) print myuse Cool $./g-binary-use.py usage: ./g-binary-use.py tbz2 file $g-binary-use.py /usr/portage/packages/All/liferea-0.9.1.tbz2 mozilla gtkhtml debug debug $ emerge -kvp liferea [binary R ] net-news/liferea-0.9.1 -debug +gtkhtml -mozilla $ cat /var/db/pkg/net-news/liferea-0.9.1/IUSE mozilla gtkhtml debug debug True it does have the USE Flags, but looks to me like it doesn't actually signify if it's in Use or Not in Use. Meaning, the + or - doesn't propagate? Do you know off-hand w/o needing to compile it on one machine (with different use flags) and then use the package on another machine (which has a different USE flag) just to see the difference? I'm not sure I understand the question. You ant to know if the USE flags are different depending on which machine the package is compiled on? Can you use the above a variation of the above python script? No..No.. you've already answer the question as above. Only now, can you answer the 2nd question I have regarding the + or - and whether the USE flag is in USE? Zac __ Do you Yahoo!? Yahoo! Small Business - Try our new Resources site http://smallbusiness.yahoo.com/resources/ -- Ow Mun Heng Gentoo/Linux on DELL D600 1.4Ghz 1.5GB RAM 98% Microsoft(tm) Free!! Neuromancer 15:26:18 up 17:28, 9 users, load average: 0.60, 0.69, 0.76 -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Re: Building and using binary packages with emerge/portage
--- Ow Mun Heng [EMAIL PROTECTED] wrote: answer the 2nd question I have regarding the + or - and whether the USE flag is in USE? This should do the trick: #!/usr/bin/python import sys if len(sys.argv)!=2: print usage: %s tbz2 file % sys.argv[0] sys.exit(1) sys.path = [/usr/lib/portage/pym]+sys.path import xpak mytbz2=xpak.tbz2(sys.argv[1]) myuse=mytbz2.getelements(USE) myiuse=mytbz2.getelements(IUSE) for use in myiuse: operator=- if use in myuse: operator=+ print operator + use + __ Do you Yahoo!? Yahoo! Small Business - Try our new Resources site http://smallbusiness.yahoo.com/resources/ -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Re: Building and using binary packages with emerge/portage
On Tue, 2005-05-31 at 00:56 -0700, Zac Medico wrote: #!/usr/bin/python import sys if len(sys.argv)!=2: print usage: %s tbz2 file % sys.argv[0] sys.exit(1) sys.path = [/usr/lib/portage/pym]+sys.path import xpak mytbz2=xpak.tbz2(sys.argv[1]) myuse=mytbz2.getelements(USE) myiuse=mytbz2.getelements(IUSE) for use in myiuse: operator=- if use in myuse: operator=+ print operator + use + Cool. This works as expected. But a few more questions and this is more towards how portage handles the Padded data in the tbz2. Looking that the variables of IUSE and USE via print myuse and print myiuse I get : ['x86', 'X', 'aac', 'aalib', 'acl', 'acpi', 'aim', 'alsa', 'apache2', 'avi', 'bash-completion', 'berkdb', 'bitmap-fonts', 'bonobo', 'bzlib', SNIP .. 'kernel_linux', 'elibc_glibc'] ['mozilla', 'gtkhtml', 'debug', 'debug'] So if I understand it correctly, what is being done is XPAK will take the USE flags from the system which compiled the binary and then sort of make a comparison with the USE flags for that particular package and work from there? Am I right? Doing a $strings /usr/portage/packages/All/liferea-0.9.1.tbz2 gets me [snip] ... XPAKPACK --- This marks the start of the XPAK padding ASFLAGS CATEGORY CBUILD CDEPEND CFLAGS CHOST CTARGET CXXFLAGS DEPEND EXTRA_ECONF EXTRA_EINSTALL EXTRA_EMAKE FEATURES INHERITED IUSE LDFLAGS LIBCFLAGS LIBCXXFLAGS LICENSE PDEPEND PKGUSE PROVIDE RDEPEND RESTRICT SLOT environment.bz2 liferea-0.9.1.ebuild net-news -O2 -march=pentium3 -fomit-frame-pointer -pipe -falign-functions=64 -mmmx -msse -msse2 i686-pc-linux-gnu -O2 -march=pentium3 -fomit-frame-pointer -pipe -falign-functions=64 -mmmx -msse -msse2 =x11-libs/gtk+-2 =dev-libs/libxml2-2.5.10 mozilla? ( www-client/mozilla gtkhtml? ( =gnome-extra/libgtkhtml-2* ) !mozilla? ( =gnome-extra/libgtkhtml-2* ) =gnome-base/gconf-2 dev-util/pkgconfig =sys-apps/sed-4 autoaddcvs autoconfig buildpkg candy ccache distlocks sandbox sfperms strict libtool gnome.org debug fdo-mime gnome2 libtool gnome.org debug fdo-mime gnome2 libtool gnome.org debug fdo-mi me gnome2 libtool gnome.org debug fdo-mime gnome2 mozilla gtkhtml debug debug Package USE Flags [SNIP] x86 X aac aalib acl acpi aim alsa apache2 avi bash-completion berkdb SNIP . kernel_linux elibc_glibc -- Ow Mun Heng Gentoo/Linux on DELL D600 1.4Ghz 1.5GB RAM 98% Microsoft(tm) Free!! Neuromancer 16:20:55 up 18:22, 9 users, load average: 0.51, 0.74, 0.74 -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Re: Building and using binary packages with emerge/portage
--- Ow Mun Heng [EMAIL PROTECTED] wrote: So if I understand it correctly, what is being done is XPAK will take the USE flags from the system which compiled the binary and then sort of make a comparison with the USE flags for that particular package and work from there? Am I right? Yes, you have access to all the old /var/db data. The filelist() method lists all the files that are accessible via getfile() or getelements() methods. The USE flags are a collection of boolean variables. A particular flag is enabled when it exists in both IUSE and USE. Zac __ Do you Yahoo!? Yahoo! Small Business - Try our new Resources site http://smallbusiness.yahoo.com/resources/ -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Re: Building and using binary packages with emerge/portage
On Tue, 2005-05-31 at 02:33 -0700, Zac Medico wrote: --- Ow Mun Heng [EMAIL PROTECTED] wrote: So if I understand it correctly, what is being done is XPAK will take the USE flags from the system which compiled the binary and then sort of make a comparison with the USE flags for that particular package and work from there? Am I right? Yes, you have access to all the old /var/db data. The filelist() method lists all the files that are accessible via getfile() or getelements() methods. The USE flags are a collection of boolean variables. A particular flag is enabled when it exists in both IUSE and USE. Cool.. nice script by the way. I'm gonna include that in Edition 3 (July) of the MyOSS Magazine (http://mag.my-opensource.org) as Tips and Tricks. (crediting you of course) -- Ow Mun Heng Gentoo/Linux on DELL D600 1.4Ghz 1.5GB RAM 98% Microsoft(tm) Free!! Neuromancer 17:51:42 up 19:53, 8 users, load average: 1.93, 1.02, 0.92 -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Re: Building and using binary packages with emerge/portage
--- Ow Mun Heng [EMAIL PROTECTED] wrote: Cool.. nice script by the way. I'm gonna include that in Edition 3 (July) of the MyOSS Magazine (http://mag.my-opensource.org) as Tips and Tricks. (crediting you of course) Oh it's really nothing. Glad I could help. ;-) Zac __ Do you Yahoo!? Yahoo! Small Business - Try our new Resources site http://smallbusiness.yahoo.com/resources/ -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Re: Building and using binary packages with emerge/portage
On Mon, 2005-05-30 at 21:35 -0700, Mark Knecht wrote: On 5/30/05, Ow Mun Heng [EMAIL PROTECTED] wrote: On Mon, 2005-05-30 at 10:13 -0700, Mark Knecht wrote: On 5/30/05, Ow Mun Heng [EMAIL PROTECTED] wrote: Someone correct me if I'm wrong, but I don't think those binary packages propagate into /var/db as well. (IF they do, I think they might not reflect the actual USE flags used to built the binary. This probably accounts for revdep-rebuild never getting it quite right for binary packages like openoffice-bin and always wanting to re-emerge it again? So.. I'm not the only one who gets that. (and I always thought it was some gremlins) Perhaps one can ask chinstrap.alternating.net since they do host binary packages No, you're not the only one. I wondered a bit about this a few weeks ago and found a number of comments in the forums and Bugzilla that revdep-rebuild doesn't work very well yet for binary packages. I see this with openoffice-bin and thunderbird-bin. It seems logical that if I don't know the flags used for a binary build that somewhere along the way I'm going to miss some dependency on my system. Actually, revdep-rebuild doesn't care about USE flags or /var/db at all. All it checks is that the dynamic linking can be satisfied. With the exception of openoffice-bin, when revdep-rebuild indicates that it wants to rebuild a -bin package it means that the ebuild is potentially missing dependencies. The reason that I state potentially is that sometimes the libraries are placed in a non-standard place by the ebuild and revdep-rebuild is unaware of that non-standard location when checking the dynamic linking. I'm currently working on updating revdep-rebuild so that it will be easier to configure for both users and developers. Regards, Paul -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Re: Building and using binary packages with emerge/portage
Paul Varner [EMAIL PROTECTED] writes: With the exception of openoffice-bin, when revdep-rebuild indicates that it wants to rebuild a -bin package it means that the ebuild is potentially missing dependencies. Also, I believe, opera. This has dependencies on a number of different version of a library (libXm) and as long as one of them is satisfied it is happy. revdep-rebuild thinks it needs re-installing every time. -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Re: Building and using binary packages with emerge/portage
On 5/30/05, Ow Mun Heng [EMAIL PROTECTED] wrote: Someone correct me if I'm wrong, but I don't think those binary packages propagate into /var/db as well. (IF they do, I think they might not reflect the actual USE flags used to built the binary. This probably accounts for revdep-rebuild never getting it quite right for binary packages like openoffice-bin and always wanting to re-emerge it again? Cheers, Mark -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Re: Building and using binary packages with emerge/portage
On Mon, 2005-05-30 at 10:13 -0700, Mark Knecht wrote: On 5/30/05, Ow Mun Heng [EMAIL PROTECTED] wrote: Someone correct me if I'm wrong, but I don't think those binary packages propagate into /var/db as well. (IF they do, I think they might not reflect the actual USE flags used to built the binary. This probably accounts for revdep-rebuild never getting it quite right for binary packages like openoffice-bin and always wanting to re-emerge it again? So.. I'm not the only one who gets that. (and I always thought it was some gremlins) Perhaps one can ask chinstrap.alternating.net since they do host binary packages -- Ow Mun Heng Gentoo/Linux on DELL D600 1.4Ghz 1.5GB RAM 98% Microsoft(tm) Free!! Neuromancer 11:31:16 up 13:33, 8 users, load average: 0.30, 0.32, 0.27 -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Re: Building and using binary packages with emerge/portage
On Mon, 2005-05-30 at 13:34 -0700, Zac Medico wrote: --- Mark Knecht [EMAIL PROTECTED] wrote: On 5/30/05, Ow Mun Heng [EMAIL PROTECTED] wrote: Someone correct me if I'm wrong, but I don't think those binary packages propagate into /var/db as well. (IF they do, I think they might not reflect the actual USE flags used to built the binary. When a binary tbz2 package is built, the /var/db data for that package (USE flags, etc..) is appended onto the end of the tbz2 file. Portage and quickpkg use the tools xpak and tbz2tool to handle this. When a binary package is installed the data goes back into the /var/db database. I'm sorry but I looked inside the content of a tbz2 file and didn't find that it has any references to the /var/db directory. And what does tbz2tool and xpak do? There's not much of a Man page for them. equery belongs `which xpak` [ Searching for file(s) /usr/bin/xpak in *... ] sys-apps/portage-2.0.51.19 (/usr/bin/xpak - ../lib/portage/bin/xpak -- Ow Mun Heng Gentoo/Linux on DELL D600 1.4Ghz 1.5GB RAM 98% Microsoft(tm) Free!! Neuromancer 11:35:37 up 13:37, 9 users, load average: 0.57, 0.39, 0.30 -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Re: Building and using binary packages with emerge/portage
--- Ow Mun Heng [EMAIL PROTECTED] wrote: I'm sorry but I looked inside the content of a tbz2 file and didn't find that it has any references to the /var/db directory. The data not inside the tar archive. It's appended onto the end of the tbz2 file. You know it's there because if you unzip the tbz2 file then bunzip2 says trailing garbage after EOF ignored. And what does tbz2tool and xpak do? There's not much of a Man page for them. They take care of what's needed to handle the appended data. They're not documented because normally they're only used internally by portage. Zac __ Do you Yahoo!? Yahoo! Small Business - Try our new Resources site http://smallbusiness.yahoo.com/resources/ -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Re: Building and using binary packages with emerge/portage
On 5/30/05, Ow Mun Heng [EMAIL PROTECTED] wrote: On Mon, 2005-05-30 at 10:13 -0700, Mark Knecht wrote: On 5/30/05, Ow Mun Heng [EMAIL PROTECTED] wrote: Someone correct me if I'm wrong, but I don't think those binary packages propagate into /var/db as well. (IF they do, I think they might not reflect the actual USE flags used to built the binary. This probably accounts for revdep-rebuild never getting it quite right for binary packages like openoffice-bin and always wanting to re-emerge it again? So.. I'm not the only one who gets that. (and I always thought it was some gremlins) Perhaps one can ask chinstrap.alternating.net since they do host binary packages No, you're not the only one. I wondered a bit about this a few weeks ago and found a number of comments in the forums and Bugzilla that revdep-rebuild doesn't work very well yet for binary packages. I see this with openoffice-bin and thunderbird-bin. It seems logical that if I don't know the flags used for a binary build that somewhere along the way I'm going to miss some dependency on my system. Take care and thanks, Mark -- gentoo-user@gentoo.org mailing list