From b2fe70592480430aa866cbb6a35a7394d2a5b5ae Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 2 Feb 2009 20:40:06 +0100 Subject: [PATCH] When writing the flist in pkg metadata, sort files before dirs. --HG-- extra : convert_revision : bf341c59954e02e320986d259521643beb25f291 --- shutils/binpkg.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/shutils/binpkg.sh b/shutils/binpkg.sh index d31892ca6c..a3a6de5c4c 100644 --- a/shutils/binpkg.sh +++ b/shutils/binpkg.sh @@ -46,8 +46,12 @@ xbps_write_metadata_pkg() # Write the files list. local TMPFLIST=$(mktemp -t flist.XXXXXXXXXX) || exit 1 - find $destdir | sort -ur | \ + # First add the regular files. + find $destdir -type f | \ sed -e "s|$destdir||g;s|^\/$||g;/^$/d" > $TMPFLIST + # and add the directories at the end. + find $destdir -type d | sort -ur | \ + sed -e "s|$destdir||g;s|^/$||g;/^$/d" >> $TMPFLIST # Write the property list file. local TMPFPROPS=$(mktemp -t fprops.XXXXXXXXXX) || exit 1