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