[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

update-alternatives suggestion



The update-alternatives(1) usage message says, in part:

    Usage: update-alternatives --install <link> <name> <path> <priority>
                              [--slave <link> <name> <path>] ...
           update-alternatives --remove <name> <path>
           update-alternatives --auto <name>
           update-alternatives --display <name>
    Options:  --verbose|--quiet  --test  --help  --version
              --altdir <directory>  --admindir <directory>

Suggest that this be the default behavior in the absence of a config
file named /etc/update-alternatives.conf, or the forced behavior if
the --force flag is supplied regardless of the presence of that file.

Suggest that, in the absence of the --force flag, the config file
be searched for a configured priority.  If found, the configured
priority should override the specified priority.  The file should
be in some user-friendly format such as:

    # comments are introduced by '#', and continue to end-of-line
    # substantive entries are in the form:
    #    link<whitespace>name<whitespace>priority
    #
    foo /usr/bin/bar 20
    foo /usr/bin/baz 30

This would allow the user to override priority relationships
between alternatives which are decided upon by package maintainers,
and which may not be appropriate in all cases on all systems.

Also, suggest that update-alternatives create the config file if it
does not exist, and enter the information used into that file if an
entry for the specified link and name is not already present.

I'm not a perl programmer, or I'd probably have provided a patch
to implement this.  Instead, since there's a request outstanding
for an update-alternatives man page, I'll put it on my to-do list
to contribute a draft.




Reply to: