[PATCH] Change IsBeta to IsFinal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When doing composes pungi (and lorax) uses a flag --isfinal, to set
a final release, otherwise it is considered a beta release by default.

This patch makes the final vs beta more consistent with the composes.
---
 data/liveinst/liveinst                |    4 ++--
 loader/loader.c                       |    2 +-
 pyanaconda/constants.py               |    2 +-
 pyanaconda/installclass.py            |    2 +-
 pyanaconda/product.py                 |    4 ++--
 pyanaconda/yuminstall.py              |    6 +++---
 tests/pyanaconda_test/product_test.py |   10 +++++-----
 7 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/data/liveinst/liveinst b/data/liveinst/liveinst
index b831d5c..a7c1a8e 100755
--- a/data/liveinst/liveinst
+++ b/data/liveinst/liveinst
@@ -73,9 +73,9 @@ export ANACONDA_BUGURL=${ANACONDA_BUGURL:="https://bugzilla.redhat.com/bugzilla/
 
 RELEASE=$(rpm -q --qf '%{Release}' fedora-release)
 if [ "${RELEASE:0:2}" = "0." ]; then
-    export ANACONDA_ISBETA="true"
+    export ANACONDA_ISFINAL="false"
 else
-    export ANACONDA_ISBETA="false"
+    export ANACONDA_ISFINAL="true"
 fi
 
 export PATH=/sbin:/usr/sbin:$PATH
diff --git a/loader/loader.c b/loader/loader.c
index ec07b78..374ab63 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -278,7 +278,7 @@ static gchar *productArch = NULL;
  *
  * [Main]
  * BugURL=http://bugzilla.redhat.com
- * IsBeta=true|false
+ * IsFinal=true|false
  * Product=<name of the product - Fedora, RHEL, etc.>
  * UUID=<time and date stamp, then a dot, then the architecture>
  * Version=<version of the product - 6.0, 14, etc.>
diff --git a/pyanaconda/constants.py b/pyanaconda/constants.py
index 41e9afe..3197914 100644
--- a/pyanaconda/constants.py
+++ b/pyanaconda/constants.py
@@ -62,7 +62,7 @@ productName = product.productName
 productVersion = product.productVersion
 productArch = product.productArch
 bugzillaUrl = product.bugUrl
-isBeta = product.isBeta
+isFinal = product.isFinal
 
 lvmErrorOutput = "/tmp/lvmout"
 
diff --git a/pyanaconda/installclass.py b/pyanaconda/installclass.py
index 9ac9273..4c599d1 100644
--- a/pyanaconda/installclass.py
+++ b/pyanaconda/installclass.py
@@ -123,7 +123,7 @@ class BaseInstallClass(object):
 		 "complete"
 		)
 
-	if not isBeta:
+	if isFinal:
 	    dispatch.skip_steps("betanag")
 
         if iutil.isEfi() or not iutil.isX86():
diff --git a/pyanaconda/product.py b/pyanaconda/product.py
index ad17afb..c269b3e 100644
--- a/pyanaconda/product.py
+++ b/pyanaconda/product.py
@@ -26,7 +26,7 @@ config = ConfigParser.ConfigParser()
 config.add_section("Main")
 config.set("Main", "Arch", os.environ.get("ANACONDA_PRODUCTARCH", os.uname()[4]))
 config.set("Main", "BugURL", os.environ.get("ANACONDA_BUGURL", "your distribution provided bug reporting tool"))
-config.set("Main", "IsBeta", os.environ.get("ANACONDA_ISBETA", "true"))
+config.set("Main", "IsFinal", os.environ.get("ANACONDA_ISFINAL", "false"))
 config.set("Main", "Product", os.environ.get("ANACONDA_PRODUCTNAME", "anaconda"))
 config.set("Main", "UUID", "")
 config.set("Main", "Version", os.environ.get("ANACONDA_PRODUCTVERSION", "bluesky"))
@@ -36,7 +36,7 @@ config.read(["/tmp/product/.buildstamp", "/.buildstamp", os.environ.get("PRODBUI
 
 # Set up some variables we import throughout, applying a couple transforms as necessary.
 bugUrl = config.get("Main", "BugURL")
-isBeta = config.getboolean("Main", "isBeta")
+isFinal = config.getboolean("Main", "IsFinal")
 productArch = config.get("Main", "Arch")
 productName = config.get("Main", "Product")
 productStamp = config.get("Main", "UUID")
diff --git a/pyanaconda/yuminstall.py b/pyanaconda/yuminstall.py
index 355c427..26c3c46 100644
--- a/pyanaconda/yuminstall.py
+++ b/pyanaconda/yuminstall.py
@@ -48,7 +48,7 @@ from yum.Errors import *
 from yum.misc import to_unicode
 from yum.yumRepo import YumRepository
 from backend import AnacondaBackend
-from product import isBeta, productName, productVersion, productStamp
+from product import isFinal, productName, productVersion, productStamp
 from constants import *
 from image import *
 from compssort import *
@@ -565,12 +565,12 @@ class AnacondaYum(yum.YumBase):
             raise RepoError, "Repo %s contains -source or -debuginfo, excluding" % name
 
         # this is a little hard-coded, but it's effective
-        if not isBeta and ("rawhide" in repo.id or "development" in repo.id):
+        if isFinal 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 isBeta and not repo.enabled:
+        if not isFinal and not repo.enabled:
             name = repo.name
             del(repo)
             raise RepoError, "Excluding disabled repo %s for prerelease" % name
diff --git a/tests/pyanaconda_test/product_test.py b/tests/pyanaconda_test/product_test.py
index f8b2e0c..5be51d3 100644
--- a/tests/pyanaconda_test/product_test.py
+++ b/tests/pyanaconda_test/product_test.py
@@ -21,7 +21,7 @@ class ProductTest(mock.TestCase):
 
         # fake /tmp/product/.buildstamp file
         self.BUGURL = 'http://bug.url'
-        self.BETA = 'true'
+        self.FINAL = 'false'
         self.ARCH = 'i386'
         self.NAME = '__anaconda'
         self.UUID = '123456.%s' % self.ARCH
@@ -30,12 +30,12 @@ class ProductTest(mock.TestCase):
         self.FILE = \
         "[Main]\n"\
         "BugURL: %s\n"\
-        "IsBeta: %s\n"\
+        "IsFinal: %s\n"\
         "Arch: %s\n"\
         "Product: %s\n"\
         "UUID: %s\n"\
         "Version: %s\n" % \
-        (self.BUGURL, self.BETA, self.ARCH, self.NAME, self.UUID, self.VERSION)
+        (self.BUGURL, self.FINAL, self.ARCH, self.NAME, self.UUID, self.VERSION)
 
         self.fs.open(self.FILENAME, 'w').write(self.FILE)
 
@@ -53,10 +53,10 @@ class ProductTest(mock.TestCase):
         import pyanaconda.product
         self.assertEqual(pyanaconda.product.bugUrl, self.BUGURL)
 
-    def is_beta_test(self):
+    def is_final_test(self):
         sys.modules['os'].access = mock.Mock(return_value=True)
         import pyanaconda.product
-        self.assertTrue(pyanaconda.product.isBeta)
+        self.assertFalse(pyanaconda.product.isFinal)
 
     def product_arch_test(self):
         sys.modules['os'].access = mock.Mock(return_value=True)
-- 
1.7.3.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux