/[soft]/rpm/urpmi/trunk/gurpmi2
ViewVC logotype

Diff of /rpm/urpmi/trunk/gurpmi2

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3102 by dmorgan, Tue Sep 13 20:44:28 2011 UTC revision 3103 by tv, Mon Feb 27 20:49:33 2012 UTC
# Line 106  my $restart_itself = urpm::select::resol Line 106  my $restart_itself = urpm::select::resol
106      priority_upgrade => $urpm->{options}{'priority-upgrade'},      priority_upgrade => $urpm->{options}{'priority-upgrade'},
107  );  );
108  my @ask_unselect = urpm::select::unselected_packages($urpm, $state);  my @ask_unselect = urpm::select::unselected_packages($urpm, $state);
109    
110    # If there are some unselected packages, designate that we are going to return nonzero code.
111    if (@ask_unselect) {
112        my $unselect_msg = N("Some requested packages cannot be installed:\n%s",
113            urpm::select::translate_why_unselected($urpm, $state, @ask_unselect));
114        $urpm::postponed_msg .= $unselect_msg . "\n";
115        $urpm::postponed_code = 17;
116    }
117    
118  @ask_unselect  @ask_unselect
119  ? ask_continue(N(  ? ask_continue(N(
120          "Some requested packages cannot be installed:\n%s\nContinue installation anyway?",          "Some requested packages cannot be installed:\n%s\nContinue installation anyway?",
# Line 410  sub do_install_3 () { Line 419  sub do_install_3 () {
419      }      }
420                       );                       );
421    
422        # Merge postponed exit code to the result of package installation.
423        $exit_code ||= $urpm::postponed_code;
424    
425      #- restart gurpmi if needed, keep command line for that.      #- restart gurpmi if needed, keep command line for that.
426      if ($restart_itself && !$exit_code) {      if ($restart_itself && !$exit_code) {
427          print N("restarting urpmi"), "\n";          print N("restarting urpmi"), "\n";
# Line 420  sub do_install_3 () { Line 432  sub do_install_3 () {
432                  grep { !/^--no-priority-upgrade$|--previous-priority-upgrade=/ } @ARGV);                  grep { !/^--no-priority-upgrade$|--previous-priority-upgrade=/ } @ARGV);
433          exec $0, @ARGV;          exec $0, @ARGV;
434      }      }
435    
436        # Show postponed message before exiting
437        $urpm->{error}->($urpm::postponed_msg) if $urpm::postponed_code != 0;
438    
439      exit $exit_code;      exit $exit_code;
440  }  }
441    

Legend:
Removed from v.3102  
changed lines
  Added in v.3103

  ViewVC Help
Powered by ViewVC 1.1.30