locking packages not working as expected when dependencies need to be locked too
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 130
- Forks
- 55
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 7
Description
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
- install package with a version not available in a repo (for example a locally built package), example
tdnf - Lock it with
mkdir /etc/tdnf/locks.d
echo tdnf > /etc/tdnf/locks.d/tdnf.conf
- 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 [ ~ ]#
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the documented /etc/tdnf/locks.d/tdnf.conf entries and tdnf distro-sync, comparing behavior when only tdnf or both packages are locked. Trace the distro-sync dependency-resolution path and verify that an unavailable locked package does not prevent other packages from syncing or trigger its downgrade.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- backend, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100