summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2005-03-29 18:53:09 +0000
committerJeremy Katz <katzj@redhat.com>2005-03-29 18:53:09 +0000
commitc5c389047f0895675c11746b7b8316826f99e4b8 (patch)
treecc677be44e9d17ab88e1b9a3565970e528da17b6
parentc311ba73990340f9036267d41b72c85c77624186 (diff)
downloadanaconda-c5c389047f0895675c11746b7b8316826f99e4b8.tar.gz
anaconda-c5c389047f0895675c11746b7b8316826f99e4b8.tar.xz
anaconda-c5c389047f0895675c11746b7b8316826f99e4b8.zip
2005-03-29 Jeremy Katz <katzj@redhat.com>
* product.py (bugUrl): Clean up .buildstamp reading, read in bug url * constants.py (bugzillaUrl): Make bug url a per-product characteristic. * scripts/buildinstall: Allow passing in bug url on the command line. * scripts/mk-images: Likewise, and use it to populate .buildstamp.
-rw-r--r--ChangeLog8
-rw-r--r--constants.py2
-rw-r--r--product.py23
-rwxr-xr-xscripts/buildinstall16
-rwxr-xr-xscripts/mk-images8
5 files changed, 41 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index 2058ac5e1..1a921d766 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2005-03-29 Jeremy Katz <katzj@redhat.com>
+ * product.py (bugUrl): Clean up .buildstamp reading, read in bug url
+
+ * constants.py (bugzillaUrl): Make bug url a per-product characteristic.
+
+ * scripts/buildinstall: Allow passing in bug url on the command
+ line.
+ * scripts/mk-images: Likewise, and use it to populate .buildstamp.
+
* text.py: Make topline match the loader.
* anaconda: Remove essentially unused config file data code,
diff --git a/constants.py b/constants.py
index 90a362872..d119a32d7 100644
--- a/constants.py
+++ b/constants.py
@@ -68,7 +68,7 @@ import product
productName = product.productName
productVersion = product.productVersion
productPath = product.productPath
-bugzillaUrl = "https://bugzilla.redhat.com/bugzilla/"
+bugzillaUrl = product.bugUrl
exceptionText = _("An unhandled exception has occurred. This "
"is most likely a bug. Please copy the "
diff --git a/product.py b/product.py
index 0a00aba1c..f82c01ca3 100644
--- a/product.py
+++ b/product.py
@@ -19,20 +19,23 @@ elif os.access("/.buildstamp", os.R_OK):
else:
path = None
-if path is None:
- productName = "anaconda"
- productVersion = "bluesky"
- productPath = "Fedora"
-else:
+
+productName = "anaconda"
+productVersion = "bluesky"
+productPath = "anaconda"
+bugUrl = "your distribution provider's bug reporting tool."
+
+if path is not None:
f = open(path, "r")
lines = f.readlines()
- if len(lines) < 4:
- productName = "anaconda"
- productVersion = "bluesky"
- productPath = "Fedora"
- else:
+ if len(lines) >= 3:
productName = lines[1][:-1]
productVersion = lines[2][:-1]
+ if len(lines) >= 4:
productPath = lines[3][:-1]
+ if len(lines) >= 5:
+ bugUrl = lines[4][:-1]
+
+
diff --git a/scripts/buildinstall b/scripts/buildinstall
index c63861adb..d7cf1a204 100755
--- a/scripts/buildinstall
+++ b/scripts/buildinstall
@@ -51,6 +51,10 @@ while [ $# -gt 0 ]; do
DISCSTR=$2
shift; shift
;;
+ --bugurl)
+ BUGURL=$2
+ shift; shift
+ ;;
*)
if [ -n "$DIR" -o ! -d $1/$PRODUCTPATH/RPMS ]; then
usage
@@ -81,6 +85,10 @@ if [ -z "$DISCSTR" ]; then
DISCSTR="1,2,3"
fi
+if [ -z "$BUGURL" ]; then
+ BUGURL="your distribution provider's bug reporting tool."
+fi
+
p=`cd $DIR; /bin/pwd`
if [ -z "$BUILDINSTDIR" ]; then
@@ -127,9 +135,9 @@ rm -rf $BUILDINSTDIR/usr
echo "Going to run buildinstall again"
# run it again for the second half
if [ -x /usr/bin/runroot ]; then
- runroot $COMPNAME --onlyone --arch $BUILDARCH "$BUILDINSTALL $DEBUGSTR --buildinstdir $BUILDINSTDIR --second $PKGORDERSTR --comp $COMPNAME --version $VERSION --release '\"$RELEASESTR\"' --product '\"$PRODUCTSTR\"' --prodpath $PRODUCTPATH --discs '\"$DISCSTR\"' $DIR"
+ runroot $COMPNAME --onlyone --arch $BUILDARCH "$BUILDINSTALL $DEBUGSTR --buildinstdir $BUILDINSTDIR --second $PKGORDERSTR --comp $COMPNAME --version $VERSION --release '\"$RELEASESTR\"' --product '\"$PRODUCTSTR\"' --prodpath $PRODUCTPATH --discs '\"$DISCSTR\"' --bugurl '\"$BUGURL\"' $DIR"
else
- $BUILDINSTALL $DEBUGSTR --buildinstdir $BUILDINSTDIR --second $PKGORDERSTR --comp $COMPNAME --version $VERSION --release "$RELEASESTR" --product "$PRODUCTSTR" --prodpath $PRODUCTPATH --discs "$DISCSTR" $DIR
+ $BUILDINSTALL $DEBUGSTR --buildinstdir $BUILDINSTDIR --second $PKGORDERSTR --comp $COMPNAME --version $VERSION --release "$RELEASESTR" --product "$PRODUCTSTR" --prodpath $PRODUCTPATH --discs "$DISCSTR" --bugurl "$BUGURL" $DIR
fi
rm -rf $BUILDINSTDIR
@@ -155,9 +163,9 @@ fi
echo "Making images..."
if [ -x /usr/bin/runroot ]; then
- runroot $COMPNAME --onlyone --arch $BUILDARCH "cd $BUILDINSTDIR\; ./mk-images $DEBUGSTR $p/$PRODUCTPATH/RPMS $p $TREEDIR/image-template $TREEDIR/instimage $BUILDARCH '\"$PRODUCTSTR\"' $VERSION $PRODUCTPATH"
+ runroot $COMPNAME --onlyone --arch $BUILDARCH "cd $BUILDINSTDIR\; ./mk-images $DEBUGSTR $p/$PRODUCTPATH/RPMS $p $TREEDIR/image-template $TREEDIR/instimage $BUILDARCH '\"$PRODUCTSTR\"' $VERSION $PRODUCTPATH '\"$BUGURL\"'"
else
- $MK_IMAGES $DEBUGSTR $p/$PRODUCTPATH/RPMS $p $TREEDIR/image-template $TREEDIR/instimage $BUILDARCH "$PRODUCTSTR" $VERSION $PRODUCTPATH
+ $MK_IMAGES $DEBUGSTR $p/$PRODUCTPATH/RPMS $p $TREEDIR/image-template $TREEDIR/instimage $BUILDARCH "$PRODUCTSTR" $VERSION $PRODUCTPATH "$BUGURL"
fi
echo "Writing .discinfo file"
diff --git a/scripts/mk-images b/scripts/mk-images
index 66345ad23..857ae923b 100755
--- a/scripts/mk-images
+++ b/scripts/mk-images
@@ -15,11 +15,14 @@ if [ "$1" == "--debug" ]; then
shift
fi
-if [ -z "$1" -o -z "$2" -o -z "$3" -o -z "$4" -o -z "$5" -o -z "$6" -o -z "$7" ]; then usage; fi
+if [ -z "$1" -o -z "$2" -o -z "$3" -o -z "$4" -o -z "$5" -o -z "$6" -o -z "$7" -o -z "$8" ]; then usage; fi
PRODUCT=$6
VERSION=$7
PRODUCTPATH=$8
+if [ -n "$9" ]; then
+ BUGURL=$9
+fi
TOPDIR=$(echo $0 | sed "s,/[^/]*$,,")
if [ $TOPDIR = $0 ]; then
@@ -366,6 +369,9 @@ makeproductfile() {
echo $PRODUCT >> $root/.buildstamp
echo $VERSION >> $root/.buildstamp
echo $PRODUCTPATH >> $root/.buildstamp
+ if [ -n "$BUGURL" ]; then
+ echo $BUGURL >> $root/.buildstamp
+ fi
}
setupShellEnvironment() {