--- tests/pylint/runpylint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/pylint/runpylint.sh b/tests/pylint/runpylint.sh index 8c3e74b..9b771cd 100755 --- a/tests/pylint/runpylint.sh +++ b/tests/pylint/runpylint.sh @@ -80,7 +80,7 @@ fi # run pylint one file / module at a time, otherwise it sometimes gets # confused
pylint-log
-for i in pyanaconda/storage pyanaconda/installclasses/*.py pyanaconda/iw/*.py pyanaconda/textw/*.py pyanaconda/isys/*.py pyanaconda/; do +for i in $(find pyanaconda -type f -name '*py'); do pylint --init-hook='import sys; \ sys.path.insert(1, "pyanaconda/isys/.libs"); \ sys.path.insert(2, "pyanaconda/isys"); \
--- pyanaconda/packaging/__init__.py | 14 +++++----- pyanaconda/packaging/yumpayload.py | 54 ++++++++++++++++++-------------------- 2 files changed, 33 insertions(+), 35 deletions(-)
diff --git a/pyanaconda/packaging/__init__.py b/pyanaconda/packaging/__init__.py index 72eed82..e916b1f 100644 --- a/pyanaconda/packaging/__init__.py +++ b/pyanaconda/packaging/__init__.py @@ -43,6 +43,7 @@ from pyanaconda.constants import * from pyanaconda.flags import flags
from pyanaconda import iutil +from pyanaconda import isys from pyanaconda.iutil import ProxyString, ProxyStringError
from pykickstart.parser import Group @@ -51,6 +52,7 @@ import logging log = logging.getLogger("packaging")
from pyanaconda.errors import * +from pyanaconda.storage.errors import StorageError #from pyanaconda.progress import progress
from pyanaconda.product import productName, productVersion @@ -143,6 +145,7 @@ class Payload(object):
def setup(self, storage): """ Do any payload-specific setup. """ + self.storage = storage raise NotImplementedError()
def preStorage(self): @@ -373,11 +376,11 @@ class Payload(object): if not self._kernelVersionList: import glob try: - from yum.rpmUtils.miscutils import compareVerOnly + import yum except ImportError: cmpfunc = cmp else: - cmpfunc = compareVerOnly + cmpfunc = yum.rpmUtils.miscutils.compareVerOnly
files = glob.glob(ROOT_PATH + "/boot/vmlinuz-*") files.extend(glob.glob(ROOT_PATH + "/boot/efi/EFI/redhat/vmlinuz-*")) @@ -634,16 +637,15 @@ class PackagePayload(Payload): """ A PackagePayload installs a set of packages onto the target system. """ @property def kernelPackages(self): - from pyanaconda.isys import isPaeAvailable kernels = ["kernel"]
- if isPaeAvailable(): + if isys.isPaeAvailable(): kernels.insert(0, "kernel-PAE")
# most ARM systems use platform-specific kernels if iutil.isARM(): - if anaconda.platform.armMachine is not None: - kernels = ["kernel-%s" % anaconda.platform.armMachine] + if self.storage.platform.armMachine is not None: + kernels = ["kernel-%s" % self.storage.platform.armMachine]
return kernels
diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py index 0d8e5cf..97cc1aa 100644 --- a/pyanaconda/packaging/yumpayload.py +++ b/pyanaconda/packaging/yumpayload.py @@ -112,12 +112,10 @@ class YumPayload(PackagePayload): """ Reset this instance to its initial (unconfigured) state. """ from pyanaconda.storage.size import Size
- """ - cdrom: install_device.teardown (INSTALL_TREE) - hd: umount INSTALL_TREE, install_device.teardown (ISO_DIR) - nfs: umount INSTALL_TREE - nfsiso: umount INSTALL_TREE, umount ISO_DIR - """ + # cdrom: install_device.teardown (INSTALL_TREE) + # hd: umount INSTALL_TREE, install_device.teardown (ISO_DIR) + # nfs: umount INSTALL_TREE + # nfsiso: umount INSTALL_TREE, umount ISO_DIR if os.path.ismount(INSTALL_TREE) and not flags.testing: if self.install_device and \ get_mount_device(INSTALL_TREE) == self.install_device.path: @@ -272,7 +270,7 @@ reposdir=%s f.write("proxy=%s\n" % (proxy.noauth_url,)) if proxy.username: f.write("proxy_username=%s\n" % (proxy.username,)) - if proxy_password: + if proxy.password: f.write("proxy_password=%s\n" % (proxy.password,)) except ProxyStringError as e: log.error("Failed to parse proxy for _writeInstallConfig %s: %s" \ @@ -405,20 +403,18 @@ reposdir=%s
# now disable and/or remove any repos that don't make sense for repo in self._yum.repos.repos.values(): - """ Rules for which repos to enable/disable/remove - - - always remove - - source, debuginfo - - disable if isFinal - - rawhide, development - - disable all other built-in repos if rawhide is enabled - - remove any repo when not isFinal and repo not enabled - - if a base repo is defined, disable any repo not defined by - the user that is not the base repo - - FIXME: updates needs special handling - - """ + # Rules for which repos to enable/disable/remove + # + # - always remove + # - source, debuginfo + # - disable if isFinal + # - rawhide, development + # - disable all other built-in repos if rawhide is enabled + # - remove any repo when not isFinal and repo not enabled + # - if a base repo is defined, disable any repo not defined by + # the user that is not the base repo + # + # FIXME: updates needs special handling if repo.id in self.addOns: continue
@@ -685,8 +681,8 @@ reposdir=%s def addRepo(self, newrepo): """ Add a ksdata repo. """ log.debug("adding new repo %s" % newrepo.name) - self._addYumRepo(newrepo) # FIXME: handle MetadataError - super(YumRepo, self).addRepo(newrepo) + self._addYumRepo(newrepo.name, newrepo.baseurl, newrepo.mirrorlist, newrepo.proxy) # FIXME: handle MetadataError + super(YumPayload, self).addRepo(newrepo)
def _removeYumRepo(self, repo_id): if repo_id in self.repos: @@ -1137,7 +1133,7 @@ reposdir=%s rpm.addMacro("__file_context_path", f) break else: - rpm.addMacros("__file_context_path", "%{nil}") + rpm.addMacro("__file_context_path", "%{nil}")
def install(self): """ Install the payload. """ @@ -1329,6 +1325,11 @@ class RPMCallback(object): # obj.url = 'http://foo.com/stuff' checkfunc = (self._yum.verifyPkg, (txmbr.po, 1), {}) package_path = repo.getPackage(txmbr.po, checkfunc=checkfunc) + except URLGrabError as e: + log.error("URLGrabError: %s" % (e,)) + exn = PayloadInstallError("failed to get package") + if errorHandler.cb(exn, txmbr.po) == ERROR_RAISE: + raise exn except (yum.Errors.NoMoreMirrorsRepoError, IOError): if os.path.exists(txmbr.po.localPkg()): os.unlink(txmbr.po.localPkg()) @@ -1339,11 +1340,6 @@ class RPMCallback(object): raise exn except yum.Errors.RepoError: continue - except URLGrabError as e: - log.error("URLGrabError: %s" % (e,)) - exn = PayloadInstallError("failed to get package") - if errorHandler.cb(exn, txmbr.po) == ERROR_RAISE: - raise exn
self.package_file = open(package_path)
--- pyanaconda/errors.py | 2 +- pyanaconda/rescue.py | 6 +++--- pyanaconda/storage/size.py | 1 + pyanaconda/ui/gui/__init__.py | 2 ++ pyanaconda/ui/gui/spokes/storage.py | 3 +++ 5 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/pyanaconda/errors.py b/pyanaconda/errors.py index 37ee4d0..ae1c577 100644 --- a/pyanaconda/errors.py +++ b/pyanaconda/errors.py @@ -133,7 +133,7 @@ class ErrorHandler(object): devs = kwargs.pop("devices") message = _("The following file systems for your Linux system were " "not unmounted cleanly. Would you like to mount them " - "anyway?\n%s") % "\n".join(devices) + "anyway?\n%s") % "\n".join(devs) if self.ui.showYesNoQuestion(message): return ERROR_CONTINUE else: diff --git a/pyanaconda/rescue.py b/pyanaconda/rescue.py index be84c1a..8423201 100644 --- a/pyanaconda/rescue.py +++ b/pyanaconda/rescue.py @@ -299,9 +299,9 @@ def doRescue(rescue_mount, ksdata, platform): if root: try: # TODO: add a callback to warn about dirty filesystems - rc = mountExistingSystem(sto.fsset, root.device, - allowDirty = True, - readOnly = readOnly) + mountExistingSystem(sto.fsset, root.device, + allowDirty = True, + readOnly = readOnly)
if not flags.imageInstall: msg = _("The system will reboot automatically when you exit " diff --git a/pyanaconda/storage/size.py b/pyanaconda/storage/size.py index 75ea933..5b531f1 100644 --- a/pyanaconda/storage/size.py +++ b/pyanaconda/storage/size.py @@ -28,6 +28,7 @@ from errors import *
import gettext _ = lambda x: gettext.ldgettext("anaconda", x) +P_ = lambda x, y, z: gettext.ldngettext("anaconda", x, y, z)
# Decimal prefixes for different size increments, along with the name # and accepted abbreviation for the prefix. These prefixes are all diff --git a/pyanaconda/ui/gui/__init__.py b/pyanaconda/ui/gui/__init__.py index 3f957a4..787f40c 100644 --- a/pyanaconda/ui/gui/__init__.py +++ b/pyanaconda/ui/gui/__init__.py @@ -171,6 +171,8 @@ class GraphicalUserInterface(UserInterface): sys.exit(0) return
+ ndx = 0 + # If the current action wants us to jump to an arbitrary point ahead, # look for where that is now. if self._actions[0].skipTo: diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py index 4916a3b..92a8b80 100644 --- a/pyanaconda/ui/gui/spokes/storage.py +++ b/pyanaconda/ui/gui/spokes/storage.py @@ -143,6 +143,9 @@ class InstallOptions1Dialog(GUIObject): options_label.set_markup(options_text)
def _set_free_space_labels(self, disk_free, fs_free): + self.disk_free_label = self.builder.get_object("options1_disk_free_label") + self.fs_free_label = self.builder.get_object("options1_fs_free_label") + disk_free_text = size_str(disk_free) self.disk_free_label.set_text(disk_free_text)
These all look good to me.
On Thu, 2012-08-30 at 15:37 -0400, Chris Lumens wrote:
tests/pylint/runpylint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/pylint/runpylint.sh b/tests/pylint/runpylint.sh index 8c3e74b..9b771cd 100755 --- a/tests/pylint/runpylint.sh +++ b/tests/pylint/runpylint.sh @@ -80,7 +80,7 @@ fi # run pylint one file / module at a time, otherwise it sometimes gets # confused
pylint-log
-for i in pyanaconda/storage pyanaconda/installclasses/*.py pyanaconda/iw/*.py pyanaconda/textw/*.py pyanaconda/isys/*.py pyanaconda/; do +for i in $(find pyanaconda -type f -name '*py'); do pylint --init-hook='import sys; \ sys.path.insert(1, "pyanaconda/isys/.libs"); \ sys.path.insert(2, "pyanaconda/isys"); \
anaconda-patches@lists.fedorahosted.org