[PATCH] Make compose scripts accept an environment argument.

Ralph Bean rbean at redhat.com
Wed Oct 29 13:38:19 UTC 2014


We can use this argument as a general switch to toggle behaviors in the
subprocesses.  An example of how to use this with
scripts/block_retired.py is present, but we'll need to make more changes
like it before composes in staging are possible start-to-finish.
---
 scripts/buildbranched | 12 +++++++++++-
 scripts/buildrawhide  | 12 +++++++++++-
 2 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/scripts/buildbranched b/scripts/buildbranched
index fd6ef49..450bf43 100755
--- a/scripts/buildbranched
+++ b/scripts/buildbranched
@@ -7,6 +7,7 @@
 
 DATE=$1
 ARCH=$2
+ENVIRONMENT=$3
 
 BRANCHED="21"
 DIST=branched
@@ -39,6 +40,10 @@ RSYNCPREFIX=""
 MOCKCONFIG="fedora-${DIST}-compose-ppc64"
 
 }
+
+[ -n "$ENVIRONMENT" ] && {
+ENVIRONMENT='production';
+}
  
 RSYNC_OPTS="-rlptDHhv --delay-updates"
 DESTPATH="$TREEPREFIX/development/$BRANCHED/"
@@ -83,7 +88,12 @@ log "started"
 send_fedmsg start start
 
 log "blocking retired packages"
-./scripts/block_retired.py
+if [ "$ENVIRONMENT" == "production" ]; then
+    ./scripts/block_retired.py
+else
+    ./scripts/block_retired.py  --staging
+fi
+
 
 log "git clone of comps started"
 pushd $TMPDIR
diff --git a/scripts/buildrawhide b/scripts/buildrawhide
index 31c789f..96cb74a 100755
--- a/scripts/buildrawhide
+++ b/scripts/buildrawhide
@@ -7,6 +7,7 @@
 
 DATE=$1
 ARCH=$2
+ENVIRONMENT=$3
 
 BRANCHED=rawhide
 DIST=rawhide
@@ -39,6 +40,10 @@ RSYNCPREFIX=""
 MOCKCONFIG="fedora-${DIST}-compose-ppc64"
 
 }
+
+[ -n "$ENVIRONMENT" ] && {
+ENVIRONMENT='production';
+}
  
 RSYNC_OPTS="-rlptDHhv --delay-updates"
 DESTPATH="$TREEPREFIX/development/$BRANCHED/"
@@ -83,7 +88,12 @@ log "started"
 send_fedmsg start start
 
 log "blocking retired packages"
-./scripts/block_retired.py
+if [ "$ENVIRONMENT" == "production" ]; then
+    ./scripts/block_retired.py
+else
+    ./scripts/block_retired.py  --staging
+fi
+
 
 log "git clone of comps started"
 pushd $TMPDIR
-- 
1.9.3



More information about the rel-eng mailing list