summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorWill Woods <wwoods@redhat.com>2012-03-19 18:18:00 -0400
committerWill Woods <wwoods@redhat.com>2012-03-19 20:52:53 -0400
commit39af8b26b386571128c5e47d3ecef123d141d168 (patch)
tree4ffe227ca11a67108d814ffefb28885bf73e9aee /scripts
parent37144b9e86e801074fa4ae4656da458fe83f6e07 (diff)
downloadanaconda-39af8b26b386571128c5e47d3ecef123d141d168.tar.gz
anaconda-39af8b26b386571128c5e47d3ecef123d141d168.tar.xz
anaconda-39af8b26b386571128c5e47d3ecef123d141d168.zip
makeupdates: put files the right places
Anaconda wants to find its files in /tmp/updates, so put them under tmp/updates in the updates image. The one exception to this is anaconda itself, which should be in /usr/sbin. Also skip dracut/ as we can't sanely update those things (yet).
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/makeupdates21
1 files changed, 17 insertions, 4 deletions
diff --git a/scripts/makeupdates b/scripts/makeupdates
index ee1eaa86c..96a68eef6 100755
--- a/scripts/makeupdates
+++ b/scripts/makeupdates
@@ -102,6 +102,12 @@ 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.
+ tmpupdates = updates.rstrip('/')
+ if not tmpupdates.endswith("/tmp/updates"):
+ tmpupdates = os.path.join(tmpupdates, "tmp/updates")
+
lines = doGitDiff(tag)
for line in lines:
fields = line.split()
@@ -122,7 +128,7 @@ def copyUpdatedFiles(tag, updates, cwd):
if file.startswith('pyanaconda/'):
sys.stdout.write("Including %s\n" % (file,))
- update_filename = os.path.realpath(os.path.join(updates, file))
+ update_filename = os.path.realpath(os.path.join(tmpupdates, file))
update_dir = os.path.dirname(update_filename)
if not os.path.isdir(update_dir):
os.makedirs(update_dir)
@@ -132,14 +138,21 @@ def copyUpdatedFiles(tag, updates, cwd):
subdir = fields[0]
if subdir in ['po', 'scripts','command-stubs', 'tests',
'bootdisk', 'docs', 'fonts', 'utils', 'gptsync',
- 'liveinst']:
+ 'liveinst', 'dracut']:
continue
else:
sys.stdout.write("Including %s\n" % (file,))
- shutil.copy2(file, updates)
+ shutil.copy2(file, tmpupdates)
+ elif file == 'anaconda':
+ # anaconda itself we just overwrite
+ sys.stdout.write("Including anaconda\n")
+ sbindir = os.path.join(updates, "usr/sbin")
+ if not os.path.isdir(sbindir):
+ os.makedirs(sbindir)
+ shutil.copy2(file, sbindir)
else:
sys.stdout.write("Including %s\n" % (file,))
- shutil.copy2(file, updates)
+ shutil.copy2(file, tmpupdates)
def isysChanged(tag):
lines = doGitDiff(tag, ['isys'])