diff --git a/xbps-src/shutils/make-binpkg.sh b/xbps-src/shutils/make-binpkg.sh index d8eb8833980..c7a77a6d3f8 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