By passing buildinstall --isbeta, this in turn gets passed to mk-images which will then write out IsBeta=true to the .buildstamp file. anaconda can then read that and make the right decision. liveinst has to be different, of course. --- data/liveinst/liveinst | 9 ++++++++- pyanaconda/constants.py | 3 +-- pyanaconda/installclass.py | 2 +- pyanaconda/yuminstall.py | 4 ++-- scripts/buildinstall | 9 +++++++-- scripts/mk-images | 6 ++++++ scripts/mk-images.sparc | 1 + 7 files changed, 26 insertions(+), 8 deletions(-) diff --git a/data/liveinst/liveinst b/data/liveinst/liveinst index b50e9bb..582857d 100755 --- a/data/liveinst/liveinst +++ b/data/liveinst/liveinst @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # Simple script to kick off an install from a live CD # @@ -38,6 +38,13 @@ export ANACONDA_PRODUCTNAME=$( cat /etc/system-release | sed -r -e 's/ *release. export ANACONDA_PRODUCTVERSION=$( cat /etc/system-release | sed -r -e 's/^.* ([0-9\.]+).*$/\1/' ) export ANACONDA_BUGURL=${ANACONDA_BUGURL:="https://bugzilla.redhat.com/bugzilla/"} +PRODVERSION=$(rpm -q --qf '%{Release}' fedora-release) +if [ "${PRODVERSION:0:2}" = "0." ]; then + export ANACONDA_ISBETA="true" +else + export ANACONDA_ISBETA="false" +fi + export PATH=/sbin:/usr/sbin:$PATH if [ -n "$DISPLAY" -a -n "$LANG" ]; then diff --git a/pyanaconda/constants.py b/pyanaconda/constants.py index eed1d49..ea69401 100644 --- a/pyanaconda/constants.py +++ b/pyanaconda/constants.py @@ -24,8 +24,6 @@ import gettext _ = lambda x: gettext.ldgettext("anaconda", x) N_ = lambda x: x -BETANAG = 1 - SELINUX_DEFAULT = 1 DISPATCH_BACK = -1 @@ -68,6 +66,7 @@ productName = product.productName productVersion = product.productVersion productArch = product.productArch bugzillaUrl = product.bugUrl +isBeta = product.isBeta lvmErrorOutput = "/tmp/lvmout" diff --git a/pyanaconda/installclass.py b/pyanaconda/installclass.py index 3c6a579..197f1e7 100644 --- a/pyanaconda/installclass.py +++ b/pyanaconda/installclass.py @@ -117,7 +117,7 @@ class BaseInstallClass(object): "complete" ) - if not BETANAG: + if not isBeta: dispatch.skipStep("betanag", permanent=1) if iutil.isEfi() or not iutil.isX86(): diff --git a/pyanaconda/yuminstall.py b/pyanaconda/yuminstall.py index ef19a90..0e46633 100644 --- a/pyanaconda/yuminstall.py +++ b/pyanaconda/yuminstall.py @@ -641,12 +641,12 @@ class AnacondaYum(YumSorter): raise RepoError, "Repo %s contains -source or -debuginfo, excluding" % name # this is a little hard-coded, but it's effective - if not BETANAG and ("rawhide" in repo.id or "development" in repo.id): + if not isBeta and ("rawhide" in repo.id or "development" in repo.id): name = repo.name del(repo) raise RepoError, "Excluding devel repo %s for non-devel anaconda" % name - if BETANAG and not repo.enabled: + if isBeta and not repo.enabled: name = repo.name del(repo) raise RepoError, "Excluding disabled repo %s for prerelease" % name diff --git a/scripts/buildinstall b/scripts/buildinstall index 8a5f4fa..205a91e 100755 --- a/scripts/buildinstall +++ b/scripts/buildinstall @@ -33,6 +33,7 @@ usage() { } CWD="$(pwd)" +ISBETA="false" while [ $# -gt 0 ]; do case $1 in @@ -87,6 +88,10 @@ while [ $# -gt 0 ]; do MIRRORLIST="$MIRRORLIST $2" shift; shift ;; + --isbeta) + ISBETA="true" + shift + ;; *) if [ -z "$REPO" ]; then @@ -239,8 +244,8 @@ $MK_TREEINFO --family="$PRODUCTSTR" ${VARIANT:+--variant="$VARIANT"} --version=$ # FIXME: need to update mk-images to take the yumconf echo "Making images: $PWD" -echo $MK_IMAGES $DEBUGSTR $NOGRSTR --imgdir $TREEDIR/install --arch $BASEARCH --product "$PRODUCTSTR" --version $VERSION --bugurl "$BUGURL" --output $OUTPUT $yumconf -$MK_IMAGES $DEBUGSTR $NOGRSTR --imgdir $TREEDIR/install --arch $BASEARCH --product "$PRODUCTSTR" --version $VERSION --bugurl "$BUGURL" --output $OUTPUT $yumconf || die "image creation failed" +echo $MK_IMAGES $DEBUGSTR $NOGRSTR --isbeta=$ISBETA --imgdir $TREEDIR/install --arch $BASEARCH --product "$PRODUCTSTR" --version $VERSION --bugurl "$BUGURL" --output $OUTPUT $yumconf +$MK_IMAGES $DEBUGSTR $NOGRSTR --isbeta=$ISBETA --imgdir $TREEDIR/install --arch $BASEARCH --product "$PRODUCTSTR" --version $VERSION --bugurl "$BUGURL" --output $OUTPUT $yumconf || die "image creation failed" echo "Writing .discinfo file" $MK_STAMP --releasestr="$RELEASESTR" --arch=$BASEARCH --discNum="ALL" --outfile=$OUTPUT/.discinfo diff --git a/scripts/mk-images b/scripts/mk-images index a67ef84..dcd4f24 100755 --- a/scripts/mk-images +++ b/scripts/mk-images @@ -32,6 +32,7 @@ usage () { DEBUG="" BUILDARCH=`uname -m` BOOTISO="boot.iso" +ISBETA="false" while [ $# -gt 0 ]; do case $1 in @@ -43,6 +44,10 @@ while [ $# -gt 0 ]; do BOOTISO="" shift ;; + --isbeta) + ISBETA="true" + shift + ;; --arch) BUILDARCH=$2 shift; shift @@ -361,6 +366,7 @@ makeproductfile() { cat > $root/.buildstamp << EOF [Main] BugURL=$BUGURL +IsBeta=$ISBETA Product=$PRODUCT UUID=$IMAGEUUID Version=$VERSION diff --git a/scripts/mk-images.sparc b/scripts/mk-images.sparc index a46eb49..a1cda9f 100644 --- a/scripts/mk-images.sparc +++ b/scripts/mk-images.sparc @@ -40,6 +40,7 @@ makeproductfile() { cat > $root/.buildstamp << EOF [Main] BugURL=$BUGURL +IsBeta=$ISBETA Product=$PRODUCT UUID=$IMAGEUUID Version=$VERSION -- 1.7.1.1 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list