summaryrefslogtreecommitdiffstats
path: root/urpm/orphans.pm
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@mandriva.com>2009-11-18 13:40:48 +0000
committerChristophe Fergeau <cfergeau@mandriva.com>2009-11-18 13:40:48 +0000
commit3f734bd6f138a016e986c8ccb589c1576caf77bf (patch)
tree2052c833ebc139259e8a18baaf0d33d9f539267b /urpm/orphans.pm
parentee22552a694e1db48ba203fcd53752516e797966 (diff)
downloadurpmi-3f734bd6f138a016e986c8ccb589c1576caf77bf.tar
urpmi-3f734bd6f138a016e986c8ccb589c1576caf77bf.tar.gz
urpmi-3f734bd6f138a016e986c8ccb589c1576caf77bf.tar.bz2
urpmi-3f734bd6f138a016e986c8ccb589c1576caf77bf.tar.xz
urpmi-3f734bd6f138a016e986c8ccb589c1576caf77bf.zip
test for /boot/vmlinuz-$release existence before using it
kernel orphaning assumes this file is present, however in rare cases when the user erased its running kernel (or in chroots), the file may not exist which causes an error message
Diffstat (limited to 'urpm/orphans.pm')
-rw-r--r--urpm/orphans.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/urpm/orphans.pm b/urpm/orphans.pm
index 9b41bd5e..7a3b0eab 100644
--- a/urpm/orphans.pm
+++ b/urpm/orphans.pm
@@ -296,7 +296,7 @@ sub _will_prop_still_be_needed {
sub _get_current_kernel_package() {
my $release = (POSIX::uname())[2];
# --qf '%{name}' is used in order to provide the right format:
- `rpm -qf --qf '%{name}' /boot/vmlinuz-$release`;
+ -e "/boot/vmlinuz-$release" && `rpm -qf --qf '%{name}' /boot/vmlinuz-$release`;
}