[PATCH v2] Add a Makefile target to create a set of empty .po files.
by David Shea
This could be handy for certain test situations where the presence of
translation files is necessary for a build but the content of them
doesn't matter.
(after discussion on IRC, this one replaces the po-pull targets for scratch and
scratch-bumpver, and does not overwrite files that already exist)
---
Makefile.am | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 724124f..37a05b5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -55,11 +55,18 @@ po-pull:
rpm -q transifex-client &>/dev/null || ( echo "need to run: yum install transifex-client"; exit 1 )
tx pull $(TX_PULL_ARGS)
-scratch: po-pull
+po-empty:
+ for lingua in $$(grep -v '^#' $(srcdir)/po/LINGUAS) ; do \
+ [ -f $(srcdir)/po/$$lingua.po ] || \
+ msginit -i $(srcdir)/po/$(PACKAGE_NAME).pot -o $(srcdir)/po/$$lingua.po --no-translator || \
+ exit 1 ; \
+ done
+
+scratch: po-empty
$(MAKE) ARCHIVE_TAG=HEAD dist
git checkout -- $(srcdir)/po/$(PACKAGE_NAME).pot
-scratch-bumpver: po-pull
+scratch-bumpver: po-empty
@opts="-n $(PACKAGE_NAME) -v $(PACKAGE_VERSION) -r $(PACKAGE_RELEASE) -b $(PACKAGE_BUGREPORT)" ; \
if [ ! -z "$(IGNORE)" ]; then \
opts="$${opts} -i $(IGNORE)" ; \
--
1.9.0
10 years, 1 month
[blivet:master 10/10] Replace with a semantically equivalent chunk.
by Anne Mulhern
This was motivated by a complaint about unused variable path.
Signed-off-by: mulhern <amulhern(a)redhat.com>
---
blivet/devices.py | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/blivet/devices.py b/blivet/devices.py
index 50c8dd1..25cffbe 100644
--- a/blivet/devices.py
+++ b/blivet/devices.py
@@ -1310,12 +1310,9 @@ class PartitionDevice(StorageDevice):
def _setPartedPartition(self, partition):
""" Set this PartitionDevice's parted Partition instance. """
log_method_call(self, self.name)
- if partition is None:
- path = None
- elif isinstance(partition, parted.Partition):
- path = partition.path
- else:
- raise ValueError("partition must be a parted.Partition instance")
+
+ if partition is not None and not isinstance(partition, parted.Partition):
+ raise ValueError("partition must be None or a parted.Partition instance")
log.debug("device %s new partedPartition %s", self.name, partition)
self._partedPartition = partition
--
1.8.3.1
10 years, 1 month
[blivet:master 10/10] Replace with a semantically equivalent chunk.
by Anne Mulhern
This was motivated by a complaint about unused variable path.
Signed-off-by: mulhern <amulhern(a)redhat.com>
---
blivet/devices.py | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/blivet/devices.py b/blivet/devices.py
index 50c8dd1..bfca67a 100644
--- a/blivet/devices.py
+++ b/blivet/devices.py
@@ -1310,11 +1310,8 @@ class PartitionDevice(StorageDevice):
def _setPartedPartition(self, partition):
""" Set this PartitionDevice's parted Partition instance. """
log_method_call(self, self.name)
- if partition is None:
- path = None
- elif isinstance(partition, parted.Partition):
- path = partition.path
- else:
+
+ if not isinstance(partition, parted.Partition):
raise ValueError("partition must be a parted.Partition instance")
log.debug("device %s new partedPartition %s", self.name, partition)
--
1.8.3.1
10 years, 1 month
[lorax] Install bzip2 for liveimg tar.bz2 support
by Brian C. Lane
---
share/runtime-install.tmpl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/share/runtime-install.tmpl b/share/runtime-install.tmpl
index b3bd722..db31844 100644
--- a/share/runtime-install.tmpl
+++ b/share/runtime-install.tmpl
@@ -59,7 +59,7 @@ installpkg rpcbind
## required for dracut
installpkg kbd kbd-misc
## required for anaconda-dracut (img-lib etc.)
-installpkg tar xz curl
+installpkg tar xz curl bzip2
## basic system stuff
installpkg systemd-sysv systemd-units
--
1.8.5.3
10 years, 1 month
[PATCH] Add a Makefile target to create a set of empty .po files.
by David Shea
This could be handy for certain test situations where the presence of
translation files is necessary for a build but the content of them
doesn't matter.
---
Makefile.am | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Makefile.am b/Makefile.am
index 724124f..21bcd05 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -55,6 +55,9 @@ po-pull:
rpm -q transifex-client &>/dev/null || ( echo "need to run: yum install transifex-client"; exit 1 )
tx pull $(TX_PULL_ARGS)
+po-empty:
+ for lingua in $$(grep -v '^#' $(srcdir)/po/LINGUAS) ; do msginit -i $(srcdir)/po/$(PACKAGE_NAME).pot -o $(srcdir)/po/$$lingua.po --no-translator ; done
+
scratch: po-pull
$(MAKE) ARCHIVE_TAG=HEAD dist
git checkout -- $(srcdir)/po/$(PACKAGE_NAME).pot
--
1.9.0
10 years, 1 month
Re: [PATCH] support ppc64le in lorax
by Mark Hamzy
> On Tue, 25 Mar 2014 15:35:31 -0500
> Mark Hamzy <hamzy(a)us.ibm.com> wrote:
>
> > Add support for the ppc64le architecture in lorax.
>
> Mark, how different the ppc64le template is against the ppc one? Can't
> we have only one template with maybe couple %ifs?
Hi Dan,
1) Cleaned up the code
2) Doesn't support 32 bit
3) Doesn't support yaboot
4) Doesn't support mac
5) Doesn't call kernel-wrapper
6) changed the mkisofs flags to enable grub to boot netinst iso
I would rather not have the entire code be a series of ifdefs to support
three different architectures. What do you think?
Mark
10 years, 1 month
[blivet:master 00/10] Small pylint inspired patches
by Anne Mulhern
These are a bunch of small and pretty obvious changes inspired by pylint
warnings.
* Catch correct error and disable warning is the only actual bug fix. You need
to fail to parse /proc/mounts correctly to make it manifest, though.
mulhern (10):
Catch correct error and disable warning.
Give abstract method the same signature as its overriding methods.
Spell parameter self correctly
Put a field and a method in the base class
Get rid of unnecessary pass statements
Don't comment out function headers but leave their bodies uncommented
Delete method-local pruneFile function.
Remove unused assignment to boot.
Remove some unused exception names.
Replace with a semantically equivalent chunk.
blivet/__init__.py | 6 +-----
blivet/devicelibs/raid.py | 2 +-
blivet/devices.py | 7 ++-----
blivet/devicetree.py | 8 +++-----
blivet/formats/fslabel.py | 19 +++++++++++++++----
blivet/iscsi.py | 1 -
blivet/util.py | 4 ++--
scripts/makeupdates | 9 ---------
tests/devicelibs_test/lvm_test.py | 9 ---------
9 files changed, 24 insertions(+), 41 deletions(-)
--
1.8.3.1
10 years, 1 month
[master][PATCH] mountExistingSystem raises an exception with dirty FS (#1080210)
by Vratislav Podzimek
The commit 3ca0ae5e155 removed the rc variable that had always been being set to
None because mountExistingSystem didn't return any value. However, the variable
was left in place in the next block testing it for being -1 or something else.
Put mountExistingSystem call in a try-except block and catch the DirstFSError
exception instead.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/rescue.py | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/pyanaconda/rescue.py b/pyanaconda/rescue.py
index ff74f6b..c740dc3 100644
--- a/pyanaconda/rescue.py
+++ b/pyanaconda/rescue.py
@@ -29,7 +29,7 @@ import sys
import os
import isys
from blivet import mountExistingSystem
-from blivet.errors import StorageError
+from blivet.errors import StorageError, DirtyFSError
from installinterfacebase import InstallInterfaceBase
import iutil
import shutil
@@ -356,11 +356,6 @@ def doRescue(intf, rescue_mount, ksdata):
if root:
try:
- # TODO: add a callback to warn about dirty filesystems
- mountExistingSystem(sto.fsset, root.device,
- allowDirty = True,
- readOnly = readOnly)
-
if not flags.imageInstall:
msg = _("The system will reboot automatically when you exit "
"from the shell.")
@@ -368,7 +363,11 @@ def doRescue(intf, rescue_mount, ksdata):
msg = _("Run %s to unmount the system "
"when you are finished.") % ANACONDA_CLEANUP
- if rc == -1:
+ try:
+ mountExistingSystem(sto.fsset, root.device,
+ allowDirty = True,
+ readOnly = readOnly)
+ except DirtyFSError:
if flags.automatedInstall:
log.error("System had dirty file systems which you chose not to mount")
else:
--
1.8.5.3
10 years, 1 month
[PATCH 0/5] Remove things that Gtk deprecated
by David Shea
Stock labels are no longer a thing, and there were some HBoxes and VBoxes
leftover in the network spoke and some documentation fragments.
David Shea (5):
Remove stock labels and icons.
Set the secret agent icon in the glade file
Fix keyboard accelerator collisions from former stock buttons
Convert GtkHBox and GtkVBox to GtkBox.
Update the BaseWindow and HubWindow example UI fragments
pyanaconda/ui/gui/main.glade | 10 ++-
pyanaconda/ui/gui/spokes/advanced_user.glade | 8 +--
pyanaconda/ui/gui/spokes/advstorage/fcoe.glade | 8 +--
pyanaconda/ui/gui/spokes/advstorage/iscsi.glade | 12 ++--
pyanaconda/ui/gui/spokes/datetime_spoke.glade | 12 ++--
pyanaconda/ui/gui/spokes/datetime_spoke.py | 6 +-
pyanaconda/ui/gui/spokes/filter.glade | 36 +++++-----
pyanaconda/ui/gui/spokes/keyboard.glade | 26 ++++----
.../ui/gui/spokes/lib/custom_storage_helpers.glade | 9 ++-
pyanaconda/ui/gui/spokes/lib/passphrase.glade | 10 +--
pyanaconda/ui/gui/spokes/lib/passphrase.py | 14 ++--
pyanaconda/ui/gui/spokes/lib/refresh.glade | 12 ++--
pyanaconda/ui/gui/spokes/lib/resize.glade | 8 +--
pyanaconda/ui/gui/spokes/network.glade | 78 +++++++++++++---------
pyanaconda/ui/gui/spokes/network.py | 2 -
pyanaconda/ui/gui/spokes/source.glade | 8 +--
tests/glade/accelerators/check_accelerators.py | 4 +-
widgets/src/BaseWindow.c | 37 +++++++---
widgets/src/HubWindow.c | 40 ++++++++---
19 files changed, 193 insertions(+), 147 deletions(-)
--
1.9.0
10 years, 1 month
[PATCH] Run the pykickstart version test on the commands in parse-dracut
by David Shea
(this one doesn't leave behind dracut/parse-kickstartc)
---
tests/kickstart_tests/version_test.py | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/tests/kickstart_tests/version_test.py b/tests/kickstart_tests/version_test.py
index c3650f8..b77cb26 100644
--- a/tests/kickstart_tests/version_test.py
+++ b/tests/kickstart_tests/version_test.py
@@ -18,6 +18,7 @@
# Author: Chris Lumens <clumens(a)redhat.com>
from mock import Mock
import unittest
+import os
class BaseTestCase(unittest.TestCase):
def setUp(self):
@@ -50,3 +51,27 @@ class DataVersionTestCase(BaseTestCase):
# it does command objects.
pykickstartClass = eval("self.handler.%s" % dataName)
self.assertIsInstance(dataObj(), pykickstartClass)
+
+# Copy the commands tests but with the command map from dracut/parse-kickstart
+class DracutCommandVersionTestCase(CommandVersionTestCase):
+ def setUp(self):
+ CommandVersionTestCase.setUp(self)
+
+ # top_srcdir should have been set by nosetests.sh. If it wasn't, the KeyError
+ # will fail the test.
+ parse_kickstart_path = os.path.join(os.environ['top_srcdir'], 'dracut', 'parse-kickstart')
+
+ import tempfile
+ with tempfile.NamedTemporaryFile() as parse_temp:
+ # Compile the file manually to a tempfile so that the import doesn't automatically
+ # crud up the source directory with parse-kickstartc
+ import py_compile
+ parse_temp = tempfile.NamedTemporaryFile()
+ py_compile.compile(parse_kickstart_path, parse_temp.name)
+
+ # Use imp to pretend that hyphens are ok for module names
+ import imp
+ parse_module = imp.load_module('parse_kickstart', parse_temp.file,
+ parse_temp.name, ('', 'r', imp.PY_COMPILED))
+
+ self._commandMap = parse_module.dracutCmds
--
1.9.0
10 years, 1 month