]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
Accept @. in tags
authorKacper Kornet <draenog@pld-linux.org>
Fri, 29 Jun 2012 23:04:19 +0000 (00:04 +0100)
committerKacper Kornet <draenog@pld-linux.org>
Sat, 30 Jun 2012 14:10:47 +0000 (15:10 +0100)
Git accepts tags with these characters. However the tags in which
they were exchanged to _# still need to be checked for presence.
Otherwise it would be possible to built the same package from two
revisions: once in CVS, once in git.

builder.sh

index edc1fac45662656f3130a20d52d037d3b731cb16..365719747cc2940eb36158fbf223859bdeef249f 100755 (executable)
@@ -1339,16 +1339,16 @@ make_tagver() {
        fi
 
        # NOTE: CVS tags may must not contain the characters `$,.:;@'
-       TAGVER=$(echo $TAG_PREFIX$PACKAGE_NAME-$PACKAGE_VERSION-$PACKAGE_RELEASE | tr '[.@]' '[_#]')
+       TAGVER=$(echo $TAG_PREFIX$PACKAGE_NAME-$PACKAGE_VERSION-$PACKAGE_RELEASE)
 
-       # Remove #kernel.version_release from TAGVER because tagging sources
+       # Remove @kernel.version_release from TAGVER because tagging sources
        # could occur with different kernel-headers than kernel-headers used at build time.
        # besides, %{_kernel_ver_str} is not expanded.
 
-       # TAGVER=auto-ac-madwifi-ng-0-0_20070225_1#%{_kernel_ver_str}
+       # TAGVER=auto-ac-madwifi-ng-0-0_20070225_1@%{_kernel_ver_str}
        # TAGVER=auto-ac-madwifi-ng-0-0_20070225_1
 
-       TAGVER=${TAGVER%#*}
+       TAGVER=${TAGVER%@*}
        echo -n "$TAGVER"
 }
 
@@ -2468,6 +2468,8 @@ case "$COMMAND" in
                if [ -n "$TEST_TAG" ]; then
                        local TAGVER=`make_tagver`
                        tag_exist $TAGVER
+                       # check also tags created in CVS
+                       tag_exist $(echo $TAGVER | tr '[.@]' '[_#]')
                        # - do not allow to build from HEAD when XX-branch exists
                        TREE_PREFIX=$(echo "$TAG_PREFIX" | sed -e 's#^auto/\([a-zA-Z]\+\)/.*#\1#g')
                        if [ "$TREE_PREFIX" != "$TAG_PREFIX" ]; then
This page took 0.683266 seconds and 4 git commands to generate.