Avoid errors when optional meta files are not present

Fix a stupid bug in 'auto' dependency generator. I forgot to add .sw.devel
to the $pkgname making the prereq illegal (and causing gendist to core)
This commit is contained in:
Tom G. Christensen 2003-12-06 16:03:02 +00:00
parent 483de5e1ea
commit f9a1b91686

View File

@ -5,7 +5,7 @@
# Define tool programs
# *only* platform specific packaging tools should be listed here
# generic tools go in buildpkg.functions
GENDIST=/usr/sbin/gendist
GENDIST="/usr/sbin/gendist"
GZIP=/usr/people/tgc/bin/gzip
BZIP2=/usr/local/bin/bzip2
@ -249,17 +249,19 @@ fetch_imageconf()
#
fetch_depends()
{
if [ -r $depends ]; then
reqidx=0
while read ss req
do
reqs[$reqidx]=$ss
if [ "$req" == "auto" ]; then # auto create depend on sw.base
nver=$(fix_ver "$version-$pkgver")
req="$pkgname $nver $nver"
req="$pkgname.sw.base $nver $nver"
fi
reqp[$reqidx]=$req
let "reqidx = $reqidx + 1"
done < $depends
fi
}
# fetch_ops(): Fetch ops
@ -268,6 +270,7 @@ fetch_depends()
# and the opfiles and opscript arrays
fetch_ops()
{
if [ -r $opsfile ]; then
opsidx=0
while read optype op
do
@ -283,18 +286,21 @@ fetch_ops()
opscript[$opsidx]=$op
let "opsidx = $opsidx + 1"
done < $opsfile
fi
}
#fetch_hide(): Fetch list of files to "hide"
#params: none
fetch_hide()
{
if [ -r $hidefile ]; then
hideidx=0
while read filen
do
hide[$hideidx]=$filen
let "hideidx = $hideidx + 1"
done < $hidefile
fi
}
##################################