Open jasontibbitts opened 6 years ago
Interestingly, the dnf documentation (in F28 and rawhide, at least) does say that --advisory works with install:
--advisory=
, --advisories= Includes packages corresponding to the advisory ID, Eg. FEDORA-2201-123. Applicable for install, repoquery, updateinfo, and upgrade command.
But it certainly doesn't work for me.
I think we could add a new email template with different instructions and use that if the update is a "new package" type. Something like:
--------------------------------------------------------------------------------
Fedora%(testing)s New Package Notification
%(updateid)s
%(date)s
--------------------------------------------------------------------------------
Name : %(name)s
Product : %(product)s
Version : %(version)s
Release : %(release)s
URL : %(url)s
Summary : %(summary)s
Description :
%(description)s
--------------------------------------------------------------------------------
%(notes)s%(changelog)s%(references)s
This update can be installed with the "dnf" update program. Use
su -c 'dnf%(yum_repository)s install --advisory %(updateid)s' at the command
line. For more information, refer to the dnf documentation available at
http://dnf.readthedocs.io/en/latest/command_ref.html#upgrade-command-label
All packages are signed with the Fedora Project GPG key. More details on the
GPG keys used by the Fedora Project can be found at
https://fedoraproject.org/keys
--------------------------------------------------------------------------------
I've also filled a bug against dnf to see why the --advisory option doesn't work with install: https://bugzilla.redhat.com/show_bug.cgi?id=1625879
So it seems I was confused by the terseness of the dnf documentation. When passing --advisory
to dnf install
, you still have to tell it which packages in that advisory you want it to install. It's no difference between dnf update
and dnf install
; the latter will always require at least one package name, file or provided symbol. If I do dnf install --advisory FEDORA-2018-b7b99fe852 \*
then it works as expected and the advisory just acts as a limit on the installed package set, exactly as it does with update
.
Still, that doesn't mean that you actually want every package mentioned in an update notice to be installed, since it may include a pile of subpackages and some of them might drag in a bunch of dependencies that you don't need.
--------------------------------------------------------------------------------
Fedora%(testing)s New Package Notification
%(updateid)s
%(date)s
--------------------------------------------------------------------------------
Name : %(name)s
Product : %(product)s
Version : %(version)s
Release : %(release)s
URL : %(url)s
Summary : %(summary)s
Description :
%(description)s
--------------------------------------------------------------------------------
%(notes)s%(changelog)s%(references)s
This update can be installed with the "dnf" update program. Use
su -c 'dnf%(yum_repository)s install --advisory %(updateid)s *' at the command
line. If multiple packages are included, it may be advisable to refine the pattern
to only install the ones you wish to be installed. For more information, refer to
the dnf documentation available at
http://dnf.readthedocs.io/en/latest/command_ref.html#upgrade-command-label
All packages are signed with the Fedora Project GPG key. More details on the
GPG keys used by the Fedora Project can be found at
https://fedoraproject.org/keys
--------------------------------------------------------------------------------
I'm having this issue with my bodhi update.
sudo dnf install --enablerepo=updates-testing --advisory=FEDORA-2022-e4c4db9195 \*
Last metadata expiration check: 0:15:03 ago on Sat 19 Feb 2022 12:41:25.
No security updates for argument "*"
All matches were filtered out by exclude filtering for argument: *
* Maybe you meant: AtomicParsley
Error: Unable to find a match: *
Here's an example of a new package announcement: https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3JSAB7PV64UL2D7BSKVB2ISP2DL4SSUT/
The instructions at the bottom are generic to all updates, but unfortunately don't work for new packages:
And if you try the obvious
dnf install
you'll find that it doesn't accept the--advisory
option. I'm not even sure if it would make sense if it did; I guess it could install every binary package generated but that's probably not a particularly good idea.For new package requests, is it possible to either replace that text with something more generic or remove it entirely? I was going to suggest that something like this might work:
but it does seem like the bodhi web interface simply has no idea about the build products of a package. I'm sure it knows at some level but that doesn't seem to be exposed. Linking to koji seems pointless. Certainly the package maintainers could provide useful instructions when submitting the update but somehow I doubt that will happen often. And I don't think that the updates system could ever do more than provide a list of build artifacts anyway. It won't generally be obvious which ones someone would install.