Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 91733 - svgalib installing udev permissions.d file, when its deprecated in newer versions.
Summary: svgalib installing udev permissions.d file, when its deprecated in newer vers...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: SpanKY
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-06 13:23 UTC by John Mylchreest (RETIRED)
Modified: 2005-05-07 04:04 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 Mylchreest (RETIRED) gentoo-dev 2005-05-06 13:23:25 UTC
The following code is in the svgalib ebuild, although it should probably check the udev version as well, and install a rules.d file if its newer or equal to than 052.

if [[ -e ${ROOT}/dev/.devfsd ]] ; then
                insinto /etc/devfs.d
                newins "${FILESDIR}"/svgalib.devfs svgalib
        elif [[ -e ${ROOT}/dev/.udev ]] ; then
                dodir /etc/udev/permissions.d
                echo "svga*:root:video:0660" > \
                        "${D}"/etc/udev/permissions.d/30-${PN}.permissions
        fi


Could I maybe suggest something like this?

elif [[ -e ${ROOT}/dev/.udev ]] ; then
    version=`udevinfo -V`
    version=${version//* }
    if [[ ${version} -ge 052 ]]; then
        dodir /etc/udev/rules.d
        echo "KERNEL="svga*", NAME="%k", MODE="0660" \
            "${D}"/etc/udev/rules.d/30-${PN}.rules
    else
        dodir /etc/udev/permissions.d
        echo "svga*:root:video:0660" > \
            "${D}"/etc/udev/permissions.d/30-${PN}.permissions
    fi
fi


although, might I add this isnt tested :)

Reproducible: Always
Steps to Reproduce:
Comment 1 SpanKY gentoo-dev 2005-05-07 01:12:50 UTC
ive cleaned up the ebuild to check the portage way (best_version udev) and install rules.d / permissions.d files accordingly, thanks

side note, your quoting is wrong, it should be:
echo 'KERNEL="svga*" ...'
Comment 2 John Mylchreest (RETIRED) gentoo-dev 2005-05-07 04:04:53 UTC
yeah I noticed once I posted it :) Missing > too.
Just wrote it into the bug on the fly.

Cheers.