summaryrefslogtreecommitdiffstats
path: root/perl-install/Xconfig.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2000-11-06 15:54:17 +0000
committerFrancois Pons <fpons@mandriva.com>2000-11-06 15:54:17 +0000
commit91228fdcfc80518e540687a6b2988024ca77e55a (patch)
treefa7bc9b3eb3a4ebfed738834e0acd1a5b75cdd9e /perl-install/Xconfig.pm
parent54411682f9d76a9370b22c1c9e8966b8033373c0 (diff)
downloaddrakx-91228fdcfc80518e540687a6b2988024ca77e55a.tar
drakx-91228fdcfc80518e540687a6b2988024ca77e55a.tar.gz
drakx-91228fdcfc80518e540687a6b2988024ca77e55a.tar.bz2
drakx-91228fdcfc80518e540687a6b2988024ca77e55a.tar.xz
drakx-91228fdcfc80518e540687a6b2988024ca77e55a.zip
copy RPMS and base directories, check rpm file presence before trying to install.
Diffstat (limited to 'perl-install/Xconfig.pm')
0 files changed, 0 insertions, 0 deletions
s|^/|| foreach @_; _ "tar c -C / @_ | tar x -C $tmp" if @_; } sub install_lib { s|^/|| foreach @_; _ "tar c -C / --dereference @_ | tar x -C $tmp" if @_; } sub install_l { my @l = @_; @l = uniq(map { chomp_($_) } @l); push @l, `ldd @l 2>/dev/null | grep "=>" | sed -e 's/.*=> //' -e 's/ .*//'`; @l = uniq(map { chomp_($_) } @l); install_raw(grep { !/lib.*\.so/ } @l); install_lib(grep { /lib.*\.so/ } @l); } sub installown($$) { my ($own, $dir) = @_; return if -e "$tmp$dir$own"; mkdir_p("$tmp$dir"); _ "cp -a $own $tmp$dir"; } _ "$sudo rm -rf $tmp" if -e $tmp; _ "mkdir $tmp"; _ 'find . -name "*~" | xargs rm -f'; foreach (cat_("dirs")) { chomp; mkdir_p("$tmp$_"); } _ "cp -a tree/* $tmp"; _ "find $tmp -name 'CVS*' | xargs rm -rf"; _ "perl devices.pl $tmp/dev"; install_raw(keyboard::loadkeys_files()); foreach (keyboard::loadkeys_files()) { # create the long name based on the short one (if needed) symlink "$2.kmap.gz", "$tmp$1/$3.kmap.gz" if m|(.*)/((..).+)\.kmap\.gz|; } my $perl_version = join ".", unpack "C3", $^V; @files = map { chomp; s/PERL_VERSION/$perl_version/g; $_ } (cat_("list"), cat_(`../tools/specific_arch list`)); @files = `ls -d @files`; $? == 0 or exit 1; install_l(@files); foreach (cat_("aliases")) { chomp; my ($f, $dest) = split; symlink $dest, "$tmp$f"; } chomp($main = `cat ../all.kernels/.main`); _ "cp ../all.modules/modules.cz-$main $tmp/modules/modules.cz"; _ "cp ../all.modules/$main/modules.dep $tmp/modules"; installown("drvinst", "/usr/bin"); installown("guessmounts", "/usr/bin"); __ "strip $tmp/{lib,bin,sbin}/* $tmp/usr/{bin,sbin}/* 2>/dev/null"; exit 0 if $ARGV[0]; $size = `du -s $tmp | cut -f1` + 2048; #- add 2MB of free space mkdir_p($mnt); __ "$sudo umount $rescue 2>/dev/null"; _ "dd if=/dev/zero of=$rescue bs=1k count=$size"; _ "$mke2fs $rescue"; _ "$sudo mount -t ext2 $rescue $mnt -o loop"; _ "rmdir $mnt/lost+found"; _ "$sudo chown -R root.root $tmp"; _ "$sudo cp -a $tmp/* $mnt"; _ "$sudo rm -rf $tmp"; _ "$sudo umount $rescue"; _ "rmdir $mnt"; _ "bzip2 -f -9 $rescue";