summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--urpm/install.pm5
2 files changed, 6 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 66be375d..d6a060fa 100644
--- a/NEWS
+++ b/NEWS
@@ -14,6 +14,9 @@
o try harder to find genhdlist2 in uninstalled CPAN modules
o work without glibc-static-devel
o workaround %find_lang sometimes failing on FreeBSD
+- library:
+ o fix rpm version check causing strange warning messages:
+ "shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory"
- testsuite:
o add more extensive tests
o describe it more
diff --git a/urpm/install.pm b/urpm/install.pm
index 0e4cd81b..174291c7 100644
--- a/urpm/install.pm
+++ b/urpm/install.pm
@@ -94,7 +94,7 @@ See L<URPM> for parameters
=cut
# install logger callback
-my ($erase_logger, $index, $total_pkg, $uninst_count, $current_pkg);
+my ($erase_logger, $index, $total_pkg, $uninst_count, $current_pkg, $rpm_version);
sub install_logger {
my ($urpm, $type, undef, $subtype, $amount, $total) = @_;
local $| = 1;
@@ -121,7 +121,7 @@ sub install_logger {
$cnt = $pname ? $urpm->{logger_count} : '-';
}
require urpm::select;
- $index++ if urpm::select::_rpm_version() lt 4.13.0;
+ $index++ if $rpm_version lt 4.13.0;
my $s = sprintf("%9s: %-22s", $cnt . "/" . $total_pkg, $pname);
print $s;
$s =~ / $/ or printf "\n%9s %-22s", '', '';
@@ -377,6 +377,7 @@ sub install {
} elsif (!$options{noorder} && (@errors = $trans->order(%options))) {
} else {
$urpm->{readmes} = {};
+ $rpm_version ||= urpm::select::_rpm_version();
_get_callbacks($urpm, $db, $trans, \%options, $install, $upgrade, scalar @trans_pkgs);