1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-23 00:08:50 -05:00

repo-add: fix misguided conditional correction

I tried to move things around here when testing and did a bit too much; the
warning message always showed regardless of delta inclusion in the call. Fix
it so we only warn if we have a filename, but the file couldn't be located.

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2011-01-13 09:33:01 -06:00
parent 5615b71688
commit 665528d7ba

View File

@ -302,13 +302,15 @@ db_write_entry()
fi
# create a delta file
if [ -n "$oldfilename" -a -f "$oldfile" ]; then
delta=$(pkgdelta -q $oldfile $1)
if [ -f "$delta" ]; then
db_write_delta $delta
if [ -n "$oldfilename" ]; then
if [ -f "$oldfile" ]; then
delta=$(pkgdelta -q $oldfile $1)
if [ -f "$delta" ]; then
db_write_delta $delta
fi
else
warning "$(gettext "Old package file not found: %s")" "$oldfilename"
fi
else
warning "$(gettext "Old package file not found : %s")" "$oldfilename"
fi
return 0