[PATCH 3/5] UBUNTU: [Packaging] dtb: don't follow simlink when checking for a directory

Paolo Pisati paolo.pisati at canonical.com
Wed Aug 27 15:28:50 UTC 2014


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

diff --git a/debian/control-scripts/postinst b/debian/control-scripts/postinst
index a388cef..7e99410 100644
--- a/debian/control-scripts/postinst
+++ b/debian/control-scripts/postinst
@@ -767,7 +767,7 @@ sub image_magic {
   # Well, in any case, if the destination (the symlink we are trying
   # to create) is a directory, we should do nothing, except throw a
   # diagnostic.
-  if (-d "$kimage" ) {
+  if (-d "$kimage" && ! -l "$kimage") {
     die ("Hmm. $kimage is a directory, which I did not expect.  I am\n" .
          "trying to create a symbolic link with that name linked to \n" .
          "$image_dest . Since a directory exists here, my assumptions \n" .
-- 
2.1.0





More information about the kernel-team mailing list