Move bin and sbin to usr

This commit is contained in:
Martin Gracik 2009-10-21 10:11:42 +02:00
parent 609a57c491
commit 551647a017
2 changed files with 17 additions and 18 deletions

View File

@ -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:

View File

@ -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()