Skip to content

locking packages not working as expected when dependencies need to be locked too #419

@oliverkurth

Description

@oliverkurth

Describe the bug

Locking an installed package version that is not available (in an enabled repo) does not work as intended with distro-sync, when there is a dependency that is also not available.

Reproduction steps

  1. install package with a version not available in a repo (for example a locally built package), example tdnf
  2. Lock it with
mkdir /etc/tdnf/locks.d
echo tdnf > /etc/tdnf/locks.d/tdnf.conf
  1. try tdnf distro-sync

Actual result:

root [ ~ ]# mkdir /etc/tdnf/locks.d
root [ ~ ]# echo tdnf > /etc/tdnf/locks.d/tdnf.conf
root [ ~ ]# tdnf distro-sync
1. package tdnf-3.5.2-1.ph4.x86_64 requires tdnf-cli-libs = 3.5.2-1.ph4, but none of the providers can be installed
Found 1 problem(s) while resolving
Error(1301) : Solv general runtime error

Expected behavior

All packages except tdnf will be sync'ed to the available repos. No downgrade of tdnf.

Additional context

To workaround, lock the installed dependency as well:

echo tdnf-cli-libs > /etc/tdnf/locks.d/tdnf.conf
# cat /etc/tdnf/locks.d/tdnf.conf
tdnf-cli-libs
tdnf

# tdnf distro-sync
Nothing to do.
root [ ~ ]# 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions