diff options
Diffstat (limited to 'usr/src/tools/scripts')
-rw-r--r-- | usr/src/tools/scripts/cddlchk.py | 2 | ||||
-rw-r--r-- | usr/src/tools/scripts/copyrightchk.py | 2 | ||||
-rw-r--r-- | usr/src/tools/scripts/git-pbchk.py | 13 | ||||
-rw-r--r-- | usr/src/tools/scripts/hdrchk.py | 2 | ||||
-rw-r--r-- | usr/src/tools/scripts/hg-active.py | 2 | ||||
-rw-r--r-- | usr/src/tools/scripts/mapfilechk.py | 2 | ||||
-rw-r--r-- | usr/src/tools/scripts/nightly.sh | 38 | ||||
-rw-r--r-- | usr/src/tools/scripts/validate_pkg.py | 2 | ||||
-rw-r--r-- | usr/src/tools/scripts/webrev.sh | 8 | ||||
-rw-r--r-- | usr/src/tools/scripts/wsdiff.py | 2 |
10 files changed, 28 insertions, 45 deletions
diff --git a/usr/src/tools/scripts/cddlchk.py b/usr/src/tools/scripts/cddlchk.py index 816d2f33a7..ad6a6e6f56 100644 --- a/usr/src/tools/scripts/cddlchk.py +++ b/usr/src/tools/scripts/cddlchk.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2.6 +#!ON_PYTHON_26 # # CDDL HEADER START # diff --git a/usr/src/tools/scripts/copyrightchk.py b/usr/src/tools/scripts/copyrightchk.py index 210ef1b46c..f778947bfc 100644 --- a/usr/src/tools/scripts/copyrightchk.py +++ b/usr/src/tools/scripts/copyrightchk.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2.6 +#!ON_PYTHON_26 # # CDDL HEADER START # diff --git a/usr/src/tools/scripts/git-pbchk.py b/usr/src/tools/scripts/git-pbchk.py index 656e22f6b4..82a63df70a 100644 --- a/usr/src/tools/scripts/git-pbchk.py +++ b/usr/src/tools/scripts/git-pbchk.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2.6 +#!ON_PYTHON_26 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 @@ -17,6 +17,7 @@ # # Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright 2008, 2012 Richard Lowe +# Copyright (c) 2013, Joyent Inc. All rights reserved. # import getopt @@ -28,10 +29,6 @@ import tempfile from cStringIO import StringIO -# This is necessary because, in a fit of pique, we used hg-format ignore lists -# for NOT files. -from mercurial import ignore - # # Adjust the load path based on our location and the version of python into # which it is being loaded. This assumes the normal onbld directory @@ -47,6 +44,7 @@ sys.path.insert(1, os.path.join(os.path.dirname(__file__), "..", "lib", # sys.path.insert(2, os.path.join(os.path.dirname(__file__), "..")) +from onbld.Scm import Ignore from onbld.Checks import Comments, Copyright, CStyle, HdrChk from onbld.Checks import JStyle, Keywords, Mapfile @@ -177,10 +175,7 @@ def not_check(root, cmd): ignorefiles = filter(os.path.exists, [os.path.join(root, ".git", "%s.NOT" % cmd), os.path.join(root, "exception_lists", cmd)]) - if len(ignorefiles) > 0: - return ignore.ignore(root, ignorefiles, sys.stderr.write) - else: - return lambda x: False + return Ignore.ignore(root, ignorefiles) def gen_files(root, parent, paths, exclude): diff --git a/usr/src/tools/scripts/hdrchk.py b/usr/src/tools/scripts/hdrchk.py index 84acbc8616..aa62f7b090 100644 --- a/usr/src/tools/scripts/hdrchk.py +++ b/usr/src/tools/scripts/hdrchk.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2.6 +#!ON_PYTHON_26 # # CDDL HEADER START # diff --git a/usr/src/tools/scripts/hg-active.py b/usr/src/tools/scripts/hg-active.py index 88394e98e5..23f6c7cd98 100644 --- a/usr/src/tools/scripts/hg-active.py +++ b/usr/src/tools/scripts/hg-active.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2.6 +#!ON_PYTHON_26 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 diff --git a/usr/src/tools/scripts/mapfilechk.py b/usr/src/tools/scripts/mapfilechk.py index 9cf2000c7a..ed90d8b426 100644 --- a/usr/src/tools/scripts/mapfilechk.py +++ b/usr/src/tools/scripts/mapfilechk.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2.6 +#!ON_PYTHON_26 # # CDDL HEADER START # diff --git a/usr/src/tools/scripts/nightly.sh b/usr/src/tools/scripts/nightly.sh index 664c05ffa5..87c038452e 100644 --- a/usr/src/tools/scripts/nightly.sh +++ b/usr/src/tools/scripts/nightly.sh @@ -25,6 +25,7 @@ # Copyright 2008, 2010, Richard Lowe # Copyright 2011 Nexenta Systems, Inc. All rights reserved. # Copyright 2012 Joshua M. Clulow <josh@sysmgr.org> +# Copyright 2013 (c) Joyent, Inc. All rights reserved. # # Based on the nightly script from the integration folks, # Mostly modified and owned by mike_s. @@ -413,6 +414,9 @@ function build { rm -rf $PKGARCHIVE >> "$LOGFILE" 2>&1 mkdir -p $PKGARCHIVE >> "$LOGFILE" 2>&1 + /bin/time $MAKE -e stage-licenses 2>&1 | \ + tee -a $SRC/$d/${INSTALLOG}.out >> $LOGFILE + for d in pkg pkgdefs; do if [ ! -f "$SRC/$d/Makefile" ]; then continue @@ -1172,38 +1176,16 @@ elif [[ ! -x "$MAKE" ]]; then fi # get the dmake version string alone DMAKE_VERSION=$( $MAKE -v ) -DMAKE_VERSION=${DMAKE_VERSION#*: } -# focus in on just the dotted version number alone -DMAKE_MAJOR=$( echo $DMAKE_VERSION | \ - sed -e 's/.*\<\([^.]*\.[^ ]*\).*$/\1/' ) -# extract the second (or final) integer -DMAKE_MINOR=${DMAKE_MAJOR#*.} -DMAKE_MINOR=${DMAKE_MINOR%%.*} -# extract the first integer -DMAKE_MAJOR=${DMAKE_MAJOR%%.*} -CHECK_DMAKE=${CHECK_DMAKE:-y} -# x86 was built on the 12th, sparc on the 13th. -if [ "$CHECK_DMAKE" = "y" -a \ - "$DMAKE_VERSION" != "Sun Distributed Make 7.3 2003/03/12" -a \ - "$DMAKE_VERSION" != "Sun Distributed Make 7.3 2003/03/13" -a \( \ - "$DMAKE_MAJOR" -lt 7 -o \ - "$DMAKE_MAJOR" -eq 7 -a "$DMAKE_MINOR" -lt 4 \) ]; then - if [ -z "$DMAKE_VERSION" ]; then - echo "$MAKE is missing." - exit 1 - fi - echo `whence $MAKE`" version is:" - echo " ${DMAKE_VERSION}" +# Admittedly not the best check, but better than the old one. +if ! echo $DMAKE_VERSION | grep -q rm; then cat <<EOF - -This version may not be safe for use. Either set TEAMWARE to a better -path or (if you really want to use this version of dmake anyway), add -the following to your environment to disable this check: - - CHECK_DMAKE=n +The version of dmake you are using ($DMAKE_VERSION) is not the current open +source version for building illumos. Please ensure that you are building +illumos-joyent with the latest version of dmake in illumos-extra. EOF exit 1 fi + export PATH export MAKE diff --git a/usr/src/tools/scripts/validate_pkg.py b/usr/src/tools/scripts/validate_pkg.py index 2ac1e009d0..5bf8bd84f2 100644 --- a/usr/src/tools/scripts/validate_pkg.py +++ b/usr/src/tools/scripts/validate_pkg.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2.6 +#!ON_PYTHON_26 # # CDDL HEADER START # diff --git a/usr/src/tools/scripts/webrev.sh b/usr/src/tools/scripts/webrev.sh index 7df8aa8b52..e3c1631c1b 100644 --- a/usr/src/tools/scripts/webrev.sh +++ b/usr/src/tools/scripts/webrev.sh @@ -3057,7 +3057,12 @@ done # # Output directory. # -WDIR=${WDIR:-$CWS/webrev} +if [[ $SCM_MODE == "git" ]]; then + ws_top_dir=$(dirname $CWS) + WDIR=${WDIR:-$ws_top_dir/webrev} +else + WDIR=${WDIR:-$CWS/webrev} +fi # # Name of the webrev, derived from the workspace name or output directory; @@ -3685,6 +3690,7 @@ do if [[ $SCM_MODE == "teamware" || $SCM_MODE == "mercurial" || + $SCM_MODE == "git" || $SCM_MODE == "unknown" ]]; then # Include warnings for important file mode situations: diff --git a/usr/src/tools/scripts/wsdiff.py b/usr/src/tools/scripts/wsdiff.py index 5156f03c20..b485a143a3 100644 --- a/usr/src/tools/scripts/wsdiff.py +++ b/usr/src/tools/scripts/wsdiff.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2.6 +#!ON_PYTHON_26 # # CDDL HEADER START # |