Skip to content

Added support for user config sorting rules

Benjamin Winger requested to merge bmwinger/portmod:user_sort into master

Closes #90 (closed)

User config rules can be specified via a csv file in PORTMOD_CONFIG_DIR/config/TYPE.csv, where type is the name of the config section as defined by the Config object in the profile (not including the CONFIG_ prefix, if any). These include install, plugin, archive, etc.

First column in the csv file is the overriding entry, with all other columns being the overridden entries (I.e., you specify a one to many relationship in each line of the file, with the one being the entry that ends up loading last). Quotation marks can be used to handle file names that contain commas, and I believe there is a way to escape double quotes.

Tests are included, however an outstanding feature is more informative cycle detection, as we need to be able to give users useful information about problems with user rules.

A wiki article should be made describing how this works, as well giving a brief overview of the automatic sorting rules and instructing users to pass objective changes upstream to the mod repo, as this feature is designed for subjective ordering.

  • Informative cycle detection
  • Wiki page
Edited by Benjamin Winger

Merge request reports