[ooo-build-commit] bin/unpack Makefile.shared

Thorsten Behrens thorsten at kemper.freedesktop.org
Thu Dec 10 05:07:23 PST 2009


 Makefile.shared |    6 ++++--
 bin/unpack      |   14 +++++++-------
 2 files changed, 11 insertions(+), 9 deletions(-)

New commits:
commit c3cea2ed55265f4942ccfb631a2cbbe75ce7a477
Author: Thorsten Behrens <thb at openoffice.org>
Date:   Thu Dec 10 14:04:17 2009 +0100

    More hacking to make <master_branch>-latest work
    
    * Makefile.shared: snarf actual tag from build tree
    * bin/unpack: write .tag file unconditionally

diff --git a/Makefile.shared b/Makefile.shared
index 43922b6..7fa3e87 100644
--- a/Makefile.shared
+++ b/Makefile.shared
@@ -48,7 +48,8 @@ $(STAMP_DIR)/patch.apply : $(top_srcdir)/patches/apply.pl \
 	$(TOOLSDIR)/bin/transform --revert $(TOOLSDIR) $(OOBUILDDIR)
 	test -n "$(OOO_GIT_MANAGED)" && $(TOOLSDIR)/bin/gob --build-dir=$(OOBUILDDIR) prepare || true
 	FLAGS=`$(TOOLSDIR)/bin/applyflags $(TOOLSDIR)/bin` ; \
-	chmod +x $(TOOLSDIR)/patches/apply.pl && $(TOOLSDIR)/patches/apply.pl $(APPLY_DIR) $(OOBUILDDIR) $$FLAGS --tag=$(CVSTAG) ;
+	CURRTAG=$(CVSTAG); test -f $(OOBUILDDIR)/.tag && CURRTAG=`cat $(OOBUILDDIR)/.tag`; \
+	chmod +x $(TOOLSDIR)/patches/apply.pl && $(TOOLSDIR)/patches/apply.pl $(APPLY_DIR) $(OOBUILDDIR) $$FLAGS --tag=$$CURRTAG ;
 	test -n "$(OOO_GIT_MANAGED)" && $(TOOLSDIR)/bin/gob --build-dir=$(OOBUILDDIR) postpare || true
 	$(TOOLSDIR)/bin/transform --apply $(TOOLSDIR) $(OOBUILDDIR)
 	test -n "$(OOO_GIT_MANAGED)" && cd $(OOBUILDDIR) && git commit -am 'Font munging.' || true
@@ -64,7 +65,8 @@ patch.unapply:
 
 patch.list:
 	@FLAGS=`$(TOOLSDIR)/bin/applyflags $(TOOLSDIR)/bin` ; \
-	chmod +x $(TOOLSDIR)/patches/apply.pl && $(TOOLSDIR)/patches/apply.pl $(APPLY_DIR) $(OOBUILDDIR) $$FLAGS --dry-run --quiet --tag=$(CVSTAG)
+	@CURRTAG=$(CVSTAG); test -f $(OOBUILDDIR)/.tag && @CURRTAG=`cat $(OOBUILDDIR)/.tag`; \
+	chmod +x $(TOOLSDIR)/patches/apply.pl && $(TOOLSDIR)/patches/apply.pl $(APPLY_DIR) $(OOBUILDDIR) $$FLAGS --dry-run --quiet --tag=$$CURRTAG
 
 # Build bits:
 
diff --git a/bin/unpack b/bin/unpack
index 522de61..65001b8 100755
--- a/bin/unpack
+++ b/bin/unpack
@@ -37,6 +37,12 @@ check_git_repo()
     tree="$SRCDIR/clone/$1"
     $echo_n "Looking for $GITTAG in $tree ... $echo_c";
     if cd "$tree" >/dev/null 2>&1 ; then
+        # ugly hack to always checkout latest tag of given master
+		if echo $GITTAG | grep LATEST; then
+			GITTAG=`echo $GITTAG | sed 's/_LATEST/*/'`
+			GITTAG=`git tag -l $GITTAG | tail -n1`
+			CVSTAG=`echo $GITTAG | tr '[[:upper:]]_' '[[:lower:]]-' | sed 's/ooo\///'`
+		fi
         if git show $GITTAG >/dev/null 2>&1 ; then
             echo "ok"
         else
@@ -274,12 +280,6 @@ else
         echo "* checking out $CVSTAG in $pkg..."
         (
             cd $tree
-            # ugly hack to always checkout latest tag of given master
-            if echo $GITTAG | grep latest; then
-                GITTAG=`echo $GITTAG | sed 's/_latest/*/'`
-                GITTAG=`git tag -l $GITTAG | tail -n1`
-                CVSTAG=`echo $GITTAG | tr '[[:upper:]]_' '[[:lower:]]-' | sed 's/ooo\///'`
-            fi
             if git show $CVSTAG >/dev/null 2>&1 ; then
                 git checkout $CVSTAG || exit 1
             else
@@ -319,8 +319,8 @@ if test "$ENABLE_CCACHE" = "yes" ; then
     if test "$BUILDDIR/$CVSTAG" != "$OOBUILDDIR" ; then
         mv "$BUILDDIR/$CVSTAG" "$OOBUILDDIR"
     fi
-    echo "$CVSTAG" > "$OOBUILDDIR/.tag"
 fi
+echo "$CVSTAG" > "$OOBUILDDIR/.tag"
 
 echo "Fixing unfortunate snafus"
 cd $BUILDDIR


More information about the ooo-build-commit mailing list