Skip to content

Commit

Permalink
Turns out there are a non-zero number of distinfo files that have SIZE
Browse files Browse the repository at this point in the history
listed first, so in the code that parses them for the data to put into
/var/db/pkg/$port/distfiles, handle this situation gracefully.
  • Loading branch information
dougb authored and dougb committed Jul 16, 2012
1 parent d5f5e9a commit aea2041
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions portmaster
Expand Up @@ -3905,14 +3905,16 @@ if [ -n "$distfiles" ]; then
for file in $distfiles; do
while read line ; do
case "$line" in
SHA256\ \(${port_subdir}${file}\)*) sha256=${line##* } ;;
SHA256\ \(${port_subdir}${file}\)*) sha256=${line##* }
[ -z "$size" ] && continue
echo "DISTFILE:${port_subdir}${file}:SIZE=${size}:SHA256=${sha256}" \
>> $pm_mktemp_file ; unset sha256 size ; break ;;
SIZE\ \(${port_subdir}${file}\)*)
[ -n "$sha256" ] || fail "$distinfo is out of order"
[ -z "$sha256" ] && { size=${line##* } ; continue; }
echo "DISTFILE:${port_subdir}${file}:SIZE=${line##* }:SHA256=${sha256}" \
>> $pm_mktemp_file ; break ;;
>> $pm_mktemp_file ; unset sha256 ; break ;;
esac
done < $distinfo
unset sha256

# Make sure any new distfiles get added to the list
[ -n "$DI_FILES" -a ! "$$" -eq "$PM_PARENT_PID" ] &&
Expand Down

0 comments on commit aea2041

Please sign in to comment.