[PATCH anaconda/master] Add a platform weight for ARM images to ensure the root partition '/' is the the last partition in the image. This is required to allow resizing the root partition on firstboot.
by d.marlin
From: "d.marlin" <dmarlin(a)redhat.com>
Signed-off-by: David A. Marlin <dmarlin(a)redhat.com>
---
pyanaconda/platform.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/pyanaconda/platform.py b/pyanaconda/platform.py
index 64b9cc8..2614e41 100644
--- a/pyanaconda/platform.py
+++ b/pyanaconda/platform.py
@@ -350,6 +350,15 @@ class ARM(Platform):
self._armMachine = iutil.getARMMachine()
return self._armMachine
+ def weight(self, fstype=None, mountpoint=None):
+ """Return the ARM platform-specific weight for the / partition.
+ On ARM images '/' must be the last partition, so we try to
+ weight it accordingly."""
+ if mountpoint == "/":
+ return -100
+ else:
+ return Platform.weight(self, fstype=fstype, mountpoint=mountpoint)
+
class omapARM(ARM):
_boot_stage1_format_types = ["vfat"]
_boot_stage1_device_types = ["partition"]
--
1.7.10.2
11 years, 7 months
[PATCH] Font and padding updates for the network spoke (mizmo).
by Chris Lumens
---
pyanaconda/ui/gui/spokes/network.glade | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/network.glade b/pyanaconda/ui/gui/spokes/network.glade
index 37a3189..27afea8 100644
--- a/pyanaconda/ui/gui/spokes/network.glade
+++ b/pyanaconda/ui/gui/spokes/network.glade
@@ -75,7 +75,7 @@
<property name="label" translatable="yes">We'll need network access to fetch information about your location and to make software
updates available for you.</property>
<attributes>
- <attribute name="font-desc" value="Sans 14"/>
+ <attribute name="font-desc" value="Cantarell 12"/>
</attributes>
</object>
<packing>
@@ -121,10 +121,14 @@ updates available for you.</property>
</child>
<child internal-child="alignment">
<object class="GtkAlignment" id="AnacondaSpokeWindow-alignment1">
+ <property name="margin_top">12</property>
<property name="can_focus">False</property>
<property name="yalign">0</property>
- <property name="xscale">0</property>
- <property name="yscale">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="bottom_padding">48</property>
+ <property name="left_padding">24</property>
+ <property name="right_padding">24</property>
<child internal-child="action_area">
<object class="GtkBox" id="networkWindow-actionArea">
<property name="can_focus">False</property>
@@ -134,7 +138,6 @@ updates available for you.</property>
<object class="GtkVBox" id="networkControlBox_vbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="border_width">10</property>
<property name="spacing">12</property>
<child>
<object class="GtkVBox" id="vbox2">
--
1.7.11.2
11 years, 7 months
[PATCH] Fix alignment on the Add and Configure Mount Point dialogs.
by Chris Lumens
---
pyanaconda/ui/gui/spokes/custom.glade | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/custom.glade b/pyanaconda/ui/gui/spokes/custom.glade
index c9b77b6..52a5dc1 100644
--- a/pyanaconda/ui/gui/spokes/custom.glade
+++ b/pyanaconda/ui/gui/spokes/custom.glade
@@ -91,7 +91,7 @@
<object class="GtkLabel" id="label6">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">1</property>
+ <property name="xalign">0</property>
<property name="label" translatable="yes"><b>Mount Point:</b></property>
<property name="use_markup">True</property>
</object>
@@ -107,6 +107,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_bottom">12</property>
+ <property name="xalign">0</property>
<property name="label" translatable="yes">ADD A NEW MOUNT POINT</property>
<attributes>
<attribute name="weight" value="bold"/>
@@ -1673,6 +1674,7 @@ you'll be able to view their details here.</property>
<object class="GtkLabel" id="disk_selection_title_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="xalign">0</property>
<property name="label" translatable="yes">CONFIGURE MOUNT POINT</property>
<attributes>
<attribute name="weight" value="bold"/>
--
1.7.11.2
11 years, 7 months
[PATCH] Fix traceback when saving changes to an existing partition. (#872446)
by David Lehman
---
pyanaconda/ui/gui/spokes/custom.py | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index 5bbc50a..4a33684 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -1160,10 +1160,11 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
## SIZE
##
# new size means resize for existing devices and adjust for new ones
- if int(size) != int(device.size) or changed_disk_set:
+ changed_size = (int(size) != int(device.size))
+ if changed_size or changed_disk_set:
self.clear_errors()
old_size = device.size
- if device.exists and device.resizable:
+ if changed_size and device.exists and device.resizable:
with ui_storage_logger():
try:
self.__storage.resizeDevice(device, size)
@@ -1179,7 +1180,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
log.debug("%r" % device)
log.debug("new size: %s" % device.size)
log.debug("target size: %s" % device.targetSize)
- else:
+ elif not device.exists:
if changed_disk_set:
log.info("changing disk set from %s to %s"
% ([d.name for d in device.disks],
@@ -1501,7 +1502,11 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
else:
use_dev = device
- self._device_disks = getattr(use_dev, "req_disks", use_dev.disks)
+ if hasattr(use_dev, "req_disks") and not use_dev.exists:
+ self._device_disks = use_dev.req_disks[:]
+ else:
+ self._device_disks = device.disks[:]
+
log.debug("updated device_disks to %s" % [d.name for d in self._device_disks])
selectedDeviceLabel.set_text(selector.props.name)
--
1.7.7.6
11 years, 7 months
[PATCH] Fix nfsiso as stage2 (#871554)
by Jesse Keating
This is an ugly hack, but it gets nfsiso working. You can switch from
NFSISO to another source, and back to the same NFSISO, just not to a
different NFSISO. That's going to have to be a "known issue" for F18
Beta.
---
pyanaconda/packaging/yumpayload.py | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py
index 787f951..50f281d 100644
--- a/pyanaconda/packaging/yumpayload.py
+++ b/pyanaconda/packaging/yumpayload.py
@@ -133,9 +133,14 @@ class YumPayload(PackagePayload):
if self.install_device and \
get_mount_device(ISO_DIR) == self.install_device.path:
self.install_device.teardown(recursive=True)
- else:
- # NFS
- isys.umount(ISO_DIR, removeDir=False)
+ # The below code will fail when nfsiso is the stage2 source
+ # But if we don't do this we may not be able to switch from
+ # one nfsiso repo to another nfsiso repo. We need to have a
+ # way to detect the stage2 state and work around it.
+ # Commenting out the below is a hack for F18. FIXME
+ #else:
+ # # NFS
+ # isys.umount(ISO_DIR, removeDir=False)
self.install_device = None
--
1.7.11.4
11 years, 7 months
[master] Add support for UTC and GMT-X timezones
by Vratislav Podzimek
I tried to do only minimum changes to the widget.
Vratislav Podzimek (2):
TimezoneMap should handle "" timezone
Add UTC and GMT-X timezones (#863199)
pyanaconda/timezone.py | 14 +++++++++++-
pyanaconda/ui/gui/spokes/datetime_spoke.py | 35 ++++++++++++++++++++++++------
widgets/src/TimezoneMap.c | 35 ++++++++++++++++++++++--------
3 files changed, 67 insertions(+), 17 deletions(-)
--
1.7.11.7
11 years, 7 months
[PATCH] Don't decorate the main exception window.
by Chris Lumens
Note that we'll never be able to mark all the exception reporting windows as
undecorated because those all come from libreport instead of us. But this is
at least a start.
---
pyanaconda/ui/gui/__init__.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/pyanaconda/ui/gui/__init__.py b/pyanaconda/ui/gui/__init__.py
index 5bf1453..7acf46d 100644
--- a/pyanaconda/ui/gui/__init__.py
+++ b/pyanaconda/ui/gui/__init__.py
@@ -152,6 +152,7 @@ class GraphicalUserInterface(UserInterface):
meh_intf = meh.ui.gui.GraphicalIntf()
exc_window = meh_intf.mainExceptionWindow(text, exn_file)
+ exc_window.main_window.set_decorated(False)
# exception may appear before self._actions gets populated
if len(self._actions) > 0:
--
1.7.11.2
11 years, 7 months
[PATCH 01/10] Use the same terminology for partitions as is in use on the custom spoke.
by Chris Lumens
---
pyanaconda/ui/gui/spokes/storage.glade | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/storage.glade b/pyanaconda/ui/gui/spokes/storage.glade
index 6cd96f7..5d12c84 100644
--- a/pyanaconda/ui/gui/spokes/storage.glade
+++ b/pyanaconda/ui/gui/spokes/storage.glade
@@ -130,7 +130,7 @@
<property name="can_focus">False</property>
<property name="active">2</property>
<items>
- <item translatable="yes">Plain</item>
+ <item translatable="yes">Standard Partition</item>
<item translatable="yes">BTRFS</item>
<item translatable="yes">LVM</item>
</items>
@@ -462,7 +462,7 @@
<property name="can_focus">False</property>
<property name="active">2</property>
<items>
- <item translatable="yes">Plain</item>
+ <item translatable="yes">Standard Partition</item>
<item translatable="yes">BTRFS</item>
<item translatable="yes">LVM</item>
</items>
--
1.7.11.2
11 years, 7 months
[PATCH] Add progress percentage info to liveinst
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
This adds a thread that uses os.statvfs to monitor the amount data
that has been copied to the destination mountpoints.
---
pyanaconda/packaging/livepayload.py | 37 ++++++++++++++++++++++++++++++++++++-
1 file changed, 36 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/packaging/livepayload.py b/pyanaconda/packaging/livepayload.py
index e47f46f..91493de 100644
--- a/pyanaconda/packaging/livepayload.py
+++ b/pyanaconda/packaging/livepayload.py
@@ -31,6 +31,8 @@
"""
import os
import stat
+from time import sleep
+from threading import Lock
from pyanaconda import isys
from . import *
@@ -46,6 +48,7 @@ log = logging.getLogger("anaconda")
from pyanaconda.errors import *
from pyanaconda import progress
from pyanaconda.storage.size import Size
+from pyanaconda.threads import threadMgr, AnacondaThread
import gettext
_ = lambda x: gettext.ldgettext("anaconda", x)
@@ -66,10 +69,34 @@ class LiveImagePayload(ImagePayload):
def preInstall(self, packages=None, groups=None):
""" Perform pre-installation tasks. """
super(LiveImagePayload, self).preInstall(packages=packages, groups=groups)
- progress.send_message(_("Installing software"))
+ progress.send_message(_("Installing software %d%%") % (0,))
+
+ def progress(self):
+ """Monitor the amount of disk space used on the target and source and
+ update the hub's progress bar.
+ """
+ source = os.statvfs(INSTALL_TREE)
+ source_size = source.f_frsize * (source.f_blocks - source.f_bfree)
+ mountpoints = self.storage.mountpoints.copy()
+ while self.pct < 100:
+ dest_size = 0
+ for mnt in mountpoints:
+ mnt_stat = os.statvfs(ROOT_PATH+mnt)
+ dest_size += mnt_stat.f_frsize * (mnt_stat.f_blocks - mnt_stat.f_bfree)
+
+ with self.pct_lock:
+ self.pct = int(100 * dest_size / source_size)
+
+ progress.send_message(_("Installing software %d%%") % (min(100,self.pct),))
+ sleep(0.777)
def install(self):
""" Install the payload. """
+ self.pct_lock = Lock()
+ self.pct = 0
+ threadMgr.add(AnacondaThread(name="AnaLiveProgressThread",
+ target=self.progress))
+
cmd = "rsync"
# preserve: permissions, owners, groups, ACL's, xattrs, times,
# symlinks, hardlinks
@@ -91,8 +118,16 @@ class LiveImagePayload(ImagePayload):
if errorHandler.cb(exn) == ERROR_RAISE:
raise exn
+ # Wait for progress thread to finish
+ with self.pct_lock:
+ self.pct = 100
+ progressThread = threadMgr.get("AnaLiveProgressThread")
+ if progressThread:
+ progressThread.join()
+
def postInstall(self):
""" Perform post-installation tasks. """
+ progress.send_message(_("Performing post-install setup tasks"))
isys.umount(INSTALL_TREE, removeDir=True)
super(LiveImagePayload, self).postInstall()
--
1.7.11.7
11 years, 7 months
[PATCH] livecd specific code has moved
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
it is now in pyanaconda/packaging/livepayload.py
---
pyanaconda/livecd.py | 338 ---------------------------------------------------
1 file changed, 338 deletions(-)
delete mode 100644 pyanaconda/livecd.py
diff --git a/pyanaconda/livecd.py b/pyanaconda/livecd.py
deleted file mode 100644
index cb1166a..0000000
--- a/pyanaconda/livecd.py
+++ /dev/null
@@ -1,338 +0,0 @@
-#
-# livecd.py: An anaconda backend to do an install from a live CD image
-#
-# The basic idea is that with a live CD, we already have an install
-# and should be able to just copy those bits over to the disk. So we dd
-# the image, move things to the "right" filesystem as needed, and then
-# resize the rootfs to the size of its container.
-#
-# Copyright (C) 2007 Red Hat, Inc. All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# Author(s): Jeremy Katz <katzj(a)redhat.com>
-#
-
-import os, sys
-import stat
-import shutil
-import time
-import subprocess
-import storage
-
-import selinux
-
-from flags import flags
-from constants import *
-
-import gettext
-_ = lambda x: gettext.ldgettext("anaconda", x)
-
-import backend
-import isys
-import iutil
-
-import packages
-
-import logging
-log = logging.getLogger("anaconda")
-
-class Error(EnvironmentError):
- pass
-def copytree(src, dst, symlinks=False, preserveOwner=False,
- preserveSelinux=False):
- def tryChown(src, dest):
- try:
- os.chown(dest, os.stat(src)[stat.ST_UID], os.stat(src)[stat.ST_GID])
- except OverflowError:
- log.error("Could not set owner and group on file %s" % dest)
-
- def trySetfilecon(src, dest):
- try:
- selinux.lsetfilecon(dest, selinux.lgetfilecon(src)[1])
- except OSError:
- log.error("Could not set selinux context on file %s" % dest)
-
- # copy of shutil.copytree which doesn't require dst to not exist
- # and which also has options to preserve the owner and selinux contexts
- names = os.listdir(src)
- if not os.path.isdir(dst):
- os.makedirs(dst)
- errors = []
- for name in names:
- srcname = os.path.join(src, name)
- dstname = os.path.join(dst, name)
- try:
- if symlinks and os.path.islink(srcname):
- linkto = os.readlink(srcname)
- os.symlink(linkto, dstname)
- if preserveSelinux:
- trySetfilecon(srcname, dstname)
- elif os.path.isdir(srcname):
- copytree(srcname, dstname, symlinks, preserveOwner, preserveSelinux)
- else:
- shutil.copyfile(srcname, dstname)
- if preserveOwner:
- tryChown(srcname, dstname)
-
- if preserveSelinux:
- trySetfilecon(srcname, dstname)
-
- shutil.copystat(srcname, dstname)
- except (IOError, OSError) as why:
- errors.append((srcname, dstname, str(why)))
- # catch the Error from the recursive copytree so that we can
- # continue with other files
- except Error as err:
- errors.extend(err.args[0])
- try:
- if preserveOwner:
- tryChown(src, dst)
- if preserveSelinux:
- trySetfilecon(src, dst)
-
- shutil.copystat(src, dst)
- except OSError as e:
- errors.extend((src, dst, e.strerror))
- if errors:
- raise Error, errors
-
-class LiveCDCopyBackend(backend.AnacondaBackend):
- def __init__(self, anaconda):
- backend.AnacondaBackend.__init__(self, anaconda)
- flags.livecdInstall = True
- self.supportsUpgrades = False
- self.supportsPackageSelection = False
- self.skipFormatRoot = True
-
- osimg_path = anaconda.methodstr[9:]
- if not stat.S_ISBLK(os.stat(osimg_path)[stat.ST_MODE]):
- anaconda.intf.messageWindow(_("Unable to find image"),
- _("The given location isn't a valid %s "
- "live CD to use as an installation source.")
- %(productName,), type = "custom",
- custom_icon="error",
- custom_buttons=[_("Exit installer")])
- sys.exit(0)
-
- def postAction(self, anaconda):
- try:
- anaconda.storage.umountFilesystems(swapoff = False)
- os.rmdir(ROOT_PATH)
- except Exception as e:
- log.error("Unable to unmount filesystems: %s" % e)
-
- def doPreInstall(self, anaconda):
- anaconda.storage.umountFilesystems(swapoff = False)
-
- def doInstall(self, anaconda):
- log.info("Preparing to install packages")
-
- progress = anaconda.intf.instProgress
- progress.set_label(_("Copying live image to hard drive."))
- progress.processEvents()
-
- osfd = os.open(self.anaconda.storage.liveImage.path, os.O_RDONLY)
-
- rootDevice = anaconda.storage.rootDevice
- rootDevice.setup()
- rootfd = os.open(rootDevice.path, os.O_WRONLY)
-
- readamt = 1024 * 1024 * 8 # 8 megs at a time
- size = self.anaconda.storage.liveImage.format.currentSize * 1024 * 1024
- copied = 0
- done = False
- while not done:
- try:
- buf = os.read(osfd, readamt)
- written = os.write(rootfd, buf)
- except (IOError, OSError):
- rc = anaconda.intf.messageWindow(_("Error"),
- _("There was an error installing the live image to "
- "your hard drive. This could be due to bad media. "
- "Please verify your installation media.\n\nIf you "
- "exit, your system will be left in an inconsistent "
- "state that will require reinstallation."),
- type="custom", custom_icon="error",
- custom_buttons=[_("_Exit installer"), _("_Retry")])
-
- if rc == 0:
- sys.exit(0)
- else:
- os.lseek(osfd, 0, 0)
- os.lseek(rootfd, 0, 0)
- copied = 0
- continue
-
- if (written < readamt):
- # Either something went wrong with the write
- if (written < len(buf)):
- raise RuntimeError, "error copying filesystem!"
- else:
- # Or we're done
- done = True
- copied += written
- progress.set_fraction(pct = copied / float(size))
- progress.processEvents()
-
- os.close(osfd)
- os.close(rootfd)
-
- anaconda.intf.setInstallProgressClass(None)
-
- def _doFilesystemMangling(self, anaconda):
- log.info("doing post-install fs mangling")
- wait = anaconda.intf.waitWindow(_("Post-Installation"),
- _("Performing post-installation filesystem changes. This may take several minutes."))
-
- # resize rootfs first, since it is 100% full due to genMinInstDelta
- rootDevice = anaconda.storage.rootDevice
- rootDevice.setup()
-
- # This is a workaround to make sure the m_time it set to current time so that
- # the e2fsck before resizing doesn't get confused by times in the future
- rootDevice.format.testMount()
-
- rootDevice.format.targetSize = rootDevice.size
- rootDevice.format.doResize(intf=anaconda.intf)
-
- # ensure we have a random UUID on the rootfs
- rootDevice.format.writeRandomUUID()
-
- # remount filesystems
- anaconda.storage.mountFilesystems()
-
- # and now set the uuid in the storage layer
- rootDevice.updateSysfsPath()
- iutil.notify_kernel("/sys%s" %rootDevice.sysfsPath)
- storage.udev.udev_settle()
- rootDevice.updateSysfsPath()
- info = storage.udev.udev_get_block_device(rootDevice.sysfsPath)
- rootDevice.format.uuid = storage.udev.udev_device_get_uuid(info)
- log.info("reset the rootdev (%s) to have a uuid of %s" %(rootDevice.sysfsPath, rootDevice.format.uuid))
-
- # for any filesystem that's _not_ on the root, we need to handle
- # moving the bits from the livecd -> the real filesystems.
- # this is pretty distasteful, but should work with things like
- # having a separate /usr/local
-
- def _setupFilesystems(mounts, chroot="", teardown=False):
- """ Setup or teardown all filesystems except for "/" """
- mountpoints = sorted(mounts.keys(),
- reverse=teardown is True)
- if teardown:
- method = "teardown"
- kwargs = {}
- else:
- method = "setup"
- kwargs = {"chroot": chroot}
-
- mountpoints.remove("/")
- for mountpoint in mountpoints:
- device = mounts[mountpoint]
- getattr(device.format, method)(**kwargs)
-
- # Start by sorting the mountpoints in decreasing-depth order.
- # Only include ones that exist on the original livecd filesystem
- mountpoints = filter(os.path.exists,
- sorted(anaconda.storage.mountpoints.keys(),
- reverse=True))
- # We don't want to copy the root filesystem.
- mountpoints.remove("/")
- stats = {} # mountpoint: posix.stat_result
-
- # unmount the filesystems, except for /
- _setupFilesystems(anaconda.storage.mountpoints, teardown=True)
-
- # mount all of the filesystems under /mnt so we can copy in content
- _setupFilesystems(anaconda.storage.mountpoints,
- chroot="/mnt")
-
- # And now let's do the real copies
- for tocopy in mountpoints:
- device = anaconda.storage.mountpoints[tocopy]
- source = "%s/%s" % (ROOT_PATH, tocopy)
- dest = "/mnt/%s" % (tocopy,)
-
- # FIXME: all calls to wait.refresh() are kind of a hack... we
- # should do better about not doing blocking things in the
- # main thread. but threading anaconda is a job for another
- # time.
- wait.refresh()
-
- try:
- log.info("Gathering stats on %s" % (source,))
- stats[tocopy]= os.stat(source)
- except Exception as e:
- log.info("failed to get stat info for mountpoint %s: %s"
- % (source, e))
-
- log.info("Copying %s to %s" % (source, dest))
- copytree(source, dest, True, True, flags.selinux)
- wait.refresh()
-
- log.info("Removing %s" % (source,))
- shutil.rmtree(source)
- wait.refresh()
-
- # unmount the target filesystems and remount in their final locations
- # so that post-install writes end up where they're supposed to end up
- _setupFilesystems(anaconda.storage.mountpoints, teardown=True)
- _setupFilesystems(anaconda.storage.mountpoints,
- chroot=ROOT_PATH)
-
- # restore stat info for each mountpoint
- for mountpoint in reversed(mountpoints):
- dest = "%s/%s" % (ROOT_PATH, mountpoint)
- log.info("Restoring stats on %s" % (dest,))
- st = stats[mountpoint]
-
- # restore the correct stat info for this mountpoint
- os.utime(dest, (st.st_atime, st.st_mtime))
- os.chown(dest, st.st_uid, st.st_gid)
- os.chmod(dest, stat.S_IMODE(st.st_mode))
-
- wait.pop()
-
- def doPostInstall(self, anaconda):
- import rpm
-
- self._doFilesystemMangling(anaconda)
-
- storage.writeEscrowPackets(anaconda)
-
- packages.rpmSetupGraphicalSystem(anaconda)
-
- # now write out the "real" fstab and mtab
- anaconda.storage.write()
-
- # copy over the modprobe.conf
- if os.path.exists("/etc/modprobe.conf"):
- shutil.copyfile("/etc/modprobe.conf",
- ROOT_PATH + "/etc/modprobe.conf")
-
- # rebuild the initrd(s)
- vers = self.kernelVersionList()
- for (n, arch, tag) in vers:
- packages.recreateInitrd(n, ROOT_PATH)
-
- def kernelVersionList(self):
- return packages.rpmKernelVersionList()
-
- def getMinimumSizeMB(self, part):
- if part == "/":
- return self.anaconda.storage.liveImage.format.size
- return 0
-
-
--
1.7.11.7
11 years, 7 months