[50416] trunk/base/src/package1.0

jmr at macports.org jmr at macports.org
Thu Apr 30 11:41:47 PDT 2009


Revision: 50416
          http://trac.macports.org/changeset/50416
Author:   jmr at macports.org
Date:     2009-04-30 11:41:47 -0700 (Thu, 30 Apr 2009)
Log Message:
-----------
fix archive rebuild logic (#10785)

Modified Paths:
--------------
    trunk/base/src/package1.0/portarchive.tcl
    trunk/base/src/package1.0/portunarchive.tcl

Modified: trunk/base/src/package1.0/portarchive.tcl
===================================================================
--- trunk/base/src/package1.0/portarchive.tcl	2009-04-30 18:38:48 UTC (rev 50415)
+++ trunk/base/src/package1.0/portarchive.tcl	2009-04-30 18:41:47 UTC (rev 50416)
@@ -37,7 +37,7 @@
 set org.macports.archive [target_new org.macports.archive portarchive::archive_main]
 target_init ${org.macports.archive} portarchive::archive_init
 target_provides ${org.macports.archive} archive
-target_requires ${org.macports.archive} main fetch extract checksum patch configure build destroot
+target_requires ${org.macports.archive} main unarchive fetch extract checksum patch configure build destroot
 target_prerun ${org.macports.archive} portarchive::archive_start
 target_postrun ${org.macports.archive} portarchive::archive_finish
 
@@ -107,15 +107,24 @@
 		set skipped 1
 	} else {
 		set unsupported 0
+		set any_missing no
 		foreach archive.type [option portarchivetype] {
 			if {[catch {archiveTypeIsSupported ${archive.type}} errmsg] == 0} {
 				set archive.file "${portname}-${portversion}_${portrevision}${portvariants}.[option os.arch].${archive.type}"
 				set archive.path "[file join ${archive.fulldestpath} ${archive.file}]"
+				if {![file exists ${archive.path}]} {
+				    set any_missing yes
+				}
 			} else {
 				ui_debug "Skipping [string toupper ${archive.type}] archive: $errmsg"
 				set unsupported [expr $unsupported + 1]
 			}
 		}
+		if {!$any_missing} {
+			# might be nice to allow forcing, but let's fix #16061 first
+			ui_debug "Skipping archive ($portname) since archive(s) already exist"
+			set skipped 1
+		}
 		if {${archive.type} == "xpkg"} {
 			set archive.meta true
 		}

Modified: trunk/base/src/package1.0/portunarchive.tcl
===================================================================
--- trunk/base/src/package1.0/portunarchive.tcl	2009-04-30 18:38:48 UTC (rev 50415)
+++ trunk/base/src/package1.0/portunarchive.tcl	2009-04-30 18:41:47 UTC (rev 50416)
@@ -308,9 +308,6 @@
 
     # Update the state from unpacked archive version
     set target_state_fd [open_statefile]
-
-	# Archive unpacked, skip archive target
-	write_statefile target "org.macports.archive" $target_state_fd
     
 	# Cleanup all control files when finished
 	set control_files [glob -nocomplain -types f [file join $destpath +*]]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090430/ffdc9f63/attachment.html>


More information about the macports-changes mailing list