Bug 1543449 - 'dnf check --dependencies' incorrectly reports missing requires
Summary: 'dnf check --dependencies' incorrectly reports missing requires
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 30
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: amatej
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-08 13:31 UTC by Eva Mrakova
Modified: 2020-05-11 11:53 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-11 11:53:14 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
testpkg.spec (642 bytes, text/plain)
2019-06-28 10:25 UTC, Eva Mrakova
no flags Details

Description Eva Mrakova 2018-02-08 13:31:16 UTC
Description of problem:
when an installed package has Requires(pre/post/preun/postun) needed for
scriptlets and these required packages are removed, 'dnf check --dependencies'
incorrectly reports missing requires for the package.

Similar bug 1099195 has been reported for yum in the past.

Version-Release number of selected component (if applicable):
dnf-2.7.5-2.fc27.noarch

How reproducible:
always

Steps to Reproduce:
1. create a package (e.g. testpkg) with Requires(pre) and Requires(post) 
   (e.g. testpkg_pre and testpkg_post)
2. install the package
3. remove its pre and post requires
4. run 'dnf check --dependencies'

Actual results:
# dnf check --dependencies
testpkg-1.0-1.noarch has missing requires of testpkg_post
testpkg-1.0-1.noarch has missing requires of testpkg_pre
Error: Check discovered 2 problem(s)

Expected results:
no reported problems

Additional info:
/CoreOS/yum/Sanity/proper-handling-of-weak-dependencies can be used as a reproducer

Comment 1 Ben Cotton 2018-11-27 14:18:44 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora  'version' of '27'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 2 Ben Cotton 2019-02-19 17:11:25 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 30 development cycle.
Changing version to '30.

Comment 3 Jaroslav Mracek 2019-06-28 09:58:23 UTC
Please could you provide packages for step 1:
1. create a package (e.g. testpkg) with Requires(pre) and Requires(post) 
   (e.g. testpkg_pre and testpkg_post)

Thanks a lot

Comment 4 Eva Mrakova 2019-06-28 10:25:20 UTC
Created attachment 1585523 [details]
testpkg.spec

Comment 5 Eva Mrakova 2019-06-28 10:36:04 UTC
(In reply to Jaroslav Mracek from comment #3)

testpkg.spec has been attached. I've tested on rhel8 that .rpm can be easily built from it.
For the testing, you will also need dummy packages testpkgpre, testpkgpost, testpkgpreun, 
testpkgpostun (just to satisfy testpkg's requires). They have to be installed before testpkg 
is installed.

Comment 6 Jaroslav Mracek 2019-06-28 10:44:47 UTC
Thanks a lot Eva

Comment 8 Ben Cotton 2020-04-30 20:22:56 UTC
This message is a reminder that Fedora 30 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 30 on 2020-05-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '30'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 30 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 9 amatej 2020-05-11 11:53:14 UTC
This is fixed in fedora >= 31


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