Opened 12 years ago

Closed 11 years ago

#14482 closed enhancement (fixed)

RFE: Global variant descriptions (per source)

Reported by: raimue (Rainer Müller) Owned by: raimue (Rainer Müller)
Priority: Normal Milestone: MacPorts 1.7.0
Component: base Version: 1.7.0
Keywords: variants descriptions Cc:
Port:

Description

There are variants which are used on multiple ports. To provide a consistent experience, these should get only one place for their description.

Proposal:

  • Add a file ${sourcepath}/.config/variant_descriptions to each source
  • The file should be formatted in Tcl style as follows:
    name1 {The description of name1 variant}
    name2 {Insert description here}
    
  • If no description was given in the Portfile itself, port variants will read this file (if present) and display the variant description from there
  • port lint should be tweaked to check for existance of global variant descriptions before spitting out warnings

Attachments (1)

upgrade_sources_conf_default.tcl (1.9 KB) - added by blb@… 11 years ago.
sources.conf upgrade script

Download all attachments as: .zip

Change History (12)

comment:1 Changed 12 years ago by raimue (Rainer Müller)

Type: defectenhancement

comment:2 Changed 12 years ago by raimue (Rainer Müller)

Component: portsbase

comment:3 Changed 12 years ago by raimue (Rainer Müller)

Started a branch for this, branches/variant-descs-14482

comment:4 Changed 12 years ago by raimue (Rainer Müller)

The current style of the file in the branch is:

name1 The description of name1 variant
name2 Insert description here

Do we support multi-line descriptions for variants? Should we?

comment:5 Changed 11 years ago by raimue (Rainer Müller)

Milestone: MacPorts base enhancementsMacPorts 1.7.0

comment:6 Changed 11 years ago by blb@…

I've moved the install dir (containing the mtree files) into the .../share/macports directory (r41463), stopped the resources directory from being installed with base (r41462), and added [default] to sources.conf (r41458).

I think all that is left is to actually move resources to dports/.resources (and add in port1.0), then to come up with some method for handling an upgrade-style installation, since I don't think sources.conf is overwritten if it already installs.

comment:7 Changed 11 years ago by blb@…

How does the attached script look for updating sources.conf in postflight and in the install target of the Makefile?

Changed 11 years ago by blb@…

sources.conf upgrade script

comment:8 Changed 11 years ago by blb@…

FYI, upgrade_sources_conf_default.tcl added in r42575.

comment:9 Changed 11 years ago by blb@…

I added the svnmerge-integrated property to trunk/base in r42654 so I could check to see how much is affected by the eventual merge-back. It looks like only one conflict in portlint.tcl and it's an easy one to handle; so the merge shouldn't be too much work when we're ready to do that (which should be done with the move of resources to dports/).

comment:10 Changed 11 years ago by raimue (Rainer Müller)

As of r42659 the branch is using _resources as directory name.

comment:11 Changed 11 years ago by raimue (Rainer Müller)

Resolution: fixed
Status: newclosed

The branch variant-descs-14482 was merged to trunk in r42662 and a file for global variant descriptions was added in r42668. Marking as fixed.

Note: See TracTickets for help on using tickets.