Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 542826 - sys-firmware/seabios-1.7.5-r1: fails to unpack
Summary: sys-firmware/seabios-1.7.5-r1: fails to unpack
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Virtualization Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-10 14:56 UTC by diamond
Modified: 2015-03-10 20:52 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
seabios-1.7.5-r1 logfile (20150310-040536.log,2.01 KB, text/plain)
2015-03-10 14:56 UTC, diamond
Details

Note You need to log in before you can comment on or make changes to this bug.
Description diamond 2015-03-10 14:56:49 UTC
Created attachment 398610 [details]
seabios-1.7.5-r1 logfile

sys-firmware/seabios-1.7.5-r1 fails to unpack. I see from the log that it converts seabios_1.7.5-1_all.deb into seabios_1.7.5-1_all.tar.xz. Then it fails because of different extension of the produced file and the required one (.xz is not .gz). May I aske the question? Why do you need to convert .deb into .xz? Isn't easier to do smth like this in the ebuild?
src_unpack() {
        unpack_deb ${A}
}
src_prepare() {
# Do what you want rm, mv, etc.
}
Comment 1 Ben Kohler gentoo-dev 2015-03-10 19:29:06 UTC
FYI to reproduce this you must have non-gnu ar, and must have deb2targz installed.  The normal unpack works fine, it's the deb2targz fallback unpack which fails.  phase-helpers.sh says:

         # Unpacking .deb archives can not always be done with
         # `ar`.  For instance on AIX this doesn't work out.
         # If `ar` is not the GNU binutils version and we have
         # `deb2targz` installed, prefer it over `ar` for that
         # reason.  We just make sure on AIX `deb2targz` is
         # installed.


...in case you were wondering how this slipped through the cracks, outright failing @ unpack phase =)

Out of curiosity, what does your "ar --version" report?  Is this a prefix setup or something?
Comment 2 diamond 2015-03-10 19:44:12 UTC
IDK what ar means. I have app-arch/deb2targz installed for a long time for my personal purposes. The result of "ar --version" command:

# ar --version
GNU ar (Gentoo 2.24 p1.4) 2.24
Copyright 2013 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.
Comment 3 Ben Kohler gentoo-dev 2015-03-10 19:54:01 UTC
'ar' is an archive tool from binutils which can be used by portage to unpack the .deb file, rather than relying on deb2targz.  As I read the unpack function in phase-helpers.sh, it should not even attempt to use deb2targz unless it detects non-GNU ar.  The exact test is:

 if [[ $(ar --version 2>/dev/null) != "GNU ar"* ]] && type -P deb2targz > /dev/null; then ...



Somehow this test returns success on your setup, but I don't immediately see why.  Then the deb2targz method seems to fall down when the archive inside is .xz rather than .gz
Comment 4 diamond 2015-03-10 20:17:42 UTC
I have just tested under root:
# if [[ $(ar --version 2>/dev/null) != "GNU ar"* ]] ; then \
> echo "Inside"; \
> fi

The output is empty wich means that it doesn't enter inside this if.
Comment 5 Ben Kohler gentoo-dev 2015-03-10 20:24:49 UTC
But that's the only place where deb2targz can be called at all, so somehow in the emerge environment it must be passing that test.  If you temporarily unmerge deb2targz (or just move /usr/bin/deb2targz out of the way) does seabios emerge successfully?
Comment 6 Ben Kohler gentoo-dev 2015-03-10 20:38:48 UTC
I now see that this is fixed in portage versions 2.2.16 and later: https://github.com/gentoo/portage/commit/518aedae1b3aa06f796376390118dad89eee31ce
Comment 7 diamond 2015-03-10 20:51:00 UTC
(In reply to Ben Kohler from comment #5)
> But that's the only place where deb2targz can be called at all, so somehow
> in the emerge environment it must be passing that test.  If you temporarily
> unmerge deb2targz (or just move /usr/bin/deb2targz out of the way) does
> seabios emerge successfully?

Yes, it merged after moving /usr/bin/deb2targz to some other place temporarily. Thank you.