mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
don't die on missing package files, just warn (#3535)
This commit is contained in:
parent
f762464630
commit
7f240a9221
@ -140,7 +140,7 @@ db_write_entry()
|
||||
|
||||
if [ $# -lt 2 ]; then
|
||||
usage
|
||||
exit 0
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$1" = "-h" -o "$1" = "--help" ]; then
|
||||
@ -169,12 +169,14 @@ for file in `find $rootdir/* -name PKGBUILD`; do
|
||||
else
|
||||
pkgfile="$destdir/$pkgname-$pkgver-$pkgrel.pkg.tar.gz"
|
||||
fi
|
||||
[ -f $pkgfile ] || die "missing package file: $pkgfile"
|
||||
if [ -f $pkgfile ]; then
|
||||
csize=`du -b $pkgfile | cut -f1`
|
||||
pkgmd5sum=`get_md5checksum $pkgfile`
|
||||
[ -z $pkgmd5sum ] && die "error generating checksum for $pkgfile"
|
||||
db_write_entry $file
|
||||
[ $? -gt 0 ] && die "error writing entry for $file"
|
||||
db_write_entry $file || die "error writing entry for $file"
|
||||
else
|
||||
echo "gensync: missing package: $pkgfile" >&2
|
||||
fi
|
||||
done
|
||||
|
||||
echo "gensync: compressing to $destfile..." >&2
|
||||
|
@ -157,7 +157,7 @@ delete_entry()
|
||||
|
||||
if [ $# -lt 3 ]; then
|
||||
usage
|
||||
exit 0
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$1" = "-h" -o "$1" = "--help" ]; then
|
||||
@ -210,12 +210,15 @@ if [ "$action" = "upd" ]; then
|
||||
else
|
||||
pkgfile="$destdir/$pkgname-$pkgver-$pkgrel.pkg.tar.gz"
|
||||
fi
|
||||
[ -f $pkgfile ] || die "missing package file: $pkgfile"
|
||||
if [ -f $pkgfile ]; then
|
||||
csize=`du -b $pkgfile | cut -f1`
|
||||
pkgmd5sum=`get_md5checksum $pkgfile`
|
||||
[ -z $pkgmd5sum ] && die "error generating checksum for $pkgfile"
|
||||
echo "updatesync: creating entry for $option" >&2
|
||||
db_write_entry $option || die "error writing entry for $option"
|
||||
else
|
||||
echo "updatesync: missing package: $pkgfile" >&2
|
||||
fi
|
||||
else
|
||||
# DELETE
|
||||
delete_entry $option
|
||||
|
Loading…
Reference in New Issue
Block a user