summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--livecd.py16
2 files changed, 21 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 1c3a37ca1..10953011f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2007-01-18 Jeremy Katz <katzj@redhat.com>
+ * livecd.py (LiveCDCopyBackend._doFilesystemMangling): Remove
+ mountpoint dirs
+ (LiveCDCopyBackend._doFilesystemMangling): Hack to reset file
+ contexts on copied directory trees. Our copy should do the preserving.
+
* gui.py: Tweak various dialog types to work better with a real
window manager; handle the case of a running system at 800x600
where we were a bit too constrained in screen real-estate
diff --git a/livecd.py b/livecd.py
index cf25320b3..9f4e15627 100644
--- a/livecd.py
+++ b/livecd.py
@@ -173,6 +173,22 @@ class LiveCDCopyBackend(backend.AnacondaBackend):
shutil.rmtree("%s/%s" %(anaconda.rootPath, tocopy))
entry.umount(anaconda.rootPath + "/mnt")
entry.mount(anaconda.rootPath)
+ try:
+ os.rmdir("%s/mnt/%s" %(anaconda.rootPath, tocopy))
+ except OSError, e:
+ log.debug("error removing %s" %(tocopy,))
+ pass
+
+ # XXX: we should be preserving contexts on our copy, but
+ # this will do for now
+ for dir, subdirs, files in os.walk("%s/%s" %(anaconda.rootPath, tocopy)):
+ dir = dir[anaconda.rootPath:]
+ for f in map(lambda x: "%s/%s" %(dir, x), files):
+ if not os.access(f, os.R_OK):
+ continue
+ ret = isys.resetFileContext(os.path.normpath(f),
+ anaconda.rootPath)
+ log.info("set fc of %s to %s" %(f, ret)
# ensure that non-fstab filesystems are mounted in the chroot
if flags.selinux: