summaryrefslogtreecommitdiffstats
path: root/scripts/makeupdates
diff options
context:
space:
mode:
authorBrian C. Lane <bcl@redhat.com>2012-06-20 15:34:11 -0700
committerBrian C. Lane <bcl@redhat.com>2012-06-20 15:34:11 -0700
commit7e1b1abc04a7dde1a4153d5e61bf0207f77d583c (patch)
tree5a184496f757df6a61c5fd423667b94ecdb04859 /scripts/makeupdates
parentcbebb0210fba5ed5e74e01715f832d5e5929a8d5 (diff)
parent11b3901231af7e8f57aa362873d5d18caee14386 (diff)
downloadanaconda-7e1b1abc04a7dde1a4153d5e61bf0207f77d583c.tar.gz
anaconda-7e1b1abc04a7dde1a4153d5e61bf0207f77d583c.tar.xz
anaconda-7e1b1abc04a7dde1a4153d5e61bf0207f77d583c.zip
Merge branch 'master' into newui-merge
Conflicts: Makefile.am anaconda anaconda.spec.in loader/loader.c loader/net.c loader/unpack.c po/POTFILES.in pyanaconda/__init__.py pyanaconda/bootloader.py pyanaconda/cmdline.py pyanaconda/constants.py pyanaconda/dispatch.py pyanaconda/errors.py pyanaconda/flags.py pyanaconda/iutil.py pyanaconda/kickstart.py pyanaconda/platform.py pyanaconda/storage/__init__.py pyanaconda/storage/devicetree.py pyanaconda/storage/fcoe.py pyanaconda/storage/formats/swap.py pyanaconda/storage/iscsi.py pyanaconda/storage/partitioning.py pyanaconda/yuminstall.py scripts/makeupdates
Diffstat (limited to 'scripts/makeupdates')
-rwxr-xr-xscripts/makeupdates43
1 files changed, 30 insertions, 13 deletions
diff --git a/scripts/makeupdates b/scripts/makeupdates
index e709938ae..1b8626dd4 100755
--- a/scripts/makeupdates
+++ b/scripts/makeupdates
@@ -1,9 +1,8 @@
#!/usr/bin/python
#
# makeupdates - Generate an updates.img containing changes since the last
-# tag, but only changes that do not need to be compiled. If
-# you need an updated _isys.so or a new loader, you should
-# still compile things as usual.
+# tag, but only changes to the main anaconda runtime.
+# initrd/stage1 updates have to be created separately.
#
# Copyright (C) 2009 Red Hat, Inc.
#
@@ -110,6 +109,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()
@@ -134,25 +139,37 @@ def copyUpdatedFiles(tag, updates, cwd):
uidir = os.path.dirname(file).split(os.path.sep)[-1]
install_to_dir(file, os.path.join("ui",uidir))
elif file.startswith('pyanaconda/'):
- sys.stdout.write("Including %s\n" % (file,))
- update_filename = os.path.realpath(os.path.join(updates, file))
- update_dir = os.path.dirname(update_filename)
- if not os.path.isdir(update_dir):
- os.makedirs(update_dir)
- shutil.copy2(file, update_dir)
+ # pyanaconda stuff goes into /tmp/updates/[path]
+ dirname = os.path.join(tmpupdates, os.path.dirname(file))
+ install_to_dir(file, dirname)
+ elif file == 'anaconda':
+ # anaconda itself we just overwrite
+ install_to_dir(file, "usr/sbin")
+ elif file.endswith('.service') or file.endswith(".target"):
+ # same for systemd services
+ install_to_dir(file, "lib/systemd/system")
+ elif file.endswith('/anaconda-generator'):
+ # yeah, this should probably be more clever..
+ install_to_dir(file, "lib/systemd/system-generators")
+ elif file == "data/liveinst/liveinst":
+ install_to_dir(file, "usr/sbin")
+ elif file == "data/70-anaconda.rules":
+ install_to_dir(file, "lib/udev/rules.d")
+ elif file.startswith("data/ui/"):
+ install_to_dir(file, "usr/share/anaconda/ui")
elif file.find('/') != -1:
fields = file.split('/')
subdir = fields[0]
- if subdir in ['loader', 'po', 'scripts','command-stubs', 'tests',
+ if subdir in ['po', 'scripts','command-stubs', 'tests',
'bootdisk', 'docs', 'fonts', 'utils', 'gptsync',
- 'liveinst']:
+ 'liveinst', 'dracut', 'data']:
continue
else:
sys.stdout.write("Including %s\n" % (file,))
- shutil.copy2(file, updates)
+ shutil.copy2(file, tmpupdates)
else:
sys.stdout.write("Including %s\n" % (file,))
- shutil.copy2(file, updates)
+ shutil.copy2(file, tmpupdates)
def isysChanged(tag):
lines = doGitDiff(tag, ['isys'])