[PATCH] Force build from source if macports.conf sets delete_la_files

Lawrence Velázquez larryv at macports.org
Mon Jul 22 23:42:01 PDT 2013

On Jul 22, 2013, at 11:32 AM, Rainer Müller <raimue at macports.org> wrote:

> Other options of this kind such as prefix, applications_dir, and
> frameworks_dir are handled in archive_sites.conf.
> Shouldn't we add this one there instead?

I'm not sure that this is the same kind of beast.

The checks in archive_sites.conf / portarchivefetch.tcl are per-site; they can differ from one archive source to the next, if you specify multiple archive sources.

On the other hand, this is a global setting that effectively overrides buildfromsource, so it's cleaner (and easier) to handle it where buildfromsource is handled. I tried to implement the check in portarchivefetch.tcl but found that I'd have to also fix _archive_available in portutil.tcl, and who knows what else. It seems better to literally override buildfromsource and leverage all the existing always-build-from-source logic.


Index: src/macports1.0/macports.tcl
--- src/macports1.0/macports.tcl	(revision 108415)
+++ src/macports1.0/macports.tcl	(working copy)
@@ -796,6 +796,16 @@
             set macports::porttrace $macports::global_options(ports_trace)
+    # Check delete_la_files override for source/binary only mode
+    if {[info exists delete_la_files] &&
+        ($os_platform eq {darwin} && $os_major >= 13 && !$delete_la_files ||
+         ($os_platform ne {darwin} || $os_major < 13) && $delete_la_files)
+    } then {
+        ui_debug {Forcing source builds because 'delete_la_files' has a non-default value}
+        set macports::buildfromsource always
+    }
     # Check command line override for source/binary only mode
     if {![info exists macports::global_options(ports_binary_only)]
         && ![info exists macports::global_options(ports_source_only)]

More information about the macports-dev mailing list