summaryrefslogtreecommitdiffstats
path: root/_irpm
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 /_irpm
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 '_irpm')
-rwxr-xr-x_irpm66
1 files changed, 0 insertions, 66 deletions
diff --git a/_irpm b/_irpm
deleted file mode 100755
index 354a1769..00000000
--- a/_irpm
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/usr/bin/perl
-
-# for i18n
-use POSIX;
-use Locale::gettext;
-
-setlocale (LC_ALL, "");
-textdomain ("urpmi");
-
-sub N {
- my ($format, @params) = @_;
- sprintf(Locale::gettext::gettext($format), @params);
-}
-
-$automatic = 0;
-$timeout = 15;
-
-$DIR = "/var/lib/urpmi";
-$BASE = "$DIR/autoirpm";
-$INSTALL_SCRIPT_REP = "$BASE.scripts";
-
-$rpm = shift @ARGV;
-print STDERR "autoirpm: ", N("installing %s\n",$rpm);
-
-`xtest`;
-$X = ($? == 0);
-
-my $pid;
-$SIG{ALRM} = sub { $pid and kill 9, $pid; not_found(); };
-alarm $timeout;
-
-if (!$automatic) {
- $interactive_mesg = N("Automatic installation of packages...\nYou requested installation of package %s\n",$rpm) . N("Is this OK?");
- if ($X) {
- my $ok = N("Ok");
- my $cancel = N("Cancel");
- ($pid = fork) or exec "gmessage", "-default", $ok, "-buttons", "$ok:0,$cancel:2", $interactive_mesg;
- wait();
- $? and not_found();
- } else {
- if (isatty(0)) {
- $noexpr = N("Nn");
- $yesexpr = N("Yy");
- print $interactive_mesg, N(" (Y/n) ");
- <STDIN> =~ /[$yesexpr]/ or not_found();
- } else {
- # Arghhh not in automatic and no way to contact the user... dying
- not_found();
- }
- }
-}
-alarm 0;
-
-$urpmi = !$automatic && $X ? "gurpmi" : "urpmi";
-fork or exec $urpmi, "--comment", $ARGV[0], $rpm; wait;
-
-# launch the initial prog
-(readlink $ARGV[0]) !~ /$INSTALL_SCRIPT_REP/ and exec @ARGV;
-
-not_found();
-
-sub not_found {
- print STDERR N("%s: command not found\n",$rpm);
- exit 127;
-}
-