binpkg.sh: ignore pkgs without destdir, exclude the flist file.

The flist file is used by the xbps-src command, but it's not
really useful for binpkgs.

--HG--
extra : convert_revision : 5fb31a80b8a571ba49e79507ae0206d0703e8e73
This commit is contained in:
Juan RP 2009-03-12 03:00:36 +01:00
parent df492b077c
commit 4c963b2828
1 changed files with 10 additions and 6 deletions

View File

@ -285,7 +285,12 @@ xbps_make_binpkg_real()
local arch=
local use_sudo=
cd ${DESTDIR} || exit 1
if [ ! -d ${DESTDIR} ]; then
echo "$pkgname: unexistent destdir... skipping!"
return 0
fi
cd ${DESTDIR}
if [ -n "$noarch" ]; then
arch=noarch
@ -310,17 +315,16 @@ xbps_make_binpkg_real()
#
run_rootcmd $use_sudo tar cfp $XBPS_DESTDIR/$binpkg ./INSTALL && \
run_rootcmd $use_sudo tar rfp $XBPS_DESTDIR/$binpkg . \
--exclude "./INSTALL" && \
--exclude "./INSTALL" \
--exclude "./var/db/xbps/metadata/*/flist" && \
bzip2 -9 $XBPS_DESTDIR/$binpkg && \
mv $XBPS_DESTDIR/$binpkg.bz2 $XBPS_DESTDIR/$binpkg
else
run_rootcmd $use_sudo tar cfp $XBPS_DESTDIR/$binpkg . && \
run_rootcmd $use_sudo tar cfp $XBPS_DESTDIR/$binpkg . \
--exclude "./var/db/xbps/metadata/*/flist" && \
bzip2 -9 $XBPS_DESTDIR/$binpkg && \
mv $XBPS_DESTDIR/$binpkg.bz2 $XBPS_DESTDIR/$binpkg
fi
# Disabled for now.
# --exclude "./var/db/xbps/metadata/*/flist" .
#
if [ $? -eq 0 ]; then
[ ! -d $pkgdir ] && mkdir -p $pkgdir
mv -f $XBPS_DESTDIR/$binpkg $pkgdir