[blivet] Python3 subpackage
by Vratislav Podzimek
The PATCH 1/2 should probably go in as part of the "port to libblockdev" patch
set.
Vratislav Podzimek (2):
Remove no longer needed requires
Build the python3-blivet subpackage
Makefile | 10 ++++++----
python-blivet.spec | 54 ++++++++++++++++++++++++++++++++++++++++++++----------
2 files changed, 50 insertions(+), 14 deletions(-)
--
2.1.0
9 years, 3 months
[blivet][master,rhel7-branch] fix 1192004
by David Lehman
This became a thing when we began to call populate on an already-
populated tree.
David Lehman (1):
Be more careful about overwriting device.originalFormat. (#1192004)
blivet/devicetree.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--
1.9.3
9 years, 3 months
Re: [PATCH 1/1] Remove the pylint false positives for the GLib module
by Brian C. Lane
On Mon, Feb 16, 2015 at 10:24:56AM -0500, David Shea wrote:
> From: David Shea <dshea(a)redhat.com>
>
> pylint has since figured this one out.
> ---
> tests/pylint/pylint-false-positives | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/tests/pylint/pylint-false-positives b/tests/pylint/pylint-false-positives
> index bc020fd..ef96849 100644
> --- a/tests/pylint/pylint-false-positives
> +++ b/tests/pylint/pylint-false-positives
> @@ -1,7 +1,5 @@
> ^E1101:[ 0-9]*,[0-9]*:.*: Instance of '.*' has no 'get_property' member$
> ^E1101:[ 0-9]*,[0-9]*:.*: Instance of '.*' has no 'set_property' member$
> -^E0611:[ 0-9]*,[0-9]*: No name 'GLib' in module 'gi.repository'$
> -^E0611:[ 0-9]*,[0-9]*:.*: No name 'GLib' in module 'gi.repository'$
> ^E0611:[ 0-9]*,[0-9]*: No name '_isys' in module 'pyanaconda'$
> ^E0611:[ 0-9]*,[0-9]*:.*: No name '_isys' in module 'pyanaconda'$
> ^E0712:[ 0-9]*,[0-9]*:.*: Catching an exception which doesn't inherit from BaseException: GError$
>
Ack
--
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
9 years, 3 months
[blivet][libblockdev follow-up] Use BlockDev for DM maps and RAID sets and LUKS escrow
by Vratislav Podzimek
Simple patches that allow blivet dropping python-block, python-nss and
python-volume_key dependencies (the last two being optional, but required for OS
installation).
Vratislav Podzimek (3):
Use BlockDev's DM plugin for DM map existence testing
Use BlockDev's DM plugin to work with DM RAID sets
Use BlockDev's crypto plugin to do LUKS escrow
blivet/devices/device.py | 2 +-
blivet/devices/disk.py | 16 ++++--------
blivet/devices/dm.py | 5 +---
blivet/devicetree.py | 15 +++++-------
blivet/formats/luks.py | 64 ++----------------------------------------------
blivet/osinstall.py | 11 ---------
python-blivet.spec | 2 --
7 files changed, 15 insertions(+), 100 deletions(-)
--
2.1.0
9 years, 3 months
[blivet] Hide libblockdev from anaconda's radar
by Vratislav Podzimek
With this patch, the only change required in anaconda when blivet moves to
libblockdev is to use the newly introduced static method instead of
blivet.devicelibs.lvm.getPossiblePhysicalExtents(). Thus this patch obsoletes
the old patch for anaconda related to blivet moving to libblockdev I sent a
while ago.
Vratislav Podzimek (1):
Add a static method providing list of available PE sizes
blivet/devices/lvm.py | 4 ++++
1 file changed, 4 insertions(+)
--
2.1.0
9 years, 3 months
[blivet][master,rhel7-branch] get dm partition's disk reliably
by David Lehman
There have been two methods used for this in the past: regex substition
and sysfs path traversal. Both have fatal flaws. This method's only
vulnerability is udev ceasing to provide the required data item.
There's an updates image out for testing in the bug (1190886), but I'm
fairly confident already because this patch has been on my uevents-
branch for a while now. I had issues with the patch from 1181336 when I
was testing using disk images (which use partitioned dm devices), and
I believe they're seeing the same in 1190886.
9 years, 3 months
[anaconda:master 0/2] Make some parsing simpler and more consistant
by Anne Mulhern
add_rpms parsing required a bit of post-processing, which code contained a few
incorrect assumptions. Using Action subclass simplifies the parsing a lot
and puts the simplification in the parser, where it belongs.
ignore flag, added very recently, works exactly the same as add_rpms flag, so
it makes sense to use same simple infrastructure for parsing.
mulhern (2):
Use a simple ExtendAction for add_rpms option.
Use ExtendAction for --ignore flag
scripts/makeupdates | 46 +++++++++++++---------------------------------
1 file changed, 13 insertions(+), 33 deletions(-)
--
1.9.3
9 years, 3 months
[blivet:master] Add ability to match scientific notation in strings.
by Anne Mulhern
The matching regular expression is expanded to include possible
scientific notation in numeric part and to exclude numeric parts
with multiple radices.
Uses named groups instead of indices.
Signed-off-by: mulhern <amulhern(a)redhat.com>
---
blivet/size.py | 9 +++------
tests/size_test.py | 10 ++++++++++
2 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/blivet/size.py b/blivet/size.py
index da44343..6836566 100644
--- a/blivet/size.py
+++ b/blivet/size.py
@@ -173,19 +173,16 @@ def _parseSpec(spec):
if radix != '.':
spec = spec.replace(radix, '.')
- # Match the string using only digit/space/not-space, since the
- # string might be non-English and contain non-letter characters
- # that Python doesn't understand as parts of words.
- m = re.match(r'(-?\s*[0-9.]+)\s*([^\s]*)$', spec.strip())
+ m = re.match(r'(?P<numeric>(-|\+)?\s*(?P<base>([0-9]+)|([0-9]*\.[0-9]+)|([0-9]+\.[0-9]*))(?P<exp>(e|E)(-|\+)[0-9]+)?)\s*(?P<rest>[^\s]*)$', spec.strip())
if not m:
raise ValueError("invalid size specification", spec)
try:
- size = Decimal(m.groups()[0])
+ size = Decimal(m.group('numeric'))
except InvalidOperation:
raise ValueError("invalid size specification", spec)
- specifier = m.groups()[1]
+ specifier = m.group('rest')
# First try to parse as English.
try:
diff --git a/tests/size_test.py b/tests/size_test.py
index e60c6d1..2bcdc84 100644
--- a/tests/size_test.py
+++ b/tests/size_test.py
@@ -184,6 +184,16 @@ class SizeTestCase(unittest.TestCase):
self.assertEquals(Size("%s KiB" % (1/1025.0,)), Size(0))
self.assertEquals(Size("%s KiB" % (1/1023.0,)), Size(1))
+ def testNoUnitsInString(self):
+ self.assertEqual(Size("1024"), Size("1 KiB"))
+
+ def testScientificNotation(self):
+ self.assertEqual(size._parseSpec("1e+0 KiB"), Decimal(1024))
+ self.assertEqual(size._parseSpec("1e-0 KiB"), Decimal(1024))
+ self.assertEqual(size._parseSpec("1e-1 KB"), Decimal(100))
+ self.assertEqual(size._parseSpec("1E-4KB"), Decimal("0.1"))
+ self.assertEqual(Size("1E-10KB"), Size(0))
+
class TranslationTestCase(unittest.TestCase):
def __init__(self, methodName='runTest'):
--
1.9.3
9 years, 3 months