From fad78ea7f17ef8bf7fb06ecc2fd789a60d4fe550 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Wed, 9 Nov 2011 20:44:01 +0100 Subject: [PATCH] xbps-src: only add files and links into the resulting binpkg. Additional dirs and permissions on them can be set via mkdirs triggers (and make_dirs var) and INSTALL/REMOVE scripts. Those dirs are in 90% cases redundant as they always have the same permissions bits (0755), all packages using special permissions have been modified and adapted. --- xbps-src/shutils/make-binpkg.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/xbps-src/shutils/make-binpkg.sh b/xbps-src/shutils/make-binpkg.sh index d8eb883398..c7a77a6d3f 100644 --- a/xbps-src/shutils/make-binpkg.sh +++ b/xbps-src/shutils/make-binpkg.sh @@ -59,7 +59,7 @@ binpkg_cleanup() # xbps_make_binpkg_real() { - local mfiles binpkg pkgdir arch dirs _dirs d clevel + local mfiles binpkg pkgdir arch d clevel if [ ! -d "${DESTDIR}" ]; then msg_warn "cannot find destdir for $pkgname... skipping!\n" @@ -99,10 +99,14 @@ xbps_make_binpkg_real() mfiles="./REMOVE" fi mfiles="$mfiles ./files.plist ./props.plist" - _dirs=$(find . -maxdepth 1 -type d -o -type l) - for d in ${_dirs}; do - [ "$d" = "." ] && continue - dirs="$d $dirs" + for d in $(find . -type f -o -type l); do + if [ "$d" = "./INSTALL" -o \ + "$d" = "./REMOVE" -o \ + "$d" = "./files.plist" -o \ + "$d" = "./props.plist" ]; then + continue + fi + mfiles="$mfiles $d" done [ -n "$XBPS_COMPRESS_LEVEL" ] && clevel="-$XBPS_COMPRESS_LEVEL" @@ -113,7 +117,7 @@ xbps_make_binpkg_real() msg_normal "Building $binpkg... " ${FAKEROOT_CMD} ${FAKEROOT_CMD_ARGS} \ tar --exclude "var/db/xbps/metadata/*/flist" \ - -cpf - ${mfiles} ${dirs} | \ + -cpf - ${mfiles} | \ $XBPS_COMPRESS_CMD ${clevel} -qf > $pkgdir/$binpkg rval=$? trap - INT