Bug 1748187 - cannot install the best update candidate for package liberation-fonts-1:2.00.5-3.fc30.noarch
Summary: cannot install the best update candidate for package liberation-fonts-1:2.00....
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: liberation-narrow-fonts
Version: 30
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: vishalvvr
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-09-03 06:30 UTC by Sascha Peilicke
Modified: 2020-06-06 00:22 UTC (History)
23 users (show)

Fixed In Version: liberation-fonts-2.00.5-6.fc31
Clone Of:
Environment:
Last Closed: 2020-04-07 06:37:12 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Sascha Peilicke 2019-09-03 06:30:49 UTC
Description of problem:

$ sudo dnf upgrade --best --allowerasing --skip-broken
Last metadata expiration check: 0:01:01 ago on Di 03 Sep 2019 08:17:06 CEST.
Error: 
 Problem: cannot install the best update candidate for package liberation-fonts-1:2.00.5-3.fc30.noarch
  - cannot install both liberation-fonts-1:2.00.5-1.fc30.noarch and liberation-fonts-1:2.00.5-3.fc30.noarch
  - problem with installed package liberation-narrow-fonts-1.07.6-1.fc30.noarch
  - cannot install the best update candidate for package liberation-narrow-fonts-1.07.6-1.fc30.noarch

$ dnf list installed | grep liberation          
liberation-fonts.noarch                           1:2.00.5-3.fc30    @updates                                    
liberation-fonts-common.noarch                    1:2.00.5-3.fc30    @updates                                    
liberation-mono-fonts.noarch                      1:2.00.5-3.fc30    @updates                                    
liberation-narrow-fonts.noarch                    1.07.6-1.fc30      @fedora                                     
liberation-sans-fonts.noarch                      1:2.00.5-3.fc30    @updates                                    
liberation-serif-fonts.noarch                     1:2.00.5-3.fc30    @updates

Comment 1 Fabian 2019-09-04 09:10:22 UTC
Confirm

Comment 2 Ivan Mironov 2019-09-04 12:45:53 UTC
Same.

May be related to https://bugzilla.redhat.com/show_bug.cgi?id=1707712

Comment 3 Carl George 2019-09-05 01:07:03 UTC
As a temporary workaround, you can avoid the "skipping packages" noise if you add excludepkgs=liberation-fonts to /etc/yum.repos.d/fedora.repo under the [fedora] section.  This is because the problematic obsoletes is in liberation-fonts-2.00.5-1.fc30, which is only in the fedora repo, while the updates repo has the corrected liberation-fonts-2.00.5-3.fc30.

As noted in bug 1707712, comment 10 this is really a dnf bug.

Comment 4 Jaroslav Mracek 2019-09-05 07:15:53 UTC
This is not a problem in DNF, but a packaging issue. Playing with Obsoletes during life time of distribution is dangerous thing. Next time when obsolete is removed it requires version bump over version of obsolete.

Example:
Obsoletes: liberation-narrow-fonts < 1:2.0.0

To overcome the issue it requires release of liberation-narrow-fonts with version 1:2.0.0 or higher.

*** This bug has been marked as a duplicate of bug 1707712 ***

Comment 5 Kevin Kofler 2019-09-05 10:22:01 UTC
This *is* a DNF problem. It should *not* consider the Obsoletes in liberation-fonts-2.00.5-1.fc30 if the higher EVR liberation-fonts-2.00.5-3.fc30 is available, exactly so that bad Obsoletes can be removed in updates. This is how things worked in YUM and, I believe, even in older versions of DNF, exactly so that this scenario works as expected.

Comment 6 Jaroslav Mracek 2019-09-05 14:36:30 UTC
The behavior of YUM was incorrect. YUM always considered only latest packages for transaction, the older packages were completely ignored therefore YUM was unable to handle many situations.
DNF uses libsolv as a solver that consider all possibilities, therefore dnf is capable to resolve transaction that YUM was unable to.


The situation here is based on packaging error that could be resolved by:

1. To overcome the issue it requires release of liberation-narrow-fonts with version 1:2.0.0 or higher.

2. Return the obsolete in liberation-fonts to keep upgrade path.

For dnf this bug has status close with resolution - notabug, therefore changing the component:


In case that maintainers of liberation-narrow-fonts do not agree with solution please change component to liberation-fonts.

In case that maintainers of liberation-fonts do not agree with solution please change component to liberation-narrow-fonts (here I want to mentioned that the issue was originally in liberation-fonts).

Comment 7 Carl George 2019-09-05 16:51:02 UTC
Seeing as liberation-narrow-fonts is at version 1.07.5-3, and the previous incorrect obsoletes in liberation-fonts was for 1:2.0.0, the only way to resolve this is to bump the epoch for liberation-narrow-fonts directly to 2.  Does that sound accurate to you Jaroslav?

Comment 8 Kevin Kofler 2019-09-05 20:04:10 UTC
(In reply to Jaroslav Mracek from comment #6)
> The behavior of YUM was incorrect. YUM always considered only latest
> packages for transaction, the older packages were completely ignored
> therefore YUM was unable to handle many situations.

That behavior complied to user expectations and allowed resolving issues with broken Obsoletes. How would you fix an unwanted entirely unversioned Obsoletes with your approach? There is just no way to fix it then.

You may consider the DNF/libsolv behavior as "correct" under some formal definition, but it does NOT fulfill user expectations, so I consider it wrong. And I am really fed up of unhelpful behavior constantly being dismissed as "not a bug, works by design" (see also bug #1699672, which makes weak dependencies essentially useless).

> DNF uses libsolv as a solver that consider all possibilities, therefore dnf
> is capable to resolve transaction that YUM was unable to.

But DNF is not capable of resolving this transaction that YUM would have been able to. At least not without falsely complaining about "broken" dependencies, which are not broken.

> The situation here is based on packaging error that could be resolved by:
> 
> 1. To overcome the issue it requires release of liberation-narrow-fonts with
> version 1:2.0.0 or higher.
> 
> 2. Return the obsolete in liberation-fonts to keep upgrade path.

2 would be completely wrong behavior. liberation-fonts does NOT replace liberation-narrow-fonts, and liberation-narrow-fonts is specifically packaged as a separate package to provide that font. And at least WINE actually wants that font, it seems (which is why people are now seeing the "broken" dependencies without explicitly having installed liberation-narrow-fonts).

1 is doable, but very ugly, and it would not be possible if the Obsoletes had been entirely unversioned.

I insist: a solution in DNF is needed.

Comment 9 Kevin Kofler 2019-09-05 20:43:03 UTC
The point is, the Obsoletes in liberation-fonts in @fedora was completely bogus and there ought to be a safe way to withdraw it in an update. With DNF's current behavior, we are stuck.

Comment 10 Jens Petersen 2019-09-06 03:18:15 UTC
Note updates for liberation-narrow-fonts have been pushed to testing.

Feel free to move this to dnf (etc) if you wish or open a new RFE.

Comment 11 Zbigniew Jędrzejewski-Szmek 2019-09-16 06:24:06 UTC
(In reply to Jaroslav Mracek from comment #6)
> The behavior of YUM was incorrect. YUM always considered only latest
> packages for transaction, the older packages were completely ignored
> therefore YUM was unable to handle many situations.
> DNF uses libsolv as a solver that consider all possibilities, therefore dnf
> is capable to resolve transaction that YUM was unable to.

After reading this, I still don't understand *why* dnf takes into account
the Obsoletes from a removed package. If instead of Obsoletes, the old removed
package had Provides:foo, and an installed package had Requires:foo, dnf would
consider this an unsatisfied dependency. Similarly, if we have foo-1.0, and
bar-1.0 with Requires foo=1.0, and we upgrade to foo-1.1 and bar-1.1 with
Requires foo=1.1, this is OK. We go from one consistent state to another
consistent state.

Comment 12 vishalvvr 2020-04-07 06:37:12 UTC
This bug is already fixed in liberation-fonts-2.00.5-6.fc31. 
Hence closing this bug, feel free to reopen if the problem persists.


Note You need to log in before you can comment on or make changes to this bug.