Re: Package-specific test case and critical path test case project: drafts for review

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
-- 
test mailing list
test@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe: 
https://admin.fedoraproject.org/mailman/listinfo/test


[Index of Archives]     [Fedora Desktop]     [Fedora SELinux]     [Photo Sharing]     [Yosemite Forum]     [KDE Users]

  Powered by Linux