Date: Mon, 16 Jul 2012 11:58:44 +0000 (UTC) From: Doug Barton <dougb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r238532 - user/dougb/portmaster Message-ID: <201207161158.q6GBwit8038929@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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" ] &&
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207161158.q6GBwit8038929>