#1036377 software-properties-common: Feature Request: Add Option to Support Alternate Release/Codename

#1036377#5
Date:
2023-05-20 08:26:54 UTC
From:
To:
Dear Maintainer,

This is a feature request to ask for an option to specify the release/codename
to use when adding a PPA.  Note that this option is likely to be useful for
other types of additions, but I will focus on the PPA case for simplicity.

## Use Case

The use-case to be solved is when a user on for example Ubuntu 23.04 (codename
"lunar") wants to add a PPA using a release/codename other than "lunar".  This
may be required to add PPAs like ppa:aos1/diff-so-fancy or
ppa:appimagelauncher-team/stable that do not yet have a "lunar" release.  (At
the time of this writing the latest releases of these are "jammy" and "kinetic"
respectively.)

However, invoking "apt-add-repository ppa:aos1/diff-so-fancy" always put a
"lunar" line in /etc/apt/sources.list.d/aos1-ubuntu-diff-so-fancy-kinetic.list,
and "apt update" will subsequently fail.

## Requested Feature

My request is that there be added an option similar to --component or --pocket
that allows the user to directly specify the release/codename.  For example,
the user could say "apt-add-repository ppa:aos1/diff-so-fancy --release jammy"
or "apt-add-repository ppa:aos1/diff-so-fancy --codename jammy".  (I am not
sure whether the preferred terminology is "release" or "codename".)

Note that the --pocket option does not solve this problem as that is for
specifying "--pocket updates" to get "lunar-updates".

The --sourceslist option does not fully solve this problem either as it does
not add the key for the PPA to /etc/apt/trusted.gpg.d.

## How to Implement

Note that the code for the base-class of the handlers (in
/usr/lib/python3/dist-packages/softwareproperties/shortcuthandler.py) already
has an argument for specifying the "codename", so I think implementing this
would be as simple as adding a "codename" entry to "shortcut_params" in
/usr/bin/apt-add-repository.


Thank you for your time,
Michael D. Adams