Corrected the automatic getting of dynamic libraries

This commit is contained in:
Martin Gracik 2009-09-08 10:11:06 +02:00
parent 14f98446ea
commit b0b61b17a0
4 changed files with 25 additions and 19 deletions

View File

@ -1,10 +1,11 @@
# initrd template
# create required directories
makedir @initrd@/lib/modules
makedir @initrd@/lib/firmware
link @initrd@/modules to lib/modules
link @initrd@/firmware to lib/firmware
makedir @initrd@/lib
makedir @initrd@/modules
makedir @initrd@/firmware
link @initrd@/lib/modules to ../modules
link @initrd@/lib/firmware to ../firmware
makedir @initrd@/sbin
makedir @initrd@/dev
makedir @initrd@/etc
@ -72,15 +73,15 @@ copy @instroot@ sbin/umount.* to @initrd@ sbin
# copy udev
copy @instroot@ sbin/udevd to @initrd@ sbin
copy @instroot@ sbin/udevadm to @initrd@ sbin
copy @instroot@ sbin/udevinfo to @initrd@ sbin
copy @instroot@ sbin/udevsettle to @initrd@ sbin
link @initrd@/sbin/udevinfo to udevadm
link @initrd@/sbin/udevsettle to udevadm
# udev rules
copy @instroot@ etc/udev/udev.conf to @initrd@ etc/udev
chmod @initrd@/etc/udev/udev.conf mode 0644
copy @instroot@ lib/udev/* to @initrd@ lib/udev
chmod @initrd@/lib/udev/* mode 0644
#chmod @initrd@/lib/udev/* mode 0644
remove @initrd@/lib/udev/rules.d/*persistent*
remove @initrd@/lib/udev/rules.d/*generator*
@ -206,12 +207,16 @@ copy @instroot@ usr/lib/anaconda-runtime/loader/loader.tr to @initrd@ etc
chmod @initrd/etc/loader.tr mode 0644
# indirect dependencies
copy @instroot@ @libdir@/libfreebl3.so to @initrd@ @libdir@
copy @instroot@ @libdir@/libsoftokn3.so to @initrd@ @libdir@
copy @instroot@ usr/@libdir@/libsqlite3.so.0 to @initrd@ usr/@libdir@
copy @instroot@ @libdir@/ld-linux.so.2 to @initrd@ @libdir@
#copy @instroot@ @libdir@/libcom_err.so.2 to @initrd@ @libdir@
#copy @instroot@ @libdir@/libdbus-glib-1.so.2 to @initrd@ @libdir@
#copy @instroot@ @libdir@/libfreebl3.so to @initrd@ @libdir@
copy @instroot@ @libdir@/libgcc_s.so.1 to @initrd@ @libdir@
copy @instroot@ @libdir@/libnss_dns.so.2 to @initrd@ @libdir@
copy @instroot@ @libdir@/libnss_files.so.2 to @initrd@ @libdir@
copy @instroot@ @libdir@/libgcc_s.so.1 to @initrd@ @libdir@
copy @instroot@ @libdir@/libsoftokn3.so to @initrd@ @libdir@
copy @instroot@ usr/@libdir@/libsqlite3.so.0 to @initrd@ usr/@libdir@
# langtable
copy @instroot@ usr/lib/anaconda/lang-table to @initrd@ etc

View File

@ -167,7 +167,7 @@ class Copy(LoraxAction):
@property
def getDeps(self):
return self._attrs['src']
return self.src
@property
def nolinks(self):

View File

@ -101,10 +101,11 @@ class InitRD(object):
# add dependencies to actions
for dep in ldd.deps:
kwargs = {}
kwargs['src_tree'] = self.conf.treedir
kwargs['src_path'] = dep.replace(self.conf.treedir, '')
kwargs['dst_tree'] = self.conf.initrddir
kwargs['dst_path'] = dep.replace(self.conf.treedir, '')
kwargs['src_root'] = self.conf.treedir
kwargs['src_path'] = dep.replace(self.conf.treedir + os.sep, '', 1)
kwargs['dst_root'] = self.conf.initrddir
kwargs['dst_path'] = dep.replace(self.conf.treedir + os.sep, '', 1)
kwargs['dst_path'] = os.path.dirname(kwargs['dst_path'])
new_action = actions.base.Copy(**kwargs)
self._actions.append(new_action)

View File

@ -64,7 +64,7 @@ def touch(filename, verbose=False):
return True
def cp(src_path, dst_path, src_root='/', dst_root='/', nolinks=False, ignore_errors=False, verbose=True):
def cp(src_path, dst_path, src_root='/', dst_root='/', nolinks=False, ignore_errors=False, verbose=False):
filecopy = Copy(ignore_errors, verbose)
src = os.path.join(src_root, src_path)
@ -78,7 +78,7 @@ def cp(src_path, dst_path, src_root='/', dst_root='/', nolinks=False, ignore_err
return filecopy.errors
def mv(src_path, dst_path, src_root='/', dst_root='/', nolinks=False, ignore_errors=False, verbose=True):
def mv(src_path, dst_path, src_root='/', dst_root='/', nolinks=False, ignore_errors=False, verbose=False):
errors = cp(src_path, dst_path, src_root, dst_root, ignore_errors, verbose)
# if everything was copied, remove the source
@ -136,7 +136,7 @@ class CopyError(Exception):
pass
class Copy(object):
def __init__(self, ignore_errors=False, verbose=True):
def __init__(self, ignore_errors=False, verbose=False):
self.Error = CopyError
self.ignore_errors = ignore_errors