0

Suppose I had the following entries in /var/log/dnf.log:

 elfutils-default-yama-scope        noarch  0.185-1.el8                                baseos                       49 k
 elfutils-devel                     x86_64  0.185-1.el8                                baseos                       86 k
 elfutils-libelf                    x86_64  0.185-1.el8                                baseos                      221 k
 elfutils-libelf-devel              x86_64  0.185-1.el8                                baseos                       59 k
 elfutils-libs                      x86_64  0.185-1.el8                                baseos                      292 k
 emacs                              x86_64  1:26.1-7.el8                               appstream                   3.2 M
 emacs-common                       x86_64  1:26.1-7.el8                               appstream                    38 M
 emacs-filesystem                   noarch  1:26.1-7.el8                               baseos                       70 k
 enchant2                           x86_64  2.2.3-3.el8                                appstream                    62 k
 epel-release                       noarch  8-11.el8                                   Extras                       24 k
 ethtool                            x86_64  2:5.8-7.el8                                baseos                      209 k

Et cetera. Then how do I deduce the remote URL the package lives at? As it happens this is an older CentOS version and my repo file referenced vault.centos.org. The box in question has since been upgraded to a recent RHEL version, so the repo files are different. Originally I thought that I could reconstruct the remote RPM URL with the above data, but it only works about 4/5 times.

Lucky
  • 101
  • 1

1 Answers1

0

dnf-plugins-core provides core plugins for dnf, including DNF download plugin.

To display package RPM download URL, try using dnf download command from dnf-plugins-core package, e.g.:

dnf download --url package-name
mforsetti
  • 2,666
  • 2
  • 16
  • 20