summaryrefslogtreecommitdiff
path: root/mkinitramfs
diff options
context:
space:
mode:
authorColin Watson <cjwatson@ubuntu.com>2010-06-15 16:56:12 +0100
committermaximilian attems <maks@debian.org>2010-06-16 15:55:44 +0200
commit3054e3ed58dee5a70bcd462c71573d380f03bd7a (patch)
tree268b89bb2fb82c2edb32943e6951ff2b83a744fc /mkinitramfs
parent5b565beaeaf605ba72b43c15e59ec85ca524728b (diff)
downloadinitramfs-tools-3054e3ed58dee5a70bcd462c71573d380f03bd7a.tar.gz
initramfs-tools-3054e3ed58dee5a70bcd462c71573d380f03bd7a.zip
initramfs-tools: work around 'find -printf %Y' bug
The change to filter out looping or broken symlinks from the initramfs, written by me for Ubuntu and applied to Debian for #575157, tickles a bug in find (which I think also had an associated Debian bug, but I've been unable to find it): https://savannah.gnu.org/bugs/index.php?29460 This was fixed in 4.5.8, which is currently only in experimental. In any case findutils is very deep in the dependency chain for upgrades and I believe it would be a good idea to avoid requiring a new version of it (I've had problems quite recently with strict dependencies on findutils causing unresolvable dependency loops). The following patch works around this bug in a reasonably straightforward way. [ debian findutils bug was #576772 ] Signed-off-by: maximilian attems <maks@debian.org>
Diffstat (limited to 'mkinitramfs')
-rwxr-xr-xmkinitramfs4
1 files changed, 2 insertions, 2 deletions
diff --git a/mkinitramfs b/mkinitramfs
index 1c6ad28..e3b392e 100755
--- a/mkinitramfs
+++ b/mkinitramfs
@@ -304,8 +304,8 @@ fi
# Remove any looping or broken symbolic links, since they break cpio.
[ "${verbose}" = y ] && xargs_verbose="-t"
-find "${DESTDIR}" -type l -printf '%p %Y\n' | sed -n 's/ [LN]$//p' \
- | xargs ${xargs_verbose:-} -rL1 rm -f
+(cd "${DESTDIR}" && find . -type l -printf '%p %Y\n' | sed -n 's/ [LN]$//p' \
+ | xargs ${xargs_verbose:-} -rL1 rm -f)
[ "${verbose}" = y ] && echo "Building cpio ${outfile} initramfs"
(