Package-specific test case and critical path test case project: drafts for review
Michal Jaegermann
michal at harddata.com
Wed Dec 22 01:32:26 UTC 2010
On Tue, Dec 21, 2010 at 06:12:47PM -0500, James Laska wrote:
> Something to help testers find the right src.rpm name of the
> component under test?
Something like that?
#!/bin/bash
me=$(basename $0)
usage () {
echo "Usage: $me <name>"
echo "where <name> is either path to a file or an rpm package name"
exit 1
}
[ -z "$1" ] && usage
arg="$1"
case $arg in
*/*) file="-f" ;;
esac
pkg=$(rpm -q $file --qf '%{sourcerpm}\n' $arg|head -1)
bname=${pkg%-*}
echo ${bname%-*}
echo ${pkg%.src.rpm}
exit
You can pass here as an argument /sbin/dmsetup or device-mapper with
the same effect (source package for these is called 'lvm2').
Michal
More information about the test
mailing list