Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 80368 - check-kernel.eclass uses awk & sed in global scope
Summary: check-kernel.eclass uses awk & sed in global scope
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-01 11:52 UTC by Anthony Giorgio
Modified: 2005-02-09 07:34 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 Anthony Giorgio 2005-02-01 11:52:03 UTC
/usr/portage/eclass/check-kernel.eclass uses awk & sed in global scope

Look here:

get_KV_info() {
    check_version_h

    # Get the kernel version of sources in /usr/src/linux ...
    export KV_full="$(awk '/UTS_RELEASE/ { gsub("\"", "", $3); print $3 }' \
        "${ROOT}/usr/src/linux/include/linux/version.h")"
    export KV_major="$(echo "${KV_full}" | cut -d. -f1)"
    export KV_minor="$(echo "${KV_full}" | cut -d. -f2)"
    export KV_micro="$(echo "${KV_full}" | cut -d. -f3 | sed -e 's:[^0-9].*::')"
}

The use of awk and sed in this eclass causes portage to complain about a QA violation for any ebuild inheriting this eclass.
Comment 1 Ciaran McCreesh 2005-02-01 11:58:40 UTC
*cough* versionator *cough*
Comment 2 John Mylchreest (RETIRED) gentoo-dev 2005-02-01 12:34:08 UTC
*cough* linux-info *cough*
!!
Comment 3 Anthony Giorgio 2005-02-01 12:36:07 UTC
Could someone be a little less terse please?
Comment 4 John Mylchreest (RETIRED) gentoo-dev 2005-02-01 14:38:43 UTC
my apologies :)

basically, check-kernel.eclass should die an 'orrible death, in favour of linux-info.
What I think I'll do is have it shout out loud warnings in the eclass, ill send a mail to -dev, and try to get this killed off.

Can I ask what packages present you with this error?
Comment 5 Anthony Giorgio 2005-02-02 06:39:38 UTC
I have a private ebuild for some internal software here at work.  The QA errors were getting annoying, and I finally did some investigation on their origin.  This ebuild needs to do kernel version detection somehow, and I didn't know that check-kernel was taboo :)

I'll look into linux-info.eclass.
Comment 6 Daniel Drake (RETIRED) gentoo-dev 2005-02-09 07:34:53 UTC
I think I can safely say that we aren't going to put effort into fixing check-kernel, and other bugs exist to track linux-info/mod migration.