[PATCH] Symlink /run/initramfs/inst.{updates,product} to /tmp

Jesse Keating jkeating at redhat.com
Wed Aug 29 16:24:50 UTC 2012


/tmp is tmpfs and is created at boot time, so we cannot unpack our
updates there in dracut as they will be lost.  Instead unpack them to
/run/initramfs/inst.{updates,product} and create a symlink when anaconda
starts so that it can continue to look for content there.
---
 anaconda            | 7 +++++++
 scripts/makeupdates | 7 ++++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/anaconda b/anaconda
index c2b8d08..be8dbef 100755
--- a/anaconda
+++ b/anaconda
@@ -139,6 +139,13 @@ def set_x_resolution(runres):
 def setupPythonUpdates():
     from distutils.sysconfig import get_python_lib
 
+    # Temporary hack for F18 alpha to symlink updates and product directories
+    # into tmpfs.  To be removed after alpha in order to directly use content
+    # from /run/initramfs/ -- JLK
+    for dirname in ("updates", "product"):
+        if os.path.exists("/run/initramfs/inst.%s" % dirname):
+            os.symlink("/run/initramfs/inst.%s", "/tmp/%s" % (dirname, dirname))
+
     if not os.path.exists("/tmp/updates"):
         return
 
diff --git a/scripts/makeupdates b/scripts/makeupdates
index 0d5ccea..6391ffb 100755
--- a/scripts/makeupdates
+++ b/scripts/makeupdates
@@ -110,10 +110,11 @@ def copyUpdatedFiles(tag, updates, cwd):
     subdirs = []
 
     # Updates get overlaid onto the runtime filesystem. Anaconda expects them
-    # to be in /tmp/updates, so put them in $updatedir/tmp/updates.
+    # to be in /run/initramfs/inst.updates, so put them in
+    # $updatedir/run/initramfs/inst.updates.
     tmpupdates = updates.rstrip('/')
-    if not tmpupdates.endswith("/tmp/updates"):
-        tmpupdates = os.path.join(tmpupdates, "tmp/updates")
+    if not tmpupdates.endswith("/run/initramfs/inst.updates"):
+        tmpupdates = os.path.join(tmpupdates, "run/initramfs/inst.updates")
 
     lines = doGitDiff(tag)
     for line in lines:
-- 
1.7.11.2



More information about the anaconda-patches mailing list