Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 81377 - emerge vanilla sources fails in universal_unpack function
Summary: emerge vanilla sources fails in universal_unpack function
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-09 08:11 UTC by John Russell
Modified: 2005-02-09 13:37 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Russell 2005-02-09 08:11:38 UTC
Emerge vanilla-sources was failing the function universal_unpack in kernel-2.eclass.  I changed the line

[[ ${OKV} != ${KV_FULL} ]] && mv linux-${OKV} linux-${KV_FULL} \
			|| die "Unable to move source tree to ${KV_FULL}."


to 

      if [[ ${OKV} != ${KV_FULL} ]]; then                                     
            if mv linux-${OKV} linux-${KV_FULL} ; then                          
                die "Unable to move source tree to ${KV_FULL}."                 
            fi                                                                  
        fi       

For some reason the first one was thinking that ${OKV} and ${KV_FULL}, both set to 2.4.28 were different and was trying to mv linux-2.4.28 linux-2.4.28 which was failing.  After changing the line to the slightly less slick if statement it appeared to work fine.

Output of emerge below.
 
mahler:/home/jorussel# emerge -v vanilla-sources
Calculating dependencies ...done!
>>> emerge (1 of 1) sys-kernel/vanilla-sources-2.4.28 to /
>>> md5 src_uri ;-) linux-2.4.28.tar.bz2
>>> Preparing to unpack ...
>>> Unpacking source...
>>> Unpacking linux-2.4.28.tar.bz2 to /var/tmp/portage/vanilla-sources-2.4.28/work

!!! ERROR: sys-kernel/vanilla-sources-2.4.28 failed.
!!! Function universal_unpack, Line 163, Exitcode 1
!!! Unable to move source tree to 2.4.28.
!!! If you need support, post the topmost build error, NOT this status message.



Reproducible: Always
Steps to Reproduce:
1.emerge vanilla sources-2.4.28
2.emerge fails
3.

Actual Results:  
emerge failes in universal_unpack function

Expected Results:  
universal_unpack should not try to move the directory linux-2.4.28 to linux-2.4.28.
Comment 1 Ghislain Bourgeois 2005-02-09 13:08:52 UTC
Can we have a working kernel-2.eclass in portage? Is there testing for eclasses before putting them in Portage? We rely on a working implementation of Portage here, I don't understand why bugs like this make their way in the tree.

A way to keep the shorcuts in could be:

[[ ${OKV} != ${KV_FULL} ]] && ( mv linux-${OKV} linux-${KV_FULL} \
			|| die "Unable to move source tree to ${KV_FULL}." )

With the current line it doesn't even try to mv. Since ${OKV} != ${KV_FULL} in this case, the result of && is automatically false, and so it dies.

Can we have a fix rapidly?
Comment 2 John Russell 2005-02-09 13:32:24 UTC
Not so sound pretentious, but I think that the if statement is far more readable than all the && || &|&&| magic.  I know its not as cool, but it'll make someone else's life easier later.
Comment 3 Tim Yamin (RETIRED) gentoo-dev 2005-02-09 13:37:20 UTC
Looks like this has been fixed, please reopen this bug if the issue still occurs.

RCS file: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v
head: 1.98
----------------------------
revision 1.98
date: 2005/02/09 21:07:14;  author: hollow;  state: Exp;  lines: +4 -2
fixed universal_unpack
----------------------------