summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVratislav Podzimek <vpodzime@redhat.com>2013-02-12 12:08:54 +0100
committerVratislav Podzimek <vpodzime@redhat.com>2013-02-13 13:05:37 +0100
commit2b9a7579e64cd02e1a0defaf941d33a4bb5265f0 (patch)
treea4743ecd46a23aeb2c8aba585f514e842d38643a
parent278a674cb754fa6f31283416b21a813d50a4cddf (diff)
downloadanaconda-2b9a7579e64cd02e1a0defaf941d33a4bb5265f0.tar.gz
anaconda-2b9a7579e64cd02e1a0defaf941d33a4bb5265f0.tar.xz
anaconda-2b9a7579e64cd02e1a0defaf941d33a4bb5265f0.zip
Use ksdata.addons instead of ksdata.addon and add ADDON_PATHS to sys.path
'ksdata.addons' makes more sense than 'ksdata.addon' since it is a root of the tree where addons live. ADDON_PATHS are needed in sys.path so that imports in addons' sources work.
-rwxr-xr-xanaconda4
-rw-r--r--pyanaconda/addons.py2
-rw-r--r--pyanaconda/install.py4
-rw-r--r--pyanaconda/kickstart.py8
4 files changed, 11 insertions, 7 deletions
diff --git a/anaconda b/anaconda
index 5c0976878..d63d431c1 100755
--- a/anaconda
+++ b/anaconda
@@ -300,6 +300,10 @@ def setupPythonPath():
# First add our updates path
sys.path.insert(0, '/tmp/updates/')
+ from pyanaconda.constants import ADDON_PATHS
+ # append ADDON_PATHS dirs at the end
+ sys.path.extend(ADDON_PATHS)
+
def setupEnvironment():
# Silly GNOME stuff
if os.environ.has_key('HOME') and not os.environ.has_key("XAUTHORITY"):
diff --git a/pyanaconda/addons.py b/pyanaconda/addons.py
index 4d817489b..2500f25a5 100644
--- a/pyanaconda/addons.py
+++ b/pyanaconda/addons.py
@@ -148,7 +148,7 @@ class AddonSection(Section):
if not self.addon_id:
return
- addon = getattr(self.handler.addon, self.addon_id)
+ addon = getattr(self.handler.addons, self.addon_id)
addon.handle_line(line)
def handleHeader(self, lineno, args):
diff --git a/pyanaconda/install.py b/pyanaconda/install.py
index b1d3a1dd5..59356a571 100644
--- a/pyanaconda/install.py
+++ b/pyanaconda/install.py
@@ -80,7 +80,7 @@ def doConfiguration(storage, payload, ksdata, instClass):
ksdata.user.execute(storage, ksdata, instClass, u)
with progress_report(_("Configuring addons")):
- ksdata.addon.execute(storage, ksdata, instClass, u)
+ ksdata.addons.execute(storage, ksdata, instClass, u)
ksdata.configured_spokes.execute(storage, ksdata, instClass, u)
with progress_report(_("Running post install scripts")):
@@ -113,7 +113,7 @@ def doInstall(storage, payload, ksdata, instClass):
progress.send_init(steps)
with progress_report(_("Setting up the install environment")):
- ksdata.addon.setup(storage, ksdata, instClass)
+ ksdata.addons.setup(storage, ksdata, instClass)
# Do partitioning.
payload.preStorage()
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index c2249f675..83ac6af41 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -1402,13 +1402,13 @@ class AnacondaKSHandler(superclass):
# Prepare the structure to track configured spokes
self.configured_spokes = SpokeRegistry()
-
+
# Prepare the final structures for 3rd party addons
- self.addon = AddonRegistry(addons)
+ self.addons = AddonRegistry(addons)
def __str__(self):
- return superclass.__str__(self) + "\n" + str(self.addon)
-
+ return superclass.__str__(self) + "\n" + str(self.addons)
+
class AnacondaPreParser(KickstartParser):
# A subclass of KickstartParser that only looks for %pre scripts and
# sets them up to be run. All other scripts and commands are ignored.