[PATCH 2/5] Revert "UBUNTU: [Debian] dtb: don't remove a symlink dereferencing an existing directory"

Paolo Pisati paolo.pisati at canonical.com
Mon Sep 1 11:29:06 UTC 2014


This reverts commit d126812b15f4da1bddc2fd11cde2f9e7d1514959.

Signed-off-by: Paolo Pisati <paolo.pisati at canonical.com>
---
 debian/control-scripts/postrm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/control-scripts/postrm b/debian/control-scripts/postrm
index cb20376..56f4182 100644
--- a/debian/control-scripts/postrm
+++ b/debian/control-scripts/postrm
@@ -248,7 +248,7 @@ sub image_magic {
     my $vmlinuz_target = readlink "$kimage";
     my $real_target = '';
     $real_target = abs_path($vmlinuz_target) if defined ($vmlinuz_target);
-    if (!defined($vmlinuz_target) || (! -f "$real_target" && ! -d "$real_target")) {
+    if (!defined($vmlinuz_target) || ! -f "$real_target") {
       # what, a dangling symlink?
       warn "The link "  . $image_dest . "$kimage is a damaged link\n";
       # Remove the dangling link
-- 
1.9.1





More information about the kernel-team mailing list