[PATCH] Adjust the ui package paths to find hubs and spokes
by Brian C. Lane
The gui/tui part of the path is added below so the system path should
end at "ui"
---
pyanaconda/ui/gui/__init__.py | 2 +-
pyanaconda/ui/tui/__init__.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/ui/gui/__init__.py b/pyanaconda/ui/gui/__init__.py
index 917e0a3..3f1bab2 100644
--- a/pyanaconda/ui/gui/__init__.py
+++ b/pyanaconda/ui/gui/__init__.py
@@ -261,7 +261,7 @@ class GraphicalUserInterface(UserInterface):
basemask = "pyanaconda.ui"
basepath = os.path.dirname(__file__)
updatepath = "/tmp/updates/pyanaconda/ui"
- sitepackages = [os.path.join(dir, "pyanaconda", "ui", "gui")
+ sitepackages = [os.path.join(dir, "pyanaconda", "ui")
for dir in site.getsitepackages()]
pathlist = set([updatepath, basepath] + sitepackages)
diff --git a/pyanaconda/ui/tui/__init__.py b/pyanaconda/ui/tui/__init__.py
index 89c3f30..655913a 100644
--- a/pyanaconda/ui/tui/__init__.py
+++ b/pyanaconda/ui/tui/__init__.py
@@ -100,7 +100,7 @@ class TextUserInterface(ui.UserInterface):
basemask = "pyanaconda.ui"
basepath = os.path.dirname(__file__)
updatepath = "/tmp/updates/pyanaconda/ui"
- sitepackages = [os.path.join(dir, "pyanaconda", "ui", "tui")
+ sitepackages = [os.path.join(dir, "pyanaconda", "ui")
for dir in site.getsitepackages()]
pathlist = set([updatepath, basepath] + sitepackages)
--
1.9.3
9 years, 11 months
[rhel6-branch] Fix wrong attribute name in swap ks line (#1002924)
by Brian C. Lane
Commit 06615f6341d6d use mountopts instead of options. This fixes that.
Related: rhbz#1002924
---
storage/formats/swap.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/storage/formats/swap.py b/storage/formats/swap.py
index 8291a8a..de04258 100644
--- a/storage/formats/swap.py
+++ b/storage/formats/swap.py
@@ -185,8 +185,8 @@ class SwapSpace(DeviceFormat):
if self.label:
f.write(" --label=\"%s\"" % self.label)
- if self.mountopts:
- f.write(" --fsoptions=\"%s\"" % self.mountopts)
+ if self.options:
+ f.write(" --fsoptions=\"%s\"" % self.options)
register_device_format(SwapSpace)
--
1.9.3
9 years, 11 months
[anaconda][master][PATCH 0/5] Fix option passing to Blivet
by Martin Kolman
The following patch series fixes the current state of the passing of
some options to Blivet - this is the Anaconda part.
The first patch removes the iscsi & noiscsi options as they are
not needed and apparently were out of use already for quite some time.
Then the following patches do some tweaks for the ibft and dmraid options,
such as adding help texts describing what they do and harmonizing the usage
of booleans in the corresponding flags.
Martin Kolman (5):
Remove the iscsi and noiscsi options
Use True instead of 1 for the ibft flag default value
Add help texts for the ibft and noibft options
Use True instead of 1 for the dmraid flag default value
Add help texts for the dmraid and nodmraid options
anaconda | 19 +++++++------------
data/anaconda_options.txt | 12 ++++++++++++
pyanaconda/flags.py | 5 ++---
3 files changed, 21 insertions(+), 15 deletions(-)
--
1.9.3
9 years, 11 months
[blivet][PATCH] Skip device name validation for some device types.
by David Lehman
Partition and loop devices' names are set by parted or losetup, so there's
no need to validate the symbolic names blivet uses. Similarly, btrfs volume
names are only used within blivet so there is no need to validate them.
---
blivet/devices.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/blivet/devices.py b/blivet/devices.py
index 53a7d58..58f370b 100644
--- a/blivet/devices.py
+++ b/blivet/devices.py
@@ -1553,6 +1553,9 @@ class PartitionDevice(StorageDevice):
else:
StorageDevice.updateSysfsPath(self)
+ def _setName(self, value):
+ self._name = value # actual name setting is done by parted
+
def updateName(self):
if self.partedPartition is None:
self.name = self.req_name
@@ -4506,6 +4509,9 @@ class LoopDevice(StorageDevice):
StorageDevice.__init__(self, name, fmt=fmt, size=size,
exists=True, parents=parents)
+ def _setName(self, value):
+ self._name = name # actual name is set by losetup
+
def updateName(self):
""" Update this device's name. """
if not self.slave.status:
@@ -5120,6 +5126,9 @@ class BTRFSVolumeDevice(BTRFSDevice, ContainerDevice):
def formatImmutable(self):
return self.exists
+ def _setName(self, value):
+ self._name = name # name is not used outside of blivet
+
def _setFormat(self, fmt):
""" Set the Device's format. """
super(BTRFSVolumeDevice, self)._setFormat(fmt)
--
1.9.3
9 years, 11 months
[blivet] support for lvm and btrfs snapshots
by David Lehman
These add support for recognizing and creating snapshots. There is no new
action class for a snapshot merge/rollback. Both of the lvm snapshot classes
(old-style and thin) have a merge method that can be called directly as needed.
Reformatting a snapshot is not allowed.
Also included is an improvement to the mechanism for identifying devices that
can be directly used for filesystems or swap space. In the good old days it was
as simple as "if it's a leaf device it can be accessed directly". Btrfs and
snapshots have complicated this. The new "direct" property of StorageDevice
indicates whether a device instance can be written to directly.
David Lehman (17):
Make sure disk filters are applied even if populate fails.
Reset the devicetree before tearing everything down in _cleanUp.
Remove duplicate portion of lvm config string.
Mark BTRFSDevice as not resizable.
Add docstrings for BTRFSVolumeDevice and BTRFSSubVolumeDevice.
Add backend functions for creating and managing snapshots.
Add optional kwarg to force removal of a logical volume.
Add ignore_skip keyword arg to lvactivate.
Add Device classes for snapshots.
Use LVMSnapshotDevice when populating the devicetree.
Drop special accounting for snapshot space usage in VG.
Detect existing btrfs snapshots.
Some devices have immutable formatting.
Special treatment for getting parted device for old-style lvm
snapshots.
Add tests for snapshots.
Add support for read-only btrfs snapshots.
Add a property indicating whether a device is directly accessible.
blivet/__init__.py | 5 +-
blivet/deviceaction.py | 9 +
blivet/devicelibs/btrfs.py | 29 ++-
blivet/devicelibs/lvm.py | 57 +++++-
blivet/devices.py | 429 ++++++++++++++++++++++++++++++++++++++++---
blivet/devicetree.py | 57 ++++--
tests/devices_test.py | 132 +++++++++++++
tests/devicetree_test.py | 41 +++++
tests/imagebackedtestcase.py | 1 +
9 files changed, 694 insertions(+), 66 deletions(-)
--
1.9.0
9 years, 11 months
[anaconda][master][PATCH 0/9] Dead option cleanup
by Martin Kolman
So it turns out we have quite a lot of boot/CLI options
that do exactly nothing and just clutter the --help output
and the Anaconda source code. The following patch series gets rid of them.
It is quite possible some of those might still be used in some
obscure way, so let me know and I'll drop the corresponding patch.
Same think applies for options that appear to be alive but aren't
(undead options) - let me know and I'll drop them. :)
Martin Kolman (9):
Remove the module option
Remove the disused nofb option
Actually remove askmethod and related code
Remove the autostep option
Remove the noipv4 option
Remove the iscsi and noiscsi options
Remove the ibft and noibft options
Remove the dmraid and nodmraid options
Remove the kbdtype option
anaconda | 28 ----------------------------
pyanaconda/anaconda.py | 1 -
pyanaconda/bootloader.py | 2 +-
pyanaconda/flags.py | 4 ----
pyanaconda/packaging/yumpayload.py | 10 ++++------
pyanaconda/ui/gui/spokes/source.py | 5 -----
pyanaconda/ui/tui/spokes/source.py | 5 -----
7 files changed, 5 insertions(+), 50 deletions(-)
--
1.9.3
9 years, 11 months
[blivet][PATCH] Bypass name setter in several places.
by David Lehman
In PartitionDevice the name is already set in actuality and is only being
retrieved and accounted for in updateName.
In LoopDevice the name is either already set as in PartitionDevice
(updateName) or it is being set to a placeholder name that should never be
used for anything.
In BTRFSVolumeDevice the name is never actually used for anything, so it
is okay that we set it directly from any filesystem label.
---
blivet/devices.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/blivet/devices.py b/blivet/devices.py
index 53a7d58..0e24c66 100644
--- a/blivet/devices.py
+++ b/blivet/devices.py
@@ -1555,9 +1555,9 @@ class PartitionDevice(StorageDevice):
def updateName(self):
if self.partedPartition is None:
- self.name = self.req_name
+ self._name = self.req_name
else:
- self.name = \
+ self._name = \
devicePathToName(self.partedPartition.getDeviceNodeName())
def dependsOn(self, dep):
@@ -4518,7 +4518,7 @@ class LoopDevice(StorageDevice):
name = loop.get_loop_name(self.slave.path)
if name.startswith("loop"):
- self.name = name
+ self._name = name
return self.name
@@ -4556,7 +4556,7 @@ class LoopDevice(StorageDevice):
def _postTeardown(self, recursive=False):
StorageDevice._postTeardown(self, recursive=recursive)
- self.name = "tmploop%d" % self.id
+ self._name = "tmploop%d" % self.id
self.sysfsPath = ''
@property
@@ -5123,10 +5123,10 @@ class BTRFSVolumeDevice(BTRFSDevice, ContainerDevice):
def _setFormat(self, fmt):
""" Set the Device's format. """
super(BTRFSVolumeDevice, self)._setFormat(fmt)
- self.name = "btrfs.%d" % self.id
+ self._name = "btrfs.%d" % self.id
label = getattr(self.format, "label", None)
if label:
- self.name = label
+ self._name = label
def _getSize(self):
size = sum([d.size for d in self.parents])
--
1.9.3
9 years, 11 months
[master][PATCH] Don't install implicitly added but explicitly excluded packages (#1105013)
by Vratislav Podzimek
Users are responsible for package selection in case they explicitly excluded one
of storage/bootloader-required packages.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/install.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/install.py b/pyanaconda/install.py
index 2bdbbd1..050c832 100644
--- a/pyanaconda/install.py
+++ b/pyanaconda/install.py
@@ -197,8 +197,10 @@ def doInstall(storage, payload, ksdata, instClass):
if not ksdata.bootloader.disabled:
packages += storage.bootloader.packages
- # don't try to install packages from the install class' ignored list
- packages = [p for p in packages if p not in instClass.ignoredPackages]
+ # don't try to install packages from the install class' ignored list and the
+ # explicitly excluded ones (user takes the responsibility)
+ packages = [p for p in packages
+ if p not in instClass.ignoredPackages and p not in ksdata.packages.excludedList]
payload.preInstall(packages=packages, groups=payload.languageGroups())
payload.install()
--
1.9.3
9 years, 11 months
[master] Fix the paths we check for spokes.
by Samantha N. Bueno
---
pyanaconda/ui/gui/__init__.py | 4 ++--
pyanaconda/ui/tui/__init__.py | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/pyanaconda/ui/gui/__init__.py b/pyanaconda/ui/gui/__init__.py
index 56d1885..917e0a3 100644
--- a/pyanaconda/ui/gui/__init__.py
+++ b/pyanaconda/ui/gui/__init__.py
@@ -270,10 +270,10 @@ class GraphicalUserInterface(UserInterface):
os.path.join(path, "categories"))
for path in pathlist],
"spokes": [(basemask + ".gui.spokes.%s",
- os.path.join(path, "spokes"))
+ os.path.join(path, "gui/spokes"))
for path in pathlist],
"hubs": [(basemask + ".gui.hubs.%s",
- os.path.join(path, "hubs"))
+ os.path.join(path, "gui/hubs"))
for path in pathlist]
}
diff --git a/pyanaconda/ui/tui/__init__.py b/pyanaconda/ui/tui/__init__.py
index 8767f8a..89c3f30 100644
--- a/pyanaconda/ui/tui/__init__.py
+++ b/pyanaconda/ui/tui/__init__.py
@@ -109,10 +109,10 @@ class TextUserInterface(ui.UserInterface):
os.path.join(path, "categories"))
for path in pathlist],
"spokes": [(basemask + ".tui.spokes.%s",
- os.path.join(path, "spokes"))
+ os.path.join(path, "tui/spokes"))
for path in pathlist],
"hubs": [(basemask + ".tui.hubs.%s",
- os.path.join(path, "hubs"))
+ os.path.join(path, "tui/hubs"))
for path in pathlist]
}
--
1.8.3.1
9 years, 11 months
[PATCH] Use /usr/lib* in updates images.
by David Shea
The liveinst script overwrites the /lib symlink on the filesystem when
/lib is in an updates image, which is not ideal.
---
scripts/makeupdates | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/makeupdates b/scripts/makeupdates
index d9fd7a3..257626a 100755
--- a/scripts/makeupdates
+++ b/scripts/makeupdates
@@ -374,10 +374,10 @@ def copyUpdatedIsys(updates, srcdir, builddir):
def copyUpdatedWidgets(updates, srcdir, builddir):
os.chdir(srcdir)
- if os.path.isdir("/lib64"):
- libdir = "/lib64/"
+ if os.path.isdir("/usr/lib64"):
+ libdir = "/usr/lib64/"
else:
- libdir = "/lib/"
+ libdir = "/usr/lib/"
if not os.path.isdir(updates + libdir):
os.makedirs(updates + libdir)
--
2.0.0
9 years, 11 months