]> TLD Linux GIT Repositories - tld-builder.git/commitdiff
- TLD uses pkgrevs, not git tags
authorMarcin Krol <hawk@tld-linux.org>
Thu, 28 Jul 2016 17:27:22 +0000 (19:27 +0200)
committerMarcin Krol <hawk@tld-linux.org>
Thu, 28 Jul 2016 17:27:22 +0000 (19:27 +0200)
client/make-request.sh

index e3fa52de698e842e3ce4d8d630a1a31dbe7215ea..2c753c9b88de497539cb098bbad4a459cab60d38 100755 (executable)
@@ -196,7 +196,7 @@ autotag() {
 # 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
@@ -205,16 +205,13 @@ get_autotag() {
                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
 }