svn commit: r238532 - user/dougb/portmaster
Doug Barton
dougb at FreeBSD.org
Mon Jul 16 11:58:45 UTC 2012
Author: dougb
Date: Mon Jul 16 11:58:44 2012
New Revision: 238532
URL: http://svn.freebsd.org/changeset/base/238532
Log:
Turns out there are a non-zero number of distinfo files that have SIZE
listed first, so in the code that parses them for the data to put into
/var/db/pkg/$port/distfiles, handle this situation gracefully.
Modified:
user/dougb/portmaster/portmaster
Modified: user/dougb/portmaster/portmaster
==============================================================================
--- user/dougb/portmaster/portmaster Mon Jul 16 11:22:33 2012 (r238531)
+++ user/dougb/portmaster/portmaster Mon Jul 16 11:58:44 2012 (r238532)
@@ -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" ] &&
More information about the svn-src-user
mailing list