prelink the system after packages are installed. This should lead to some speed-ups at runtime. Allow skipping prelink by passing --no-prelink --- creator/livecd-creator | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/creator/livecd-creator b/creator/livecd-creator index c7232e0..84a8f67 100755 --- a/creator/livecd-creator +++ b/creator/livecd-creator @@ -601,6 +601,14 @@ class InstallationTarget: preexec_fn=self.run_in_root) return True
+ def prelinkSystem(self): + # prelink the system + instroot = "%s/install_root" %(self.build_dir,) + if os.path.exists("%s/usr/sbin/prelink" %(instroot,)): + subprocess.call(["/usr/sbin/prelink", "-mRavN"], + preexec_fn=self.run_in_root) + return True + def launchShell(self): print "Launching shell. Exit to continue." print "----------------------------------" @@ -737,6 +745,7 @@ def main(): base_on = None kscfg = None skip_compression = False + skip_prelink = False uncompressed_size = 3072 give_shell = False
@@ -745,7 +754,7 @@ def main(): ["help", "repo=", "base-on=", "package=", "exclude-package=", "fslabel=", "config=", "skip-compression", "uncompressed-size=", - "shell"]) + "shell", "no-prelink"]) except getopt.GetoptError: usage() sys.exit(2) @@ -761,6 +770,9 @@ def main(): if o in ("-s", "--skip-compression"): skip_compression = True continue + if o in ("--no-prelink",): + skip_prelink = True + continue if o in ("-u", "--uncompressed-size"): uncompressed_size = int(a) continue @@ -842,6 +854,8 @@ def main(): sys.exit(1) target.configureSystem(ksparser) target.createInitramfs() + if not skip_prelink: + target.prelinkSystem() if ksparser.handler.selinux.selinux: target.relabelSystem() target.configureBootloader()