summaryrefslogtreecommitdiffstats
path: root/autoirpm.update
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-11-02 16:08:42 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-11-02 16:08:42 +0000
commitbaabd04d3ba7a4f73bf297d01b7d0820a1f2bde9 (patch)
tree25d0f49ce35dce3feab4ea207a44f63253e59bc1 /autoirpm.update
parent38033c3f1b3089774c321cead65c6031c650e96c (diff)
downloadurpmi-baabd04d3ba7a4f73bf297d01b7d0820a1f2bde9.tar
urpmi-baabd04d3ba7a4f73bf297d01b7d0820a1f2bde9.tar.gz
urpmi-baabd04d3ba7a4f73bf297d01b7d0820a1f2bde9.tar.bz2
urpmi-baabd04d3ba7a4f73bf297d01b7d0820a1f2bde9.tar.xz
urpmi-baabd04d3ba7a4f73bf297d01b7d0820a1f2bde9.zip
Remove old autoirpm attempt
Diffstat (limited to 'autoirpm.update')
-rw-r--r--autoirpm.update46
1 files changed, 0 insertions, 46 deletions
diff --git a/autoirpm.update b/autoirpm.update
deleted file mode 100644
index 5290bbb0..00000000
--- a/autoirpm.update
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/usr/bin/perl
-
-$DIR = "/var/lib/urpmi";
-$DIR2 = "/etc/urpmi";
-$BASE = "$DIR/autoirpm";
-$BASE2 = "$DIR2/autoirpm";
-$AUTO_INSTALL_BIN_LIST = "$BASE.binaries";
-$INSTALL_SCRIPT_REP = "$BASE.scripts";
-
-system("packdrake --cat $DIR/hdlist*.cz | autoirpm.update-all $BASE2.allow $BASE2.deny - > $AUTO_INSTALL_BIN_LIST");
-$? == 0 or die "autoirpm.upgrade-all failed\n";
-
-open F, $AUTO_INSTALL_BIN_LIST or die;
-map { chop; create_links_and_install_scripts($_) } <F>;
-close F;
-
-sub create_links_and_install_scripts($) {
- my ($rpm, @progs) = split ' ', $_[0];
- my $script = "$INSTALL_SCRIPT_REP/$rpm";
-
- foreach (@progs) { lstat "/$_" and return } # verify that it's not installed
-
- foreach (@progs) {
- mkdir_(dirname("/$_"));
- symlink $script, "/$_"; # or die "$rpm: /$_";
- }
-
- open G, ">$script" or die;
- print G "_irpm $rpm \$0 \$*\n";
- close G;
- chmod 0755, "$script";
-}
-
-sub dirname { local $_ = shift; s|[^/]*/*\s*$||; s|(.)/*$|$1|; $_ || '.' }
-
-sub mkdir_ {
- -d $_[0] and return;
-
- my $root = dirname $_[0];
- if (-e $root) {
- -d $root or die "mkdir: error creating directory $_[0]: $root is a file and i won't delete it\n";
- } else {
- mkdir_($root);
- }
- mkdir $_[0], 0755 or die "mkdir: error creating directory $_: $!\n";
-}