[PATCH 6/9] Assume that a bunch of digits in a version number is a timestamp

David Shea dshea at redhat.com
Thu Feb 5 14:20:52 UTC 2015


This ensures that the behavior of the timestamp test doesn't change on
January 1st and doesn't depend on the time zone.
---
 pyanaconda/packaging/__init__.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/pyanaconda/packaging/__init__.py b/pyanaconda/packaging/__init__.py
index 91343db..21c6da1 100644
--- a/pyanaconda/packaging/__init__.py
+++ b/pyanaconda/packaging/__init__.py
@@ -395,7 +395,9 @@ class Payload(object):
             except ConfigParser.Error:
                 pass
 
-        if version.startswith(time.strftime("%Y")):
+        # If the version looks like a timestamp, assume it's rawhide
+        # plz change before Fedora version 9999999
+        if version[:8].isdigit():
             version = "rawhide"
 
         log.debug("got a release version of %s", version)
-- 
2.1.0



More information about the anaconda-patches mailing list