Skip to content

Commit

Permalink
Use 'allow_vendor_change=yes' with DNF and DNF5
Browse files Browse the repository at this point in the history
The `allow_vendor_change=no` option is going to be set in DNF5 as
default: rpm-software-management/dnf5#712
But it is also set by openSUSE with DNF4.

With Mock though, is very common to override the distro default package
with a custom one (newer or fixed packages?).  And blindly trying to
keep the Vendor tag unchanged for the overridden packages would be very
complicated task, without real benefits.

Note `allow_vendor_change=no` only affects the cases when some package
in the buildroot/bootstrap needs to be _updated_ while _typically_ all
the packages are only _installed_ at the beginning and are already
up2date.  This is therefore mainly related to the --chain option, or
cases like `bootstrap_image_ready=False`, `update_before_build`, the
feature in rpm-software-management#1159, etc.

Fixes: rpm-software-management#1155
  • Loading branch information
praiskup committed Jul 24, 2023
1 parent 01e8cc4 commit cce2646
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions mock/docs/site-defaults.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@

# DNF (or DNF4, Python) - https://github.com/rpm-software-management/dnf
#config_opts['dnf_command'] = '/usr/bin/dnf-3'
#config_opts['dnf_common_opts'] = ['--setopt=deltarpm=False', '--allowerasing']
#config_opts['dnf_common_opts'] = ['--setopt=deltarpm=False', '--setopt=allow_vendor_change=yes', '--allowerasing']
# DF5 sub-command 'builddep' doesn't support the '--allowerasing' option:
# https://github.com/rpm-software-management/dnf5/issues/461
#config_opts["dnf5_avoid_opts"] = {"builddep": ["--allowerasing"]}
Expand All @@ -499,7 +499,7 @@
# Known issue with DNF5: --forcearch is not supported by DNF5
# https://github.com/rpm-software-management/dnf5/issues/112
#config_opts['dnf5_command'] = '/usr/bin/dnf5'
#config_opts['dnf5_common_opts'] = ['--setopt=deltarpm=False', '--allowerasing']
#config_opts['dnf5_common_opts'] = ['--setopt=deltarpm=False', '--setopt=allow_vendor_change=yes', '--allowerasing']
#config_opts['dnf5_install_command'] = 'install dnf5 dnf5-plugins'
#config_opts['dnf5_disable_plugins'] = []

Expand Down
4 changes: 2 additions & 2 deletions mock/py/mockbuild/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,14 +299,14 @@ def setup_default_config_opts():

config_opts['dnf_command'] = '/usr/bin/dnf-3'
config_opts['system_dnf_command'] = '/usr/bin/dnf-3'
config_opts['dnf_common_opts'] = ['--setopt=deltarpm=False', '--allowerasing']
config_opts['dnf_common_opts'] = ['--setopt=deltarpm=False', '--setopt=allow_vendor_change=yes', '--allowerasing']
config_opts['dnf_install_command'] = 'install python3-dnf python3-dnf-plugins-core'
config_opts['dnf_disable_plugins'] = ['local', 'spacewalk', 'versionlock']
config_opts["dnf_avoid_opts"] = {}

config_opts['dnf5_command'] = '/usr/bin/dnf5'
config_opts['system_dnf5_command'] = '/usr/bin/dnf5'
config_opts['dnf5_common_opts'] = ['--setopt=deltarpm=False', '--allowerasing']
config_opts['dnf5_common_opts'] = ['--setopt=deltarpm=False', '--setopt=allow_vendor_change=yes', '--allowerasing']
config_opts['dnf5_install_command'] = 'install dnf5 dnf5-plugins'
config_opts['dnf5_disable_plugins'] = []
# No --allowerasing with remove, per
Expand Down

0 comments on commit cce2646

Please sign in to comment.