From 551647a017ada76b8ce22d56c0ad850bdbc21aa1 Mon Sep 17 00:00:00 2001 From: Martin Gracik Date: Wed, 21 Oct 2009 10:11:42 +0200 Subject: [PATCH] Move bin and sbin to usr --- src/pylorax/_rewrite/scrubs.py | 18 ------------------ src/pylorax/insttree.py | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/src/pylorax/_rewrite/scrubs.py b/src/pylorax/_rewrite/scrubs.py index cf17262e..a85bdfa9 100644 --- a/src/pylorax/_rewrite/scrubs.py +++ b/src/pylorax/_rewrite/scrubs.py @@ -61,24 +61,6 @@ class Install(object): #if os.path.isfile(os.path.join(self.conf.treedir, 'bin', 'gawk')): # os.symlink('awk', os.path.join(self.conf.treedir, 'bin', 'gawk')) - # move bin to usr/bin - cp(src_root=self.conf.treedir, - src_path=os.path.join('bin', '*'), - dst_root=self.conf.treedir, - dst_path=os.path.join('usr', 'bin'), - ignore_errors=True) - - rm(os.path.join(self.conf.treedir, 'bin')) - - # move sbin to /usr/sbin - cp(src_root=self.conf.treedir, - src_path=os.path.join('sbin', '*'), - dst_root=self.conf.treedir, - dst_path=os.path.join('usr', 'sbin'), - ignore_errors=True) - - rm(os.path.join(self.conf.treedir, 'sbin')) - # remove dirs from root dirs = ('boot', 'dev', 'home', 'media', 'mnt', 'opt', 'root', 'selinux', 'srv', 'sys', 'tmp', 'keymaps') for dir in dirs: diff --git a/src/pylorax/insttree.py b/src/pylorax/insttree.py index c6c3e4ac..be106bb6 100644 --- a/src/pylorax/insttree.py +++ b/src/pylorax/insttree.py @@ -470,6 +470,21 @@ class InstallTree(object): for dir in ["boot", "home", "root", "tmp"]: remove(os.path.join(self.conf.treedir, dir)) + def move_bins(self): + # move bin to usr/bin + move(src_root=self.conf.treedir, + src_path=os.path.join("bin", "*"), + dst_root=self.conf.treedir, + dst_path=os.path.join("usr", "bin")) + remove(os.path.join(self.conf.treedir, "bin")) + + # move sbin to /usr/sbin + copy(src_root=self.conf.treedir, + src_path=os.path.join("sbin", "*"), + dst_root=self.conf.treedir, + dst_path=os.path.join("usr", "sbin")) + remove(os.path.join(self.conf.treedir, "sbin")) + def scrub(self): self.copy_stubs() self.create_dogtail_conf() @@ -493,3 +508,5 @@ class InstallTree(object): self.remove_python_stuff() self.remove_unnecessary_directories() + + self.move_bins()