[haiku-commits] haiku: hrev47292 - in build: jam scripts

  • From: zooey@xxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 31 May 2014 15:35:41 +0200 (CEST)

hrev47292 adds 1 changeset to branch 'master'
old head: e1594b177542fdd817e8d1918f3435da73d0d750
new head: d4563ace7249976077d803b82397ab72af9bfe74
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=d4563ac+%5Ee1594b1

----------------------------------------------------------------------------

d4563ac: Improve handling of Haiku clone without any tags.
  
  * Error out early with a hint about how to solve the problem (by setting
    HAIKU_REVISION explicitly).

                                    [ Oliver Tappe <zooey@xxxxxxxxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev47292
Commit:      d4563ace7249976077d803b82397ab72af9bfe74
URL:         http://cgit.haiku-os.org/haiku/commit/?id=d4563ac
Author:      Oliver Tappe <zooey@xxxxxxxxxxxxxxx>
Date:        Sat May 31 13:32:44 2014 UTC

----------------------------------------------------------------------------

2 files changed, 11 insertions(+), 3 deletions(-)
build/jam/FileRules                    | 8 +++++++-
build/scripts/determine_haiku_revision | 6 ++++--

----------------------------------------------------------------------------

diff --git a/build/jam/FileRules b/build/jam/FileRules
index ec309c4..22b9eb0 100644
--- a/build/jam/FileRules
+++ b/build/jam/FileRules
@@ -373,7 +373,7 @@ rule DetermineHaikuRevision
        # root directory, so it gets updated when the revision changes due to
        # commits or merges.
        local gitIndex = <haiku-rootdir-git>index ;
-       local revisionFile = <haiku-rootdir-git>haiku-revision ;
+       local revisionFile = <haiku-rootdir>haiku-revision ;
        if ! [ on $(gitIndex) return $(HAIKU_GIT_REVISION_DETERMINED) ] {
                HAIKU_GIT_REVISION_DETERMINED on $(gitIndex) = 1 ;
                MakeLocate $(revisionFile) : $(HAIKU_BUILD_OUTPUT_DIR) ;
@@ -424,6 +424,12 @@ rule DetermineEffectiveHaikuRevision
 actions DetermineEffectiveHaikuRevision1
 {
        revision=`sed -n 's,^\(hrev[0-9]*\).*,\1,p' "$(2:E=unknown-revision)"`
+       if [ -z "$revision" ]; then
+               echo "Error: unable to determine the effective Haiku revision."
+               echo "       If you are using a Haiku clone without tags, you 
can set"
+               echo "       the revision tag to use with e.g. 
HAIKU_REVISION=hrev43210"
+               exit 1
+       fi
        echo "${revision:-0}" > "$(1)"
 }
 
diff --git a/build/scripts/determine_haiku_revision 
b/build/scripts/determine_haiku_revision
index 465180a..0796c8c 100755
--- a/build/scripts/determine_haiku_revision
+++ b/build/scripts/determine_haiku_revision
@@ -31,8 +31,10 @@ if [ -z "$revision" -o "$lastBuiltRevision" != "$localRev" 
]; then
        # last reachable hrev-(haiku-revision-)tag
        revision=`git describe --dirty --tags --match=hrev*`
        if [ -z "$revision" ]; then
-               # failed to find any hrev tags, use short hash instead
-               revision=`git rev-parse --short HEAD`
+               # failed to find any hrev tags, bail out
+               echo "Error: you are using a Haiku clone without tags, please 
set"
+               echo "       the revision tag to use (e.g. 
HAIKU_REVISION=hrev43210)"
+               exit 1
        elif echo "$revision" | grep -- '-' >/dev/null; then
                # HEAD is not directly a changeset from Haiku's central repo, 
so we
                # add the current branch name as additional info


Other related posts:

  • » [haiku-commits] haiku: hrev47292 - in build: jam scripts - zooey