On 1/31/22 05:08 PM, Steven A. Falco wrote:
On 1/31/22 04:04 PM, Miro Hrončok wrote:
On 31. 01. 22 21:58, przemek klosowski via devel wrote:
During recent major version update, some files were moved from <package>-doc to <package>, and as a result updates of <package> fail due to a file conflict. Manual update of <package>-doc resolves this, of course.
A simple solution would be to declare that <package>
Required: package-doc >= 6.0.0
but that would force the install of the docs package if it wasn't already there.
Is there a way to declare a dependency only if the other package is present/installed? Would
Obsoletes: package-doc < 6.0.0
be the right thing to do?
The right thing to do is:
Conflicts: package-doc < 6.0.0
Ok, so that doesn't do what I'd like. I definitely added the conflict property:
# rpm -q -conflicts kicad-6.0.1-4.fc35.x86_64.rpm
kicad-doc < 6.0.0
But when I try to upgrade just the kicad package without upgrading the docs package, I still get:
# dnf update kicad-6.0.1-4.fc35.x86_64.rpm
...
Running transaction test
Error: Transaction test error:
file /usr/share/doc/kicad/scripts/lib_convert.py from install of kicad-1:6.0.1-4.fc35.x86_64 conflicts with file from package kicad-doc-1:5.1.12-1.fc35.noarch
file /usr/share/doc/kicad/scripts/test_kicad_plugin.py from install of kicad-1:6.0.1-4.fc35.x86_64 conflicts with file from package kicad-doc-1:5.1.12-1.fc35.noarch
So the Conflicts line doesn't actually seem to buy me anything.
I'll try again with the version from Stephen Gallagher (including the epoch) and see if that is any better.
The Conflict flag is now set to:
# rpm -q -conflicts kicad-6.0.1-4.fc35.x86_64.rpm
kicad-doc < 1:6.0.1-4.fc35
And the result is:
# dnf update kicad-6.0.1-4.fc35.x86_64.rpm
Last metadata expiration check: 0:40:27 ago on Mon 31 Jan 2022 05:06:19 PM EST.
Dependencies resolved.
Problem: problem with installed package kicad-doc-1:5.1.12-1.fc35.noarch
- package kicad-1:6.0.1-4.fc35.x86_64 conflicts with kicad-doc < 1:6.0.1-4.fc35 provided by kicad-doc-1:5.1.12-1.fc35.noarch
- cannot install the best update candidate for package kicad-1:5.1.12-1.fc35.x86_64
============================================================================================
Package Architecture Version Repository Size
============================================================================================
Skipping packages with conflicts:
(add '--best --allowerasing' to command line to force their upgrade):
kicad x86_64 1:6.0.1-4.fc35 @commandline 90 M
Transaction Summary
============================================================================================
Skip 1 Package
When I add the '--best --allowerasing' flags, then I get the desired result:
# dnf update kicad-6.0.1-4.fc35.x86_64.rpm --best --allowerasing
Last metadata expiration check: 0:43:04 ago on Mon 31 Jan 2022 05:06:19 PM EST.
Dependencies resolved.
============================================================================================
Package Architecture Version Repository Size
============================================================================================
Upgrading:
kicad x86_64 1:6.0.1-4.fc35 @commandline 90 M
Removing dependent packages:
kicad-doc noarch 1:5.1.12-1.fc35 @updates 111 M
So that looks like the best solution.
Thanks all for the help!
Steve
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure