[41526] trunk/base

pguyot at kallisys.net pguyot at kallisys.net
Wed Nov 5 05:45:07 PST 2008


Revision: 41526
          http://trac.macports.org/changeset/41526
Author:   pguyot at kallisys.net
Date:     2008-11-05 05:45:07 -0800 (Wed, 05 Nov 2008)
Log Message:
-----------
Handle new syntax for dependencies, to allow work for dependencies to happen on trunk/ where ports lie, while base/ is frozen for most users (cf bug #126)

Modified Paths:
--------------
    trunk/base/src/port1.0/portdepends.tcl
    trunk/base/tests/test/dependencies-d/Portfile
    trunk/base/tests/test/dependencies-d/master

Added Paths:
-----------
    trunk/base/tests/test/dependencies-d/

Modified: trunk/base/src/port1.0/portdepends.tcl
===================================================================
--- trunk/base/src/port1.0/portdepends.tcl	2008-11-05 13:42:13 UTC (rev 41525)
+++ trunk/base/src/port1.0/portdepends.tcl	2008-11-05 13:45:07 UTC (rev 41526)
@@ -34,7 +34,7 @@
 package require portutil 1.0
 
 # define options
-options depends_build depends_run depends_lib
+options depends_build depends_run depends_lib depends
 # Export options via PortInfo
 options_export depends_build depends_lib depends_run
 
@@ -42,6 +42,11 @@
 option_proc depends_run validate_depends_options
 option_proc depends_lib validate_depends_options
 
+# New option for the new dependency. We generate a warning because we don't handle this yet.
+option_proc depends validate_depends_options_new
+
+set_ui_prefix
+
 proc validate_depends_options {option action {value ""}} {
     global targets
     switch $action {
@@ -49,10 +54,15 @@
 			foreach depspec $value {
 				switch -regex $depspec {
 					^(lib|bin|path):([-A-Za-z0-9_/.${}^?+()|\\\\]+):([-._A-Za-z0-9]+)$ {}
-					^(port):([-._A-Za-z0-9]+)$ {}
+					# port syntax accepts colon-separated junk that we do not understand yet.
+					^(port)(:.+)?:([-._A-Za-z0-9]+)$ {}
 					default { return -code error [format [msgcat::mc "invalid depspec: %s"] $depspec] }
 				}
 			}
 		}
     }
 }
+
+proc validate_depends_options_new {option action {value ""}} {
+    ui_warn [msgcat::mc "depends option is not handled yet"]
+}


Property changes on: trunk/base/tests/test/dependencies-d
___________________________________________________________________
Added: svn:ignore
   + output

Added: svn:mergeinfo
   + 

Modified: trunk/base/tests/test/dependencies-d/Portfile
===================================================================
--- trunk/base/tests/test/dependencies-c/Portfile	2008-10-28 23:47:23 UTC (rev 41242)
+++ trunk/base/tests/test/dependencies-d/Portfile	2008-11-05 13:45:07 UTC (rev 41526)
@@ -1,7 +1,7 @@
 # $Id$
 
 PortSystem 1.0
-name		dependencies-c
+name		dependencies-d
 version		1
 categories	test
 maintainers	pguyot at kallisys.net
@@ -20,11 +20,13 @@
 	system "touch ${destroot}${prefix}/lib/${name}"
 }
 
-default_variants	+i_want_a
+# Check that macports doesn't chunk on this junk.
+# This might mean this port depends on port dependencies-a without variant
+# i_want_b (which is a default variant).
+depends_lib	port:-i_want_b:dependencies-a
 
-variant i_want_a {
-	depends_lib-append	port:dependencies-a
-}
+# Check that macports doesn't chunk on this junk, but just generates a warning.
+depends {configure {dependencies-a +i_want_b >= 1}}
 
 test {
 # testing consists in processing dependencies

Modified: trunk/base/tests/test/dependencies-d/master
===================================================================
--- trunk/base/tests/test/dependencies-c/master	2008-10-28 23:47:23 UTC (rev 41242)
+++ trunk/base/tests/test/dependencies-d/master	2008-11-05 13:45:07 UTC (rev 41526)
@@ -1,3 +1,5 @@
+Warning: depends option is not handled yet
+Warning: depends option is not handled yet
 --->  Fetching dependencies-b
 --->  Verifying checksum(s) for dependencies-b
 --->  Extracting dependencies-b
@@ -2,3 +4,3 @@
 --->  Configuring dependencies-b
---->  Building dependencies-b with target all
+--->  Building dependencies-b
 --->  Staging dependencies-b into destroot
@@ -11,14 +13,14 @@
 --->  Verifying checksum(s) for dependencies-a
 --->  Extracting dependencies-a
 --->  Configuring dependencies-a
---->  Building dependencies-a with target all
+--->  Building dependencies-a
 --->  Staging dependencies-a into destroot
 --->  Installing dependencies-a @1_0+i_want_b
 --->  Activating dependencies-a @1_0+i_want_b
 --->  Cleaning dependencies-a
---->  Fetching dependencies-c
---->  Verifying checksum(s) for dependencies-c
---->  Extracting dependencies-c
---->  Configuring dependencies-c
---->  Building dependencies-c with target all
---->  Testing dependencies-c
+--->  Fetching dependencies-d
+--->  Verifying checksum(s) for dependencies-d
+--->  Extracting dependencies-d
+--->  Configuring dependencies-d
+--->  Building dependencies-d
+--->  Testing dependencies-d
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20081105/51519429/attachment-0001.html>


More information about the macports-changes mailing list