(completely stable, up to date system) %% emerge --version Portage 2.1.6.13 (default/linux/x86/10.0, gcc-4.3.4, glibc-2.10.1-r1) Hello, there are three packages on my system (out of ~300) that have wrong xpak data if generated with quickpkg/qpkg. Those are python, ncurses, & mysql. Steps to reproduce: %% sudo PKGDIR=~/tmp quickpkg --umask=0002 python * Building package for dev-lang/python-2.6.4 ... [ ok ] * Excluded config: '/etc/conf.d/pydoc-2.6' * Excluded config: '/etc/init.d/pydoc-2.6' * Packages now in '/home/jolexa/tmp': * dev-lang/python-2.6.4: 9.4M * Excluded config files: 2 * See --help if you would like to include config files. %% cd tmp/dev-lang/ %% ls -l total 9608 -rw-rw-r-- 1 root root 9819067 Jan 11 17:20 python-2.6.4.tbz2 %% qtbz2 -x python-2.6.4.tbz2 %% ls python-2.6.4.tbz2 python-2.6.4.xpak %% qxpak -l python-2.6.4.xpak USE FEATURES LICENSE COUNTER CXXFLAGS SRC_URI KEYWORDS CBUILD CONTENTS RDEPEND SLOT DEPEND IUSE CHOST LDFLAGS PF HOMEPAGE DEFINED_PHASES repository PROVIDE environment.bz2 PDEPEND INHERITED CATEGORY EAPI DESCRIPTION CXX python-2.6.4.ebuild NEEDED CFLAGS BINPKGMD5 NEEDED.ELF.2 %% for i in $(qxpak -l python-2.6.4.xpak); do echo "Extracting $i"; qxpak -x python-2.6.4.xpak $i; done Extracting USE qxpak: qxpak.c:213: xpak_extract: Assertion `(size_t)x->data_len < sizeof(ext)' failed. Aborted Extracting FEATURES qxpak: qxpak.c:213: xpak_extract: Assertion `(size_t)x->data_len < sizeof(ext)' failed. Aborted Extracting LICENSE qxpak: qxpak.c:213: xpak_extract: Assertion `(size_t)x->data_len < sizeof(ext)' failed. Aborted Extracting COUNTER qxpak: qxpak.c:213: xpak_extract: Assertion `(size_t)x->data_len < sizeof(ext)' failed. Aborted Extracting CXXFLAGS qxpak: qxpak.c:213: xpak_extract: Assertion `(size_t)x->data_len < sizeof(ext)' failed. Aborted Extracting SRC_URI qxpak: qxpak.c:213: xpak_extract: Assertion `(size_t)x->data_len < sizeof(ext)' failed. Aborted Extracting KEYWORDS qxpak: qxpak.c:213: xpak_extract: Assertion `(size_t)x->data_len < sizeof(ext)' failed. Aborted Extracting CBUILD qxpak: qxpak.c:213: xpak_extract: Assertion `(size_t)x->data_len < sizeof(ext)' failed. Aborted Extracting CONTENTS qxpak: qxpak.c:213: xpak_extract: Assertion `(size_t)x->data_len < sizeof(ext)' failed. Aborted Extracting RDEPEND qxpak: qxpak.c:213: xpak_extract: Assertion `(size_t)x->data_len < sizeof(ext)' failed. Aborted Extracting SLOT qxpak: qxpak.c:213: xpak_extract: Assertion `(size_t)x->data_len < sizeof(ext)' failed. Aborted Extracting DEPEND qxpak: qxpak.c:213: xpak_extract: Assertion `(size_t)x->data_len < sizeof(ext)' failed. Aborted Extracting IUSE qxpak: qxpak.c:213: xpak_extract: Assertion `(size_t)x->data_len < sizeof(ext)' failed. Aborted Extracting CHOST qxpak: qxpak.c:213: xpak_extract: Assertion `(size_t)x->data_len < sizeof(ext)' failed. Aborted Extracting LDFLAGS qxpak: qxpak.c:213: xpak_extract: Assertion `(size_t)x->data_len < sizeof(ext)' failed. Aborted Extracting PF qxpak: qxpak.c:213: xpak_extract: Assertion `(size_t)x->data_len < sizeof(ext)' failed. Aborted Extracting HOMEPAGE qxpak: qxpak.c:213: xpak_extract: Assertion `(size_t)x->data_len < sizeof(ext)' failed. Aborted Extracting DEFINED_PHASES qxpak: qxpak.c:213: xpak_extract: Assertion `(size_t)x->data_len < sizeof(ext)' failed. Aborted Extracting repository qxpak: qxpak.c:213: xpak_extract: Assertion `(size_t)x->data_len < sizeof(ext)' failed. Aborted Extracting PROVIDE qxpak: qxpak.c:213: xpak_extract: Assertion `(size_t)x->data_len < sizeof(ext)' failed. Aborted Extracting environment.bz2 qxpak: qxpak.c:213: xpak_extract: Assertion `(size_t)x->data_len < sizeof(ext)' failed. Aborted Extracting PDEPEND qxpak: qxpak.c:213: xpak_extract: Assertion `(size_t)x->data_len < sizeof(ext)' failed. Aborted Extracting INHERITED qxpak: qxpak.c:213: xpak_extract: Assertion `(size_t)x->data_len < sizeof(ext)' failed. Aborted Extracting CATEGORY qxpak: qxpak.c:213: xpak_extract: Assertion `(size_t)x->data_len < sizeof(ext)' failed. Aborted Extracting EAPI qxpak: qxpak.c:213: xpak_extract: Assertion `(size_t)x->data_len < sizeof(ext)' failed. Aborted Extracting DESCRIPTION qxpak: qxpak.c:213: xpak_extract: Assertion `(size_t)x->data_len < sizeof(ext)' failed. Aborted Extracting CXX qxpak: qxpak.c:213: xpak_extract: Assertion `(size_t)x->data_len < sizeof(ext)' failed. Aborted Extracting python-2.6.4.ebuild qxpak: qxpak.c:213: xpak_extract: Assertion `(size_t)x->data_len < sizeof(ext)' failed. Aborted Extracting NEEDED qxpak: qxpak.c:213: xpak_extract: Assertion `(size_t)x->data_len < sizeof(ext)' failed. Aborted Extracting CFLAGS qxpak: qxpak.c:213: xpak_extract: Assertion `(size_t)x->data_len < sizeof(ext)' failed. Aborted Extracting BINPKGMD5 qxpak: qxpak.c:213: xpak_extract: Assertion `(size_t)x->data_len < sizeof(ext)' failed. Aborted Extracting NEEDED.ELF.2 qxpak: qxpak.c:213: xpak_extract: Assertion `(size_t)x->data_len < sizeof(ext)' failed. Aborted %% Interesting analysis: - xpak size differs when created with quickpkg/qpkg vs FEATURES=buildpkg -rw-r--r-- 1 jolexa users 60705 Jan 12 16:14 buildpkg/python-2.6.4.xpak -rw-r--r-- 1 jolexa users 407388 Jan 12 16:12 qpkg/python-2.6.4.xpak -rw-r--r-- 1 jolexa users 407388 Jan 12 16:10 quickpkg/dev-lang/python-2.6.4.xpak - Out of the three methods to creating binpkgs, buildpkg is the only one that works for these problem packages. (qpkg, quickpkg, FEATURES=buildpkg) -Multiple devs have reproduced this for e.g python.
SpanKY, We/Mainly You might be interested in this bug.
(In reply to comment #0) > Interesting analysis: > - xpak size differs when created with quickpkg/qpkg vs FEATURES=buildpkg > > -rw-r--r-- 1 jolexa users 60705 Jan 12 16:14 buildpkg/python-2.6.4.xpak > -rw-r--r-- 1 jolexa users 407388 Jan 12 16:12 qpkg/python-2.6.4.xpak > -rw-r--r-- 1 jolexa users 407388 Jan 12 16:10 > quickpkg/dev-lang/python-2.6.4.xpak My gut feeling is that the problem(s) are all on the portage-utils side. It doesn't make sense to get different results from buildpkg and quickpkg since they both use the exact same code from the portage.xpak module.
(In reply to comment #2) > (In reply to comment #0) > > Interesting analysis: > > - xpak size differs when created with quickpkg/qpkg vs FEATURES=buildpkg > > > > -rw-r--r-- 1 jolexa users 60705 Jan 12 16:14 buildpkg/python-2.6.4.xpak > > -rw-r--r-- 1 jolexa users 407388 Jan 12 16:12 qpkg/python-2.6.4.xpak > > -rw-r--r-- 1 jolexa users 407388 Jan 12 16:10 > > quickpkg/dev-lang/python-2.6.4.xpak > > My gut feeling is that the problem(s) are all on the portage-utils side. It > doesn't make sense to get different results from buildpkg and quickpkg since > they both use the exact same code from the portage.xpak module. > Zac, My gut feeling the was the same at first, then darkside showed me that it happens even with the new quickpkg.py rewrite. IMO it's unclear where the real bug is here.
Created attachment 216331 [details] python script to emulate functionality of qtbz2 -x
Created attachment 216333 [details] python script to emulate functionality of qxpak -l
Jeremy, please try these scripts on your 'bad' tbz2 that was created by quickpkg. I suspect it is perfectly valid since quickpkg uses exactly the same code as --buildpkg. The reason quickpkg produces a larger xpak segment is that it contains the CONTENTS file.
should we fix quickpkg to not include the CONTENTS file ? i'll look into fixing qxpak in the mean time ...
ive fixed qxpak: http://sources.gentoo.org/gentoo-projects/portage-utils/qxpak.c?r1=1.16&r2=1.17 but i think quickpkg and --buildpkg should mirror each other exactly (i.e. no CONTENTS)
(In reply to comment #7) > should we fix quickpkg to not include the CONTENTS file ? Yes, that's fixed in r15198.
I have confirmed portage-utils-0.3 working and now quickpkg works similarly to --buildpkg in svn so I guess this bug is resolved. Thanks for looking at it.
This is fixed in 2.1.7.17 and 2.2_rc62.