Summary: | app-office/openoffice-bin-3.1.1 should update its rpm_unpack usage | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Tijmen van Hoeckel <theimon> |
Component: | Current packages | Assignee: | Gentoo Office Team <office> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alois.schmid, boltomli, dschridde+gentoobugs, jw5801, suicide_al_02, vapier, walch.martin |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Tijmen van Hoeckel
2009-10-03 17:24:15 UTC
It's not failing due to a missing file, but due to messed up options being passed to rpm2tar: `` /usr/bin/rpm2tar: line 144: /var/tmp/portage/app-office/openoffice-bin-3.1.1/distdir//var/tmp/portage/app-office/openoffice-bin-3.1.1/work/OOO310_m19_native_packed-2_en-US.9420/RPMS/ooobasis3.1-base-3.1.1-9420.x86_64.rpm: No such file or directory '' `` Andornor ~ # ls -lh /var/tmp/portage/app-office/openoffice-bin-3.1.1/work/OOO310_m19_native_packed-2_en-US.9420/RPMS/ooobasis3.1-base-3.1.1-9420.x86_64.rpm -rw-r--r-- 1 root root 2.7M 2009-08-19 18:14 /var/tmp/portage/app-office/openoffice-bin-3.1.1/work/OOO310_m19_native_packed-2_en-US.9420/RPMS/ooobasis3.1-base-3.1.1-9420.x86_64.rpm '' Looks to me as though as space is missing. Not sure why or how though. i can confirm this error too *** Bug 287620 has been marked as a duplicate of this bug. *** Mike, your change to the rpm.eclass caused that breakage, I think. (In reply to comment #1) > It's not failing due to a missing file, but due to messed up options being > passed to rpm2tar: > > `` > /usr/bin/rpm2tar: line 144: > /var/tmp/portage/app-office/openoffice-bin-3.1.1/distdir//var/tmp/portage/app-office/openoffice-bin-3.1.1/work/OOO310_m19_native_packed-2_en-US.9420/RPMS/ooobasis3.1-base-3.1.1-9420.x86_64.rpm: > No such file or directory > '' > > `` > Andornor ~ # ls -lh > /var/tmp/portage/app-office/openoffice-bin-3.1.1/work/OOO310_m19_native_packed-2_en-US.9420/RPMS/ooobasis3.1-base-3.1.1-9420.x86_64.rpm > -rw-r--r-- 1 root root 2.7M 2009-08-19 18:14 > /var/tmp/portage/app-office/openoffice-bin-3.1.1/work/OOO310_m19_native_packed-2_en-US.9420/RPMS/ooobasis3.1-base-3.1.1-9420.x86_64.rpm > '' > > Looks to me as though as space is missing. Not sure why or how though. > I don't think a space is missing, it looks as though it's calling two separate directories and the first one /var/tmp/portage/app-office/openoffice-bin-3.1.1/distdir/ shouldn't be getting called upon as there is no .rpm's in that directory, just the base installing .tar.gz file. Hit the go button too soon, I'm getting a similar message as well. * ERROR: app-office/openoffice-bin-3.1.1 failed. * Call stack: * ebuild.sh, line 49: Called src_unpack * environment, line 2311: Called rpm_unpack '/var/tmp/portage/app-office/openoffice-bin-3.1.1/work/OOO310_m19_native_packed-1_en-US.9420/RPMS/ooobasis3.1-base-3.1.1-9420.i586.rpm' * environment, line 2233: Called die * The specific snippet of code: * rpm2tar -O "${a}" | tar xf - || die "failure unpacking ${a}"; * The die message: * failure unpacking /var/tmp/portage/app-office/openoffice-bin-3.1.1/distdir//var/tmp/portage/app-office/openoffice-bin-3.1.1/work/OOO310_m19_native_packed-1_en-US.9420/RPMS/ooobasis3.1-base-3.1.1-9420.i586.rpm * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/var/tmp/portage/app-office/openoffice-bin-3.1.1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/app-office/openoffice-bin-3.1.1/temp/environment'. You are correct, further investigation shows that the change to rpm.eclass (specifically rpm_unpack) is the culprit. rpm_unpack is incorrectly prepending ${DISTDIR} to the path. `` rpm_unpack() { local a for a in "$@" ; do echo ">>> Unpacking ${a} to ${PWD}" [[ ${a} != ./* ]] && a="${DISTDIR}/${a}" rpm2tar -O "${a}" | tar xf - || die "failure unpacking ${a}" done } '' The comparison `[[ ${a} != ./* ]]' looks suspicious to me. I would have thought that the `.' shouldn't be there, as that would then prepend ${DISTDIR} if the argument passed to rpm_unpack was not a full path. I can confirm that after changing ./* to /* on line 22 of /usr/portage/eclass/rpm.eclass, I can now install openoffice-bin-3.1.1 successfully. the code is operating as intended. rpm_unpack() behaves like unpack() now. if you want to unpack a file not in DISTDIR, then use the ./file format. i can update the ebuild to abort with absolute file paths, but openoffice should be converted. it's trivial to change the code to cd to $S before doing unpack on ./rpmfiles. If the API has changed there are probably a few other packages around the tree that still expect to be able to pass a full path to rpm_unpack as well (net-dialup/fcpci being one, I'm sure there are probably others), so it might be necessary to track them down and report them as bugs due to the API change. rpm2targz also only unpacks into the current directory, which might cause lengthy relative paths if one wanted to unpack into a different directory. I guess better practise in that instance would be to simply put all the extracted rpms into DISTDIR and then cd to whereever in work. I think an abort if a full path is encountered, with the suggestion that the user report a bug so that the ebuild can be fixed would be useful, at least in the short term anyway. i hadnt expected people to be using an API differently from the unpack() function itself, but i guess when a function isnt documented and the code itself is ugly and hard to follow, people use whatever works. i'll restore the functionality with a warning for people to change the usage so end users at least wont have broken emerges. *** Bug 289149 has been marked as a duplicate of this bug. *** openoffice-bin 3.2.0 solves this, just entered the tree, so closing this. |