Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Drake <dsd@laptop.org>2011-05-30 20:57:21 (GMT)
committer Daniel Drake <dsd@laptop.org>2011-05-30 20:57:21 (GMT)
commitccc3a5a3c79171396c92793182b740406733f69c (patch)
treea1d4c1443391819ff17c3166d0fa73a3b28bdfc5
parent7c861c6967762667b01f02573e5e9ff529cff383 (diff)
base: strip trailing slashes from symbolic links
numpy installs a link like this that was breaking olpc-update --usb
-rw-r--r--modules/base/preimage.90.core.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/base/preimage.90.core.sh b/modules/base/preimage.90.core.sh
index 0fee887..bc8ba2a 100644
--- a/modules/base/preimage.90.core.sh
+++ b/modules/base/preimage.90.core.sh
@@ -77,6 +77,13 @@ EOF
# we aren't using selinux...
rm -rf $fsmount/selinux
+# strip all trailing slashes from the targets of symlinks.
+# this is needed for creation of a USB update image (iso file) where the
+# iso format cannot encode a symlink with a trailing slash.
+# this would then cause content manifest verification failure when being
+# installed.
+find $fsmount -type l -lname '*/' -exec bash -c "shopt -s extglob; i=\$(readlink {}); i=\${i%%*(/)}; ln -snf \$i {}" \;
+
# normalize modification times of all files for faster updates (#4259)
# note that python needs special consideration here: the mtime is encoded
# into the pyc file. so we must regenerate all pyc files.