ports/115249: ports-mgmt/portupgrade fails to refetch mismatched distfiles.
KOMATSU Shinichiro
koma2 at lovepeers.org
Mon Aug 6 15:50:04 UTC 2007
>Number: 115249
>Category: ports
>Synopsis: ports-mgmt/portupgrade fails to refetch mismatched distfiles.
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Aug 06 15:50:03 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: KOMATSU Shinichiro
>Release: FreeBSD 6.2-RELEASE i386
>Organization:
>Environment:
FreeBSD 6.2-RELEASE i386
>Description:
(1) When checksum mismatch is occured and portupgrade retries to fetch mismatched distfiles,
the following error occurs and refetch fails.
---> Retrying devel/cvs2cl
---> Deleting mismatched files
---> Building '/usr/ports/devel/cvs2cl'
===> Cleaning for cvs2cl-2.67
===> Extracting for cvs2cl-2.67
=> MD5 Checksum mismatch for cvs2cl.pl.
=> SHA256 Checksum mismatch for cvs2cl.pl.
===> Refetch for 1 more times files: cvs2cl.pl cvs2cl.pl
=> cvs2cl.pl doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch from ftp://ftp.lab.kdd.co.jp/FreeBSD/ports/distfiles/.
env: /us/bin/fetch: No such file or directory
=> Attempting to fetch from http://www.red-bean.com/cvs2cl/.
env: /us/bin/fetch: No such file or directory
=> Attempting to fetch from ftp://ftp.lab.kdd.co.jp/FreeBSD/ports/distfiles/.
env: /us/bin/fetch: No such file or directory
=> Couldn't fetch it - please try to retrieve this
=> port manually into /usr/ports/distfiles/ and try again.
*** Error code 1
Stop in /usr/local/ports/devel/cvs2cl.
*** Error code 1
Stop in /usr/local/ports/devel/cvs2cl.
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade.58159.0 env UPGRADE_TOOL=portupgrade UPGRADE_PORT=cvs2cl-2.62 UPGRADE_PORT_VER=2.62 make MASTER_SORT_REGEX= MASTER_SORT= "FETCH_CMD=/us/bin/fetch -Ap" FETCH_BEFORE_ARGS=-q DEPENDS_TARGET=package
** Fix the problem and try again.
(2) Format of "Checksum mismatch" message has been changed but portupgrade does not know it,
it fails to detect and delete the mismatched distfiles.
>How-To-Repeat:
>Fix:
(1) In "rescue" clause in "build_port", "R" and "r" are removed from $fetch_cmd.
I do not know why this code exists, and removing it solves this problem.
(2) Update the "Checksum mismatch" message to the current one.
Patch attached with submission follows:
Index: bin/portupgrade
===================================================================
RCS file: /cvsroot/portupgrade/pkgtools/bin/portupgrade,v
retrieving revision 1.33.2.3
diff -u -r1.33.2.3 portupgrade
--- bin/portupgrade 3 Jul 2007 10:58:27 -0000 1.33.2.3
+++ bin/portupgrade 6 Aug 2007 15:44:04 -0000
@@ -1705,11 +1705,7 @@
if !retried && reason == :checksum && $distclean == 1
progress_message "Retrying #{origin}"
- if /fetch/ =~ $fetch_cmd
- $fetch_cmd.gsub!(/[Rr]/, '')
- else
- $fetch_cmd = nil
- end
+ $fetch_cmd = nil
return build_port(origin, logfile, true)
end
@@ -1727,7 +1723,7 @@
progress_message "Deleting mismatched files"
if File.size(logfile) >= 65536 # 64KB
- obj = "| grep '^>> Checksum mismatch for ' #{logfile}"
+ obj = "| grep '^=> \\(MD5\\|SHA256\\) Checksum mismatch for ' #{logfile}"
else
obj = logfile
end
@@ -1737,8 +1733,8 @@
open(obj) do |f|
f.each do |line|
case line
- when /^>> Checksum mismatch for (\S+)\.\r?$/
- distfile = File.join($portsdb.dist_dir, $1)
+ when /^=> (MD5|SHA256) Checksum mismatch for (\S+)\.\r?$/
+ distfile = File.join($portsdb.dist_dir, $2)
information_message "Deleting #{distfile}"
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list