dnf reposync implicitly downloads src rpm in RHEL8
Red Hat Enterprise Linux (RHEL) 7, 8
dnf reposync ... --source command behaves differently from
RHEL7 when downloading source packages
*.src.rpm packages are downloaded regardless of the
The observed behavior is not a bug, it is a changed behavior in
*.src.rpm packages are not required, they must be explicitly excluded using the
--exclude option as the following example:
dnf reposync ... --exclude='*.src' or dnf reposync ... -x '*.src'
An example, how to exclude multiple package types:
dnf reposync ... --exclude='*.src,*.nosrc'
See man page:
man dnf | grep -A1 -- '-x ' -x <package-file-spec>, --exclude=<package-file-spec> Exclude packages specified by <package-file-spec> from the operation.
Behavior of the
dnf reposync ... --source command in the
--sourceoption is absent only binary RPMs get downloaded
--sourceoption is present both binary and source RPMs get downloaded
--sourceoption is absent both binary and source RPMs get downloaded
--sourceoption is present only source RPMs get downloaded
- Red Hat Enterprise Linux
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.