From 1075c7fec851830026f08214404e368a0ec0171c Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 8 May 2009 18:46:56 +0000 Subject: [PATCH] -Fixup build information git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3329 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- buildcore.sh | 6 +++++- makeperlxcatrpm | 2 ++ perl-xCAT/modifyUtils | 5 ++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/buildcore.sh b/buildcore.sh index 56f8555e8..516d553d9 100755 --- a/buildcore.sh +++ b/buildcore.sh @@ -46,9 +46,13 @@ else pkg="packages" fi +BUILDIT=0 if [ -z "$SVNUP" ]; then SVNUP=../coresvnup svn up > $SVNUP + if ! grep 'At revision' $SVNUP; then + BUILDIT=1 + fi fi if $GREP xCAT-client $SVNUP; then @@ -59,7 +63,7 @@ if $GREP xCAT-client $SVNUP; then mv /usr/src/$pkg/RPMS/noarch/xCAT-client-$VER*rpm $DESTDIR/ mv /usr/src/$pkg/SRPMS/xCAT-client-$VER*rpm $SRCDIR/ fi -if $GREP perl-xCAT $SVNUP; then +if [ $BUILDIT eq 1 ]; then #$GREP perl-xCAT $SVNUP; then UPLOAD=1 ./makeperlxcatrpm rm -f $DESTDIR/perl-xCAT*rpm diff --git a/makeperlxcatrpm b/makeperlxcatrpm index 933ad77bf..7004d776b 100755 --- a/makeperlxcatrpm +++ b/makeperlxcatrpm @@ -33,7 +33,9 @@ else set -x + svn info > perl-xCAT/.svninfo tar --exclude .svn -czhf /usr/src/$pkg/SOURCES/perl-xCAT-$VER.tar.gz perl-xCAT; + rm perl-xCAT/.svninfo rm -f /usr/src/$pkg/SRPMS/perl-xCAT-$VER*rpm /usr/src/$pkg/RPMS/noarch/perl-xCAT-$VER*rpm rpmbuild -ta /usr/src/$pkg/SOURCES/perl-xCAT-$VER.tar.gz diff --git a/perl-xCAT/modifyUtils b/perl-xCAT/modifyUtils index 0740a5842..f750d8e0e 100755 --- a/perl-xCAT/modifyUtils +++ b/perl-xCAT/modifyUtils @@ -10,6 +10,9 @@ VER=$1 SVNINFO=`svn info 2>/dev/null|grep Revision` #/bin/echo -e $SVNINFO +if [ $? -ne 0 -a -f .svninfo ]; then + SVNINFO=`cat .svninfo 2>/dev/null|grep Revision` +fi if [ $? -eq 0 ] then SVNREF="svn r"`echo $SVNINFO|awk '{print $2}'`", " @@ -25,4 +28,4 @@ then mv xCAT/Utils.pm.new xCAT/Utils.pm else sed -i -e s/"#XCATVERSIONSUBHERE"/". '$VER'"/ -e s/"#XCATSVNBUILDSUBHERE"/". ' (${SVNREF}built $BUILDDATE)'"/ xCAT/Utils.pm -fi \ No newline at end of file +fi