From owner-svn-src-user@FreeBSD.ORG Mon Jul 16 11:58:45 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B727106564A; Mon, 16 Jul 2012 11:58:45 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 06E278FC1B; Mon, 16 Jul 2012 11:58:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6GBwilN038931; Mon, 16 Jul 2012 11:58:44 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6GBwit8038929; Mon, 16 Jul 2012 11:58:44 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201207161158.q6GBwit8038929@svn.freebsd.org> From: Doug Barton Date: Mon, 16 Jul 2012 11:58:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238532 - user/dougb/portmaster X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jul 2012 11:58:45 -0000 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" ] &&