Bug 1685183

Summary: Incorrect Obsoletes: confusingly ignored by dnf
Product: [Fedora] Fedora Reporter: Dominik 'Rathann' Mierzejewski <dominik>
Component: openbabelAssignee: Petr Pisar <ppisar>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 30CC: dmach, dominik, itamar, jmracek, jrohel, mblaha, mhatina, packaging-team-maint, pkratoch, ppisar, rpm-software-management, susi.lehtola, vmukhame
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openbabel-2.4.1-23.fc31 openbabel-2.4.1-22.fc30 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-28 16:33:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dominik 'Rathann' Mierzejewski 2019-03-04 14:40:33 UTC
Description of problem:
dnf completely ignores the Obsoletes: tag.

Version-Release number of selected component (if applicable):
dnf-4.1.0-1.fc30.noarch

How reproducible:
Always.

Steps to Reproduce:
1. Install python2-openbabel-2.4.1-20.fc30
2. Fetch 2.4.1-21 build from https://koji.fedoraproject.org/koji/taskinfo?taskID=33156130
3. dnf --obsoletes install ./openbabel-libs-2.4.1-21.fc30.x86_64.rpm ./python3-openbabel-2.4.1-21.fc30.x86_64.rpm

Actual results:
Error: 
 Problem: problem with installed package python2-openbabel-2.4.1-20.fc30.x86_64
  - package python2-openbabel-2.4.1-20.fc30.x86_64 requires openbabel-libs(x86-64) = 2.4.1-20.fc30, but none of the providers can be installed
  - cannot install both openbabel-libs-2.4.1-21.fc30.x86_64 and openbabel-libs-2.4.1-20.fc30.x86_64
  - conflicting requests
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages)

Expected results:
openbabel-libs and python3-openbabel get installed and python2-openbabel gets removed.

Comment 1 Jaroslav Mracek 2019-03-12 09:25:23 UTC
We tried to investigate the issue and we found that the problem is in python3-openbabel. The package use incorrect obsolete: "python2-openbabel(x86-64) < 2.4.1-21". Only packages can be obsoleted but "python2-openbabel(x86-64)" is provide of "python2-openbabel" package. The correct statement should be like: Obsoletes: "python2-openbabel < 2.4.1-21". Please can you solve the issue in openbabel?

Comment 2 Dominik 'Rathann' Mierzejewski 2019-03-12 11:02:12 UTC
Interesting. Indeed it's even documented: https://docs.fedoraproject.org/en-US/packaging-guidelines/#renaming-or-replacing-existing-packages although that page doesn't point out that only Obsoleting of the original package NAME will work. Thanks for the investigation, I'll fix it in the openbabel package.

Comment 3 Petr Pisar 2019-06-18 14:21:18 UTC
The bogus Obsoletes is actually a hard rpm-build error now and causes openbabel to fail to build:

Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target aarch64 --nodeps /builddir/build/SPECS/openbabel.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False
BUILDSTDERR: sh: perl: command not found
BUILDSTDERR: sh: /usr/bin/perl: No such file or directory
BUILDSTDERR: error: line 122: Illegal char ')' (0x29) in: Obsoletes: python2-openbabel(aarch-64) < 2.4.1-21
BUILDSTDERR: error: line 122: Only package names are allowed in Obsoletes: Obsoletes: python2-openbabel(aarch-64) < 2.4.1-21

Comment 4 Fedora Update System 2019-06-19 04:52:57 UTC
FEDORA-2019-5a6c73c637 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-5a6c73c637

Comment 5 Fedora Update System 2019-06-20 00:49:09 UTC
openbabel-2.4.1-22.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-5a6c73c637

Comment 6 Fedora Update System 2019-06-28 16:33:32 UTC
openbabel-2.4.1-22.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.