copy systemd .service/.target files into the appropriate directory. also, some cleanups for makeupdates. whee! --- scripts/makeupdates | 29 ++++++++++++++++------------- 1 files changed, 16 insertions(+), 13 deletions(-) diff --git a/scripts/makeupdates b/scripts/makeupdates index 96a68ee..c51c4ed 100755 --- a/scripts/makeupdates +++ b/scripts/makeupdates @@ -100,6 +100,13 @@ def copyUpdatedFiles(tag, updates, cwd): return lst + def install_to_dir(fname, relpath): + sys.stdout.write("Including %s\n" % fname) + outdir = os.path.join(updates, relpath) + if not os.path.isdir(outdir): + os.makedirs(outdir) + shutil.copy2(file, outdir) + subdirs = [] # Updates get overlaid onto the runtime filesystem. Anaconda expects them @@ -127,12 +134,15 @@ def copyUpdatedFiles(tag, updates, cwd): continue if file.startswith('pyanaconda/'): - sys.stdout.write("Including %s\n" % (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) - 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.find('/') != -1: fields = file.split('/') subdir = fields[0] @@ -143,13 +153,6 @@ def copyUpdatedFiles(tag, updates, cwd): else: sys.stdout.write("Including %s\n" % (file,)) 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, tmpupdates) -- 1.7.7.6 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list