summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2006-05-08 20:22:44 +0000
committerChris Lumens <clumens@redhat.com>2006-05-08 20:22:44 +0000
commitca81cbae17d38cb178917562f8ffef43da8ce183 (patch)
tree6fbbe7b572e326fb5a1803d31271cc3bf63ee299
parent8fa1f968a830b687e9f071aaeb2721844b84dd12 (diff)
downloadanaconda-ca81cbae17d38cb178917562f8ffef43da8ce183.tar.gz
anaconda-ca81cbae17d38cb178917562f8ffef43da8ce183.tar.xz
anaconda-ca81cbae17d38cb178917562f8ffef43da8ce183.zip
Use productStamp in default repoid to prevent collisions with whatever other
people come up with.
-rw-r--r--ChangeLog5
-rw-r--r--product.py3
-rw-r--r--yuminstall.py4
3 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 37dfdfd64..a014f2659 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,6 +16,11 @@
* exception.py (handleException): Fix traceback in exception handler
for cmdline mode.
+ * product.py: Add productStamp.
+
+ * yuminstall.py (AnacondaYumRepo.__init__): Make default repo id use
+ product stamp to prevent collisions.
+
2006-05-08 David Cantrell <dcantrell@redhat.com>
* loader2/net.c: Changes to inet_pton() and stuff preparing for IPv6
diff --git a/product.py b/product.py
index 0372c658c..970a1164c 100644
--- a/product.py
+++ b/product.py
@@ -22,7 +22,7 @@ elif os.environ.has_key("PRODBUILDPATH") and \
else:
path = None
-
+productStamp = ""
productName = "anaconda"
productVersion = "bluesky"
productPath = "anaconda"
@@ -32,6 +32,7 @@ if path is not None:
f = open(path, "r")
lines = f.readlines()
if len(lines) >= 3:
+ productStamp = lines[0][:-1]
productName = lines[1][:-1]
productVersion = lines[2][:-1]
if len(lines) >= 4:
diff --git a/yuminstall.py b/yuminstall.py
index 48d070dcc..eb832fa5c 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -31,7 +31,7 @@ from yum.repos import Repository as YumRepository
from repomd.mdErrors import PackageSackError
from installmethod import FileCopyException
from backend import AnacondaBackend
-from product import productName
+from product import productName, productStamp
from sortedtransaction import SplitMediaTransactionData
from genheader import *
from constants import *
@@ -210,7 +210,7 @@ class simpleCallback:
self.progress.processEvents()
class AnacondaYumRepo(YumRepository):
- def __init__( self, uri, repoid='anaconda'):
+ def __init__( self, uri, repoid='anaconda%s' % productStamp):
YumRepository.__init__(self, repoid)
conf = yum.config.RepoConf()
for k, v in conf.iteritems():