Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 84608

Summary: missing variable initialization in kernel-2.eclass
Product: Gentoo Linux Reporter: Walter Brunner <walter>
Component: EclassesAssignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers <kernel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Walter Brunner 2005-03-09 01:52:15 UTC
In function unipatch() in kernel-2.eclass the variable z is not set to an initial value of "". Applying diffrent patches, where the order is important (UNIPATCH_STRICTORDER=1), fails.



Reproducible: Always
Steps to Reproduce:
See for example: emerge vserver-sources   (for version 1.9.4, which is based on kernel 2.6.11-rc3 and patch-2.6.11-rc3-vs1.9.4.diff in the right order)



Solution:

kernel-2.eclass:
unipatch()
                STRICT_COUNT=$((${STRICT_COUNT} + 1))
                z=""                                       # add this line
                for((y=0; y<$((6 - ${#STRICT_COUNT})); y++));
                    do z="${z}0";
                done
                STRICT_COUNT="${z}${STRICT_COUNT}"

this code section is 2 times in the unipatch()-function
Comment 1 John Mylchreest (RETIRED) gentoo-dev 2005-03-09 14:04:20 UTC
thanks for spotting that.
Fix has now been comitted into cvs.