Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 39519 - unwanted execution in eclasses (makes it slow)
Summary: unwanted execution in eclasses (makes it slow)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Mamoru KOMACHI (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-26 17:47 UTC by Robin Johnson
Modified: 2006-05-26 12:35 UTC (History)
2 users (show)

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 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-01-26 17:47:09 UTC
cannadic.eclass:
DICSDIRFILE="$(echo ${FILESDIR}/*.dics.dir)"
fix:
DICSDIRFILE="${FILESDIR}/*.dics.dir"

gnome.org.eclass, gst-plugins.eclass, gtk-engines.eclass
PVP=($(echo " $PV " | sed 's:[-\._]: :g'))

kernel-2.eclass:
KV_MAJOR=$(echo ${KV} | cut -d. -f1)
KV_MINOR=$(echo ${KV} | cut -d. -f2)
KV_PATCH=$(echo ${KV} | cut -d. -f3)
Comment 1 Ed Grimm 2004-01-29 23:57:11 UTC
Correct.

Correction for second instance:
This is hairy in BASH.  Zsh would be better, but the gentoo developer community apparently has a fair amount of learning before that transition can feasibly start.
PVTMP=${PV%.*}
PVP=(${PV%%.*} ${PVTMP#*.} ${PV##*.})

Note that the above fix only works with three octet version numbers.
In zsh, we'd have an easy answer that would handle all cases.
IFStmp=$IFS; IFS='-._'; PVP=($=PV)); IFS=$IFStmp

(That translates to: Backup the word separator characters.  Set the word separator characters to '-', '.', and '_'; then wordsplit PV into array PVP.  Restore the word separator charactors.  The same concept in bash only returns the major portion.)

kernel-2.eclass:
KV_MAJOR=${KV%%.*}
KV_MINOR=${KV%.*}
KV_MINOR=${KV_MINOR#*.}
KV_PATCH=${KV##*.}

Note: in zsh, the middle variable becomes
KV_MINOR=${${KV%.*}#*.}


I'm not confirming this bug only because I'm new here and do not know if this is reserved for core developers.
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2005-08-12 13:28:49 UTC
This bug is irrelevant after 1 1/2 years, except for cannadic.eclass which is
still not fixed.
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2006-05-18 16:55:41 UTC
usata: please fix cannadic.eclass
Comment 4 Alec Warner (RETIRED) archtester gentoo-dev Security 2006-05-26 08:25:41 UTC
I fixed this
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2006-05-26 12:35:34 UTC
antarus: thanks.