#995895 software-properties: add-apt-repository signed-by attribute invalid

#995895#5
Date:
2021-10-07 22:51:52 UTC
From:
To:
Dear Maintainer,

apt-key is deprecated and warns that it will be removed in a future release:
"apt-key(8) will last be available in Debian 11 and Ubuntu 22.04."

Therefore modifying 3rd party repo enablement instructions to:
wget https://path/to/$KEYNAME.pub
sudo gpg --no-default-keyring --keyring /etc/apt/trusted.gpg.d/$REPONAME.gpg --import $KEYNAME.pub
sudo add-apt-repository "deb [signed-by=/etc/apt/trusted.gpg.d/$REPONAME.gpg] https://path/to/debian/repo/ /"

The last command, add-apt-repository, while expected to append an entry to /etc/apt/sources.list
instead returns Error: 'deb [signed-by=/etc/apt/trusted.gpg.d/$REPONAME.gpg] https://path/to/debian/repo/ /' invalid

Manually editing the sources.list file works (or adding a new file to /etc/apt/sources.list.d/)

However would prefer to instruct users to use add-apt-repository command:
    * standard repo management command
    * clear what it is doing
    * checks syntax

Therefore would like to request fixing add-apt-repository to handle additional attributes such as signed-by.

Alternatively, perhaps a parameter could be added to specify the location of the public signing key on the filesystem.