[MacPorts] #32782: Feature: add source only option to macports.conf

MacPorts noreply at macports.org
Wed Feb 1 17:27:48 PST 2012


#32782: Feature: add source only option to macports.conf
------------------------------+---------------------------------------------
  Reporter:  bm55b@…          |       Owner:  macports-tickets@…                   
      Type:  enhancement      |      Status:  closed                               
  Priority:  Low              |   Milestone:  MacPorts Future                      
 Component:  base             |     Version:  2.0.3                                
Resolution:  fixed            |    Keywords:                                       
      Port:                   |  
------------------------------+---------------------------------------------

Comment(by mackyle@…):

 I attempted to use this in MacPorts-2.0.3 by applying the r81540 diff to
 macports.tcl.  The patch applies cleanly (no fuzz or offset).

 However, the result does not work.  The buildfromsource option in
 macports.conf is ignored.

 But after making these changes to the r81540 diff to macports.tcl, it does
 work with MacPorts-2.0.3:

   1. Add buildfromsource to the bootstrap_options variable at the top of
 the file
   2. Where the patch has set macports::global_options (2 places) change it
 to set global_options instead

 Looking at the trunk version of the entire macports.tcl file, I don't see
 how this can work on trunk either without buildfromsource in
 bootstrap_options.

 Here is the patch against r81540 to make the changes mentioned above:

 {{{
 --- macports.tcl        2012-02-01 23:56:01.000000000 +0000
 +++ macports.tcl.new    2012-02-02 00:49:17.000000000 +0000
 @@ -42,7 +42,7 @@
      namespace export bootstrap_options user_options portinterp_options
 open_mports ui_priorities port_phases
      variable bootstrap_options "\
          portdbpath libpath binpath auto_path extra_env sources_conf
 prefix portdbformat \
 -        portarchivetype portautoclean \
 +        portarchivetype portautoclean buildfromsource \
          porttrace portverbose keeplogs destroot_umask variants_conf
 rsync_server rsync_options \
          rsync_dir startupitem_type place_worksymlink xcodeversion
 xcodebuildcmd \
          mp_remote_url mp_remote_submit_url configureccache ccache_dir
 ccache_size configuredistcc configurepipe buildnicevalue buildmakejobs \
 @@ -691,9 +691,9 @@
          && ![info exists macports::global_options(ports_source_only)]
          && [info exists macports::buildfromsource]} {
          if {${macports::buildfromsource} == "never"} {
 -            set macports::global_options(ports_binary_only) yes
 +            set global_options(ports_binary_only) yes
          } elseif {${macports::buildfromsource} == "always"} {
 -            set macports::global_options(ports_source_only) yes
 +            set global_options(ports_source_only) yes
          } elseif {${macports::buildfromsource} != "ifneeded"} {
              ui_warn "'buildfromsource' set to unknown value
 '${macports::buildfromsource}', using 'ifneeded' instead"
          }
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/32782#comment:3>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list