Pete Zaitcev <zaitcev(a)redhat.com> writes:
On Mon, 23 Apr 2012 14:08:05 -0600
Orion Poplawski <orion(a)cora.nwra.com> wrote:
> %global commit bd245c9
>
> Source0:
>
https://github.com/jukka/pcfi/tarball/%{commit}/jukka-pcfi-%{commit}.tar.gz
>
> %setup -q -n jukka-pcfi-%{commit}
I do not understand how this is supposed to work in the face of
"yum update".
Suppose I cut a package last year:
swift3-1.0.0-878c23.tag.xz
Then I build an RPM:
openstack-swift-plugin-swift3-1.0.0-878c23-1.fc17.noarch.rpm
Today I run the same git-archve and get:
swift3-1.0.0-5c74ba.tag.xz
openstack-swift-plugin-swift3-1.0.0-5c74ba-1.fc18.noarch.rpm
Great, how do I update from the old one to the new one? Please do not
suggest epoch.
DEF_VER='<latest-stable-version>'
if test -d .git -o -f .git &&
VN=$(git describe --tags --match "[0-9]*" --abbrev=4 HEAD 2>/dev/null)
&&
case "$VN" in
*$LF*) (exit 1) ;;
[0-9]*)
git update-index -q --refresh
test -z "$(git diff-index --name-only HEAD --)" ||
VN="$VN-dirty"
esac
then
VN=$(echo "$VN" | sed -e 's/-/./g');
else
VN="$DEF_VER"
fi
--
Nikola