[PATCH] rm transifex-client buildreq
by Samantha N. Bueno
transifex-client shouldn't be listed as a BuildReq; only check for it
and install as needed if the target requiring it is called by make
---
Makefile.am | 9 +++++++++
anaconda.spec.in | 1 -
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index 4f76895..cee2b4a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -45,6 +45,7 @@ sed_verbose_0 = @echo " SED "$@;
TX_PULL_ARGS = -a --disable-overwrite
TX_PUSH_ARGS = -s
+tx_installed=`rpm -qa transifex-client`
$(PACKAGE_NAME).spec: $(PACKAGE_NAME).spec.in
$(sed_verbose)sed -e 's/#VERSION#/$(PACKAGE_VERSION)/' < $< > $@
@@ -56,6 +57,10 @@ tag:
po-pull:
rm -f po/en(a)boldquot.gmo po/en(a)boldquot.po
rm -f po/en(a)quot.gmo po/en(a)quot.po
+
+ if [ -z "$tx_installed" ]; then \
+ yum install transifex-client
+ fi
tx pull $(TX_PULL_ARGS)
scratch: po-pull
@@ -81,6 +86,10 @@ bumpver: po-pull
fi ; \
scripts/makebumpver $${opts} || exit 1 ; \
$(MAKE) -C po $(PACKAGE_NAME).pot-update ; \
+
+ if [ -z "$tx_installed" ]; then \
+ yum install transifex-client
+ fi
tx push $(TX_PUSH_ARGS)
install-buildrequires:
diff --git a/anaconda.spec.in b/anaconda.spec.in
index 61dd7ef..7b20a2a 100644
--- a/anaconda.spec.in
+++ b/anaconda.spec.in
@@ -80,7 +80,6 @@ BuildRequires: python-nose
BuildRequires: rpm-devel
BuildRequires: rpm-python >= %{rpmpythonver}
BuildRequires: slang-devel >= %{slangver}
-BuildRequires: transifex-client
BuildRequires: xmlto
BuildRequires: yum >= %{yumver}
BuildRequires: zlib-devel
--
1.7.11.7
11 years, 7 months
[PATCH 1/3] Handle package dependency errors on kickstart installs too (#865073).
by Chris Lumens
This is not handled by similar code in the software spoke, because that code
is never run for kickstart installs containing a %packages section.
---
pyanaconda/errors.py | 11 ++++++++++-
pyanaconda/packaging/yumpayload.py | 12 +++++++++++-
pyanaconda/ui/gui/__init__.py | 11 +++++++++++
pyanaconda/ui/tui/__init__.py | 3 +++
4 files changed, 35 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/errors.py b/pyanaconda/errors.py
index 17e75a0..3ae9178 100644
--- a/pyanaconda/errors.py
+++ b/pyanaconda/errors.py
@@ -227,6 +227,14 @@ class ErrorHandler(object):
self.ui.showError(message)
return ERROR_RAISE
+ def _dependencyErrorHandler(self, *args, **kwargs):
+ message = _("The following software marked for installation has errors. "
+ "This is likely caused by an error with\nyour installation source.")
+ details = "\n".join(sorted(kwargs["exception"].message))
+
+ self.ui.showDetailedError(message, details)
+ return ERROR_RAISE
+
def cb(self, exn, *args, **kwargs):
"""This method is the callback that all error handling should pass
through. The return value is one of the ERROR_* constants defined
@@ -259,7 +267,8 @@ class ErrorHandler(object):
"NoSuchGroup": self._noSuchGroupHandler,
"NoSuchPackage": self._noSuchPackageHandler,
"ScriptError": self._scriptErrorHandler,
- "PayloadInstallError": self._payloadInstallHandler}
+ "PayloadInstallError": self._payloadInstallHandler,
+ "DependencyError": self._dependencyErrorHandler}
if exn.__class__.__name__ in _map:
kwargs["exception"] = exn
diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py
index 3ce12f7..13c1ba6 100644
--- a/pyanaconda/packaging/yumpayload.py
+++ b/pyanaconda/packaging/yumpayload.py
@@ -1234,7 +1234,17 @@ reposdir=%s
self._setUpMedia(self.install_device)
self._writeInstallConfig()
- self.checkSoftwareSelection()
+
+ # We have this block twice. For kickstart installs, this is the only
+ # place dependencies will be checked. If a dependency error is hit
+ # here, there's nothing the user can do about it since you cannot go
+ # back to the first hub.
+ try:
+ self.checkSoftwareSelection()
+ except DependencyError as e:
+ if errorHandler.cb(e) == ERROR_RAISE:
+ progress.send_quit(1)
+ sys.exit(1)
# doPreInstall
# create mountpoints for protected device mountpoints (?)
diff --git a/pyanaconda/ui/gui/__init__.py b/pyanaconda/ui/gui/__init__.py
index 9e15abb..11d39b3 100644
--- a/pyanaconda/ui/gui/__init__.py
+++ b/pyanaconda/ui/gui/__init__.py
@@ -136,6 +136,17 @@ class GraphicalUserInterface(UserInterface):
dlg.destroy()
@gtk_thread_wait
+ def showDetailedError(self, message, details):
+ from pyanaconda.ui.gui.spokes.lib.detailederror import DetailedErrorDialog
+ dlg = DetailedErrorDialog(None, buttons=[_("_Quit")],
+ label=message)
+
+ with enlightbox(self._actions[0].window, dlg.window):
+ dlg.refresh(details)
+ rc = dlg.run()
+ dlg.window.destroy()
+
+ @gtk_thread_wait
def showYesNoQuestion(self, message):
from gi.repository import AnacondaWidgets, Gtk
dlg = Gtk.MessageDialog(flags=Gtk.DialogFlags.MODAL,
diff --git a/pyanaconda/ui/tui/__init__.py b/pyanaconda/ui/tui/__init__.py
index b20dc17..c4a15a0 100644
--- a/pyanaconda/ui/tui/__init__.py
+++ b/pyanaconda/ui/tui/__init__.py
@@ -173,6 +173,9 @@ class TextUserInterface(ui.UserInterface):
error_window = ErrorDialog(self._app, message)
self._app.switch_screen(error_window)
+ def showDetailedError(self, message, details):
+ self.showError(message + "\n\n" + details)
+
def showYesNoQuestion(self, message):
"""Display a dialog with the given message that presents the user a yes
or no choice. This method returns True if the yes choice is selected,
--
1.7.11.2
11 years, 7 months
[PATCH] Enable verbose yum logging once more
by Jesse Keating
This time it shoves all the logging data into packaging.log
This commit has some hacks to work around yum issues. I've discussed
with upstream and they're going to work on better APIs around logging in
the future.
---
pyanaconda/anaconda_log.py | 7 +++++++
pyanaconda/packaging/yumpayload.py | 18 ++++++++++++------
2 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/pyanaconda/anaconda_log.py b/pyanaconda/anaconda_log.py
index 046cca7..207efe4 100644
--- a/pyanaconda/anaconda_log.py
+++ b/pyanaconda/anaconda_log.py
@@ -161,6 +161,13 @@ class AnacondaLog:
minLevel=logging.DEBUG)
self.forwardToSyslog(packaging_logger)
+ # Create the yum logger and link it to packaging
+ yum_logger = logging.getLogger("yum")
+ yum_logger.setLevel(logging.DEBUG)
+ self.addFileHandler(PACKAGING_LOG_FILE, yum_logger,
+ minLevel=logging.DEBUG)
+ self.forwardToSyslog(yum_logger)
+
# Create a second logger for just the stuff we want to dup on
# stdout. Anything written here will also get passed up to the
# parent loggers for processing and possibly be written to the
diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py
index 88630db..b52fb67 100644
--- a/pyanaconda/packaging/yumpayload.py
+++ b/pyanaconda/packaging/yumpayload.py
@@ -59,6 +59,10 @@ except ImportError:
try:
import yum
+ # This is a bit of a hack to short circuit yum's internal logging
+ # handler setup. We already set one up so we don't need it to run.
+ # yum may give us an API to fiddle this at a later time.
+ yum.logginglevels._added_handlers = True
except ImportError:
log.error("import of yum failed")
yum = None
@@ -204,12 +208,14 @@ class YumPayload(PackagePayload):
# set this now to the best default we've got ; we'll update it if/when
# we get a base repo set up
self._yum.preconf.releasever = self._getReleaseVersion(None)
- # Hammer the yum logs to nothing, we log around yum. This is
- # to prevent stuff from leaking to the screen. Need a less hammer
- # approach to this so that we could have rich yum logs but clean
- # screens
- self._yum.preconf.debuglevel = 0
- self._yum.preconf.errorlevel = 0
+ # Set the yum verbosity to 6, and update yum's internal logger
+ # objects to the debug level. This is a bit of a hack requiring
+ # internal knowledge of yum, that will hopefully go away in the
+ # future with API improvements.
+ self._yum.preconf.debuglevel = 6
+ self._yum.preconf.errorlevel = 6
+ self._yum.logger.setLevel(logging.DEBUG)
+ self._yum.verbose_logger.setLevel(logging.DEBUG)
self.txID = None
--
1.7.11.4
11 years, 7 months
[PATCH] Handle nfsiso leavings by dracut (#876223)
by Jesse Keating
We could have method of nfs:server:/path/ or nfs:server:/path/foo.iso.
Dracut could have left stuff mounted to /run/install/repo or
/run/install/isodir or both. In any case we should detect what's been
left over and setup yum the right way.
This introduces a couple new constants as well.
---
pyanaconda/constants.py | 2 +
pyanaconda/packaging/yumpayload.py | 106 +++++++++++++++++++++++--------------
2 files changed, 67 insertions(+), 41 deletions(-)
diff --git a/pyanaconda/constants.py b/pyanaconda/constants.py
index d9d5b33..c4c0007 100644
--- a/pyanaconda/constants.py
+++ b/pyanaconda/constants.py
@@ -77,6 +77,8 @@ TRANSLATIONS_UPDATE_DIR="/tmp/updates/po"
ANACONDA_CLEANUP = "anaconda-cleanup"
ROOT_PATH = "/mnt/sysimage"
MOUNT_DIR = "/mnt/install"
+DRACUT_REPODIR = "/run/install/repo"
+DRACUT_ISODIR = "/run/install/isodir"
ISO_DIR = MOUNT_DIR + "/isodir"
INSTALL_TREE = MOUNT_DIR + "/source"
BASE_REPO_NAME = "anaconda"
diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py
index 3ce12f7..facca4b 100644
--- a/pyanaconda/packaging/yumpayload.py
+++ b/pyanaconda/packaging/yumpayload.py
@@ -567,56 +567,80 @@ reposdir=%s
self.install_device = device
url = "file://" + INSTALL_TREE
elif method.method == "nfs":
- # Mount the NFS share on INSTALL_TREE. If it ends up being nfsiso
- # we will move the mountpoint to ISO_DIR.
- self._setupNFS(INSTALL_TREE, method.server, method.dir, method.opts)
-
- # check for ISO images in the newly mounted dir
- path = INSTALL_TREE
- if method.dir.endswith(".iso"):
- # if the given URL includes a specific ISO image file, use it
- image_file = os.path.basename(method.dir)
- path = os.path.normpath("%s/%s" % (path, image_file))
-
- image = findFirstIsoImage(path)
-
- # it appears there are ISO images in the dir, so assume they want to
- # install from one of them
- if image:
- # move the mount to ISO_DIR
- # work around inability to move shared filesystems
- iutil.execWithRedirect("mount",
- ["--make-rprivate", "/"],
- stderr="/dev/tty5", stdout="/dev/tty5")
- iutil.execWithRedirect("mount",
- ["--move", INSTALL_TREE, ISO_DIR],
- stderr="/dev/tty5", stdout="/dev/tty5")
- # Mounts are kept track of in isys it seems
- # Remove the count for the source
- if isys.mountCount.has_key(INSTALL_TREE):
- if isys.mountCount[INSTALL_TREE] > 1:
- isys.mountCount[INSTALL_TREE] -= 1
- else:
- del(isys.mountCount[INSTALL_TREE])
- # Add a count for the new location
- if not isys.mountCount.has_key(ISO_DIR):
- isys.mountCount[ISO_DIR] = 0
- isys.mountCount[ISO_DIR] += 1
- # mount the ISO on a loop
- image = os.path.normpath("%s/%s" % (ISO_DIR, image))
- mountImage(image, INSTALL_TREE)
+ # See if we already have stuff mounted due to dracut
+ isodev = get_mount_device(DRACUT_ISODIR)
+ device = get_mount_device(DRACUT_REPODIR)
+ # See if dracut dealt with nfsiso
+ if isodev:
+ options, host, path = iutil.parseNfsUrl('nfs:%s' % isodev)
+ # See if the dir holding the iso is what we want
+ # and also if we have an iso mounted to /run/install/repo
+ if path in isodev and DRACUT_ISODIR in device:
+ # Everything should be setup
+ url = "file://" + DRACUT_REPODIR
+ else:
+ # see if the nfs dir is mounted
+ needmount = True
+ if device:
+ options, host, path = iutil.parseNfsUrl('nfs:%s' % device)
+ if path in device:
+ needmount = False
+ path = DRACUT_REPODIR
+ if needmount:
+ # Mount the NFS share on INSTALL_TREE. If it ends up
+ # being nfsiso we will move the mountpoint to ISO_DIR.
+ self._setupNFS(INSTALL_TREE, method.server, method.dir,
+ method.opts)
+ path = INSTALL_TREE
+
+ # check for ISO images in the newly mounted dir
+ if method.dir.endswith(".iso"):
+ # if the given URL includes a specific ISO image file, use it
+ image_file = os.path.basename(method.dir)
+ path = os.path.normpath("%s/%s" % (path, image_file))
+
+ image = findFirstIsoImage(path)
+
+ # it appears there are ISO images in the dir, so assume they want to
+ # install from one of them
+ if image:
+ # move the mount to ISO_DIR
+ # work around inability to move shared filesystems
+ iutil.execWithRedirect("mount",
+ ["--make-rprivate", "/"],
+ stderr="/dev/tty5", stdout="/dev/tty5")
+ iutil.execWithRedirect("mount",
+ ["--move", INSTALL_TREE, ISO_DIR],
+ stderr="/dev/tty5", stdout="/dev/tty5")
+ # Mounts are kept track of in isys it seems
+ # Remove the count for the source
+ if isys.mountCount.has_key(INSTALL_TREE):
+ if isys.mountCount[INSTALL_TREE] > 1:
+ isys.mountCount[INSTALL_TREE] -= 1
+ else:
+ del(isys.mountCount[INSTALL_TREE])
+ # Add a count for the new location
+ if not isys.mountCount.has_key(ISO_DIR):
+ isys.mountCount[ISO_DIR] = 0
+ isys.mountCount[ISO_DIR] += 1
+ # mount the ISO on a loop
+ image = os.path.normpath("%s/%s" % (ISO_DIR, image))
+ mountImage(image, INSTALL_TREE)
- url = "file://" + INSTALL_TREE
+ url = "file://" + INSTALL_TREE
+ else:
+ # Fall back to the mount path instead of a mounted iso
+ url = "file://" + path
elif method.method == "url":
url = method.url
sslverify = not (method.noverifyssl or flags.noverifyssl)
elif method.method == "cdrom" or (checkmount and not method.method):
# Did dracut leave the DVD or NFS mounted for us?
- device = get_mount_device("/run/install/repo")
+ device = get_mount_device(DRACUT_REPODIR)
# Only look at the dracut mount if we don't already have a cdrom
if device and not self.install_device:
self.install_device = storage.devicetree.getDeviceByPath(device)
- url = "file:///run/install/repo"
+ url = "file://" + DRACUT_REPODIR
if not method.method:
# See if this is a nfs mount
if ':' in device:
--
1.7.11.4
11 years, 7 months
[PATCH] Include hidden disks in the storage spoke's list of devices (#875475).
by Chris Lumens
Otherwise, previously unselected disks on the storage overview will never
be allowed to be selected.
---
pyanaconda/ui/gui/spokes/storage.py | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py
index e9ce0c5..c5b7fcf 100644
--- a/pyanaconda/ui/gui/spokes/storage.py
+++ b/pyanaconda/ui/gui/spokes/storage.py
@@ -92,10 +92,11 @@ class FakeDisk(object):
def getDisks(devicetree, fake=False):
if not fake:
- disks = [d for d in devicetree.devices if d.isDisk and
- not d.format.hidden and
- not (d.protected and
- d.removable)]
+ devices = devicetree.devices + devicetree._hidden
+ disks = [d for d in devices if d.isDisk and
+ not d.format.hidden and
+ not (d.protected and
+ d.removable)]
else:
disks = []
disks.append(FakeDisk("sda", size=300000, free=10000, serial="00001",
--
1.7.11.2
11 years, 7 months
[master] Remove iso-codes dependency, libxklavier has it fixed now
by Vratislav Podzimek
>From libxklavier's changelog:
* Thu Apr 19 2012 Matthias Clasen <mclasen(a)redhat.com> - 5.2.1-2
- Add a runtime dependency on iso-codes (#813833)
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
anaconda.spec.in | 2 --
1 file changed, 2 deletions(-)
diff --git a/anaconda.spec.in b/anaconda.spec.in
index 4bccb2a..bc3687a 100644
--- a/anaconda.spec.in
+++ b/anaconda.spec.in
@@ -135,8 +135,6 @@ Requires: python-nss
Requires: tigervnc-server-minimal
Requires: pytz
Requires: libxklavier
-#libxklavier requires iso-codes, but does not have it as Requires: (see #813833)
-Requires: iso-codes
Requires: libgnomekbd
%ifarch %livearches
Requires: usermode
--
1.7.11.7
11 years, 7 months
[rhel5-branch] Revert two patches that don't work
by Vratislav Podzimek
These are reverts of two patches that tried to resolve the issue
with missing gfs.ko module in our images. This module is not part
of the kernel RPM and build scripts doesn't handle such cases.
Since bug #754213 was about not removing GFS entries from fstab
during upgrade, which works without the gfs.ko module, and not about
full support for GFS (i.e. creating new partitions) as the reporter
himself stated in the bugreport, we can revert these patches and close
the bug. If somebody needs full support for GFS they should file
another bug.
Vratislav Podzimek (2):
Revert "Don't remove files from the kmod-gfs package (#754213)"
Revert "Add extra modules that are not in the kernel package"
scripts/mk-images | 20 --------------------
scripts/upd-instroot | 1 -
2 files changed, 21 deletions(-)
--
1.7.11.7
11 years, 7 months
[PATCH] Use the main loop to control displaying the resize dialog.
by Chris Lumens
Emitting signals from the function that handles other signals is dangerous
given the synchronous nature of GTK signals, so this was never a good idea
to start with. Then, displaying the dialog from the main loop means it
gets displayed in the lightbox correctly instead of over a completely grey
background.
---
pyanaconda/ui/gui/spokes/storage.py | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py
index 3c0059b..e9ce0c5 100644
--- a/pyanaconda/ui/gui/spokes/storage.py
+++ b/pyanaconda/ui/gui/spokes/storage.py
@@ -724,6 +724,7 @@ class StorageSpoke(NormalSpoke, StorageChecker):
if dialog.custom:
self.skipTo = "CustomPartitioningSpoke"
+ self.on_back_clicked(self.window)
else:
if self.encrypted:
dialog = PassphraseDialog(self.data)
@@ -734,20 +735,20 @@ class StorageSpoke(NormalSpoke, StorageChecker):
self.passphrase = dialog.passphrase
self.apply()
-
- resizeDialog = ResizeDialog(self.data, self.storage, self.payload)
- resizeDialog.refresh(disks)
-
- # resizeDialog handles okay/cancel on its own, so we can throw
- # out the return value.
- self.run_lightbox_dialog(resizeDialog)
- self.window.emit("button-clicked")
- return
-
- self.on_back_clicked(self.window)
+ GLib.idle_add(self._show_resize_dialog, disks)
elif rc == dialog.RESPONSE_QUIT:
raise SystemExit("user-selected exit")
+ def _show_resize_dialog(self, disks):
+ resizeDialog = ResizeDialog(self.data, self.storage, self.payload)
+ resizeDialog.refresh(disks)
+
+ # resizeDialog handles okay/cancel on its own, so we can throw out the
+ # return value.
+ self.run_lightbox_dialog(resizeDialog)
+ self.window.emit("button-clicked")
+ return False
+
def on_add_disk_clicked(self, button):
print "ADD DISK CLICKED"
--
1.7.11.2
11 years, 7 months
Handle xconfig ksdata (#874868)
by Jesse Keating
Bunch of stuff to make the xconfig ksdata actually apply. While the default
desktop stuff doesn't appear to be used by much, the runlevel setting is
more useful.
--jlk
11 years, 7 months