Author: branden
Date: 2004-08-28 02:53:52 -0500 (Sat, 28 Aug 2004)
New Revision: 1760

Modified:
   trunk/debian/CHANGESETS
   trunk/debian/shell-lib.sh
Log:
Use mkdir -p in make_symlink_sane() to ensure that the parent directories
of the symlink and its destination exist before creating the symlink
itself.


Modified: trunk/debian/CHANGESETS
===================================================================
--- trunk/debian/CHANGESETS     2004-08-28 07:12:08 UTC (rev 1759)
+++ trunk/debian/CHANGESETS     2004-08-28 07:53:52 UTC (rev 1760)
@@ -479,6 +479,6 @@
   using the legacy paths to unpack to the old location with no symlink to
   redirect them, which is precisely what we don't want (see section 6.5 of
   the Debian Policy Manual).
-    1753, 1757
+    1753, 1757, 1760
 
 vim:set ai et sts=4 sw=4 tw=80:

Modified: trunk/debian/shell-lib.sh
===================================================================
--- trunk/debian/shell-lib.sh   2004-08-28 07:12:08 UTC (rev 1759)
+++ trunk/debian/shell-lib.sh   2004-08-28 07:53:52 UTC (rev 1760)
@@ -655,6 +655,7 @@
       observe "link from $symlink to $target already exists"
   else
     observe "creating symbolic link from $symlink to $target"
+    mkdir -p "${target%/*}" "${symlink%/*}"
     ln -s -b -S ".dpkg-old" "$target" "$symlink"
   fi
 }

Reply via email to