Do the right thing if someone deleted pkginfo.$secname instead

of rm -rf'ing the package dir.
This commit is contained in:
Tom G. Christensen
2004-10-08 09:14:05 +00:00
parent f0079c1084
commit 36e25bc278
2 changed files with 6 additions and 4 deletions

View File

@@ -404,9 +404,11 @@ get_pkgname()
{
local secname=$1
local pn=$($GREP PKG $metadir/pkginfo.$secname)
local pname=$(_upls ${pn##PKG=})
echo $pname
if [ -r $metadir/pkginfo.$secname ]; then
local pn=$($GREP PKG $metadir/pkginfo.$secname)
local pname=$(_upls ${pn##PKG=})
echo $pname
fi
}
# get_pkgrev(): Extract pkgrev (REV part of VERSION field) from pkginfo file