Opened 10 years ago

Closed 4 years ago

Last modified 4 years ago

#46956 closed enhancement (fixed)

base should keep track of explicitly requested variants on install and only preserve those on upgrade

Reported by: neverpanic (Clemens Lang) Owned by: neverpanic (Clemens Lang)
Priority: Normal Milestone: MacPorts 2.7.0
Component: base Version: 2.3.3
Keywords: Cc: mojca (Mojca Miklavec), larryv (Lawrence Velázquez), dliessi (Davide Liessi), ci42, cooljeanius (Eric Gallager)
Port:

Description

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:

Change History (12)

comment:1 Changed 10 years ago by neverpanic (Clemens Lang)

Cc: cal@… removed

comment:2 Changed 10 years ago by mojca (Mojca Miklavec)

Cc: mojca@… added

Cc Me!

comment:3 Changed 10 years ago by larryv (Lawrence Velázquez)

Cc: larryv@… added

Cc Me!

comment:4 Changed 10 years ago by dliessi (Davide Liessi)

Cc: davide.liessi@… added

Cc Me!

comment:5 Changed 8 years ago by mojca (Mojca Miklavec)

I wanted to point out a somewhat related "problem" reported in #51498.

comment:6 Changed 8 years ago by ci42

Cc: ci42 added

comment:7 Changed 7 years ago by neverpanic (Clemens Lang)

Milestone: MacPorts 2.6.0

comment:8 Changed 7 years ago by neverpanic (Clemens Lang)

Owner: changed from macports-tickets@… to neverpanic
Status: newaccepted

comment:9 Changed 7 years ago by mojca (Mojca Miklavec)

Milestone: MacPorts 2.6.0MacPorts 2.7.0

comment:10 Changed 4 years ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added

comment:11 Changed 4 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: acceptedclosed

In 19c933969bc62ee54c86fbadaf4d98252b3df5ee/macports-base (master):

Preserve only requested variants on upgrade

Fixes: #46956

comment:12 Changed 4 years ago by neverpanic (Clemens Lang)

Thanks. I wanted to fix this before bringing port migrate to mainline, so that it'll only preserve requested variants (since otherwise guessing which variants you actually wanted, and which ones you didn't is quite complicated).

Could you write a Changelog entry and document how the conversion from current state to requested variants works?

Note: See TracTickets for help on using tickets.