# get autotag for specs
# WARNING: This may checkout some files from VCS
get_autotag() {
- local pkg spec rpmdir
+ local atag pkg spec rpmdir
rpmdir=$(rpm -E %_topdir)
for pkg in "$@"; do
pkg=${pkg%:*}
# strip .spec extension
pkg=${pkg%.spec}
- # checkout only if missing
- if [ ! -e $pkg/$pkg.spec ]; then
- $rpmdir/builder -g $pkg -ns -r HEAD 1>&2
- fi
- if [ ! -e $pkg/$pkg.spec ]; then
- # just print it out, to fallback to base pkg name
- echo "$pkg"
+ wget http://pkgrevs.tld-linux.org/list/$pkg -O /tmp/$pkg.tags 1>/dev/null 2>&1
+ atag=$(head -n 1 /tmp/$pkg.tags)
+ rm -f /tmp/$pkg.tags
+ if [ "x$atag" = "x" ]; then
+ echo "$pkg.spec"
else
- cd $pkg
- autotag $pkg.spec
+ echo "$pkg.spec:$atag"
fi
done
}