[MacPorts] #46956: base should keep track of explicitly requested variants on install and only preserve those on upgrade

MacPorts noreply at macports.org
Tue Feb 24 12:47:52 PST 2015

#46956: base should keep track of explicitly requested variants on install and only
preserve those on upgrade
 Reporter:  cal@…        |      Owner:  macports-tickets@…
     Type:  enhancement  |     Status:  new
 Priority:  Normal       |  Milestone:
Component:  base         |    Version:  2.3.3
 Keywords:               |       Port:
 Base currently tries to preserve all installed variants when upgrading a
 port. In the case of version choice variants (such as perl5_16, llvm33,
 ...) this leads to a situation where a user does not actively choose a
 variant when installing, but the variant is still preserved even when the
 port's default variant changes later on. Users no longer get binary
 archives for these non-default variants and generally end up on rather
 outdated systems. We should modify MacPorts to only preserve variants that
 have been explicitly requested.

 To do that, I propose we add a new database field `requested_variants` to
 the ports table of the registry. It should have the same format as the
 currently available `variants` and `negated_variants` field (which could,
 IMHO, be merged into one). The installation code should be modified to
 store the list of variants explicitly requested on the command line in
 this field. The upgrade code should also be modified to preserve the list
 of requested variants, not the list of all variants of a port.

 A couple pointers to a possible implementation:
  - The database field would have to be added along with an upgrade path in
  - The registry sqlite access code should be modified to support the
 field, in source:trunk/base/src/registry2.0/entryobj.c
  - The registry API should be modified to support passing the field, in
  - The macports installation and upgrade routines should be modified as
 described above, in source:trunk/base/src/macports1.0/macports.tcl,

Ticket URL: <https://trac.macports.org/ticket/46956>
MacPorts <https://www.macports.org/>
Ports system for OS X

More information about the macports-tickets mailing list