Bug 16210

Summary: urpmi --buildrequires considers the src.rpm to provide what is required
Product: Mageia Reporter: Pascal Terjan <pterjan>
Component: RPM PackagesAssignee: Thierry Vignaud <thierry.vignaud>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: Normal    
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: urpmi CVE:
Status comment:

Description Pascal Terjan 2015-06-25 18:42:31 CEST
$ sudo urpmi --debug --buildrequires /ssd/co/cauldron/sbt/SRPMS/sbt-0.13.1-2.mga6.src.rpm
getting lock on urpmi
parsing: /etc/urpmi/mediacfg.d/Devel-4-x86_64
parsing: /etc/urpmi/mediacfg.d/Devel-5-beta3-x86_64
parsing: /etc/urpmi/mediacfg.d/Official-4-x86_64
examining synthesis file [/var/lib/urpmi/Core Release2/synthesis.hdlist.cz]
examining synthesis file [/var/lib/urpmi/Nonfree Release2/synthesis.hdlist.cz]
examining synthesis file [/distrib/cauldron/x86_64/media/core/release/media_info/synthesis.hdlist.cz]
examining synthesis file [/distrib/cauldron/x86_64/media/debug/core/release/media_info/synthesis.hdlist.cz]
examining synthesis file [/distrib/cauldron/x86_64/media/core/updates/media_info/synthesis.hdlist.cz]
examining synthesis file [/distrib/cauldron/x86_64/media/debug/tainted/release/media_info/synthesis.hdlist.cz]
examining synthesis file [/distrib/cauldron/i586/media/core/release/media_info/synthesis.hdlist.cz]
examining synthesis file [/distrib/cauldron/i586/media/core/updates/media_info/synthesis.hdlist.cz]
examining synthesis file [/var/lib/urpmi/SRPMS/synthesis.hdlist.cz]
examining synthesis file [/var/lib/urpmi/google-talkplugin/synthesis.hdlist.cz]
examining synthesis file [/var/lib/urpmi/google-chrome/synthesis.hdlist.cz]
getting exclusive lock on rpm
opening rpmdb (root=, write=)
selecting sbt-0.13.1-2.mga6.src
sbt is not in potential orphans
opening rpmdb (root=, write=)
getting graph of dependencies for sorting
sorting graph of dependencies
rpms sorted by dependencies:
sbt
selecting sbt-0.13.1-2.mga6.src
transaction valid: remove= update=sbt
scheduled sets of transactions:
remove=0= update=1=sbt


verifying signature of /ssd/co/cauldron/sbt/SRPMS/sbt-0.13.1-2.mga6.src.rpm
SECURITY: The following package is _NOT_ signed (OK ((none))): /ssd/co/cauldron/sbt/SRPMS/sbt-0.13.1-2.mga6.src.rpm
starting installing packages
opening rpmdb (root=, write=1)
created transaction for installing on / (remove=0, install=0, upgrade=0)
unlocking urpmi database
unlocking rpm database
EXITING (pid=20271)


Reproducible: 

Steps to Reproduce:
Comment 1 Pascal Terjan 2015-06-25 18:44:41 CEST
hmm rpm too accepts it.

$ rpm -qp --requires /ssd/co/cauldron/sbt/SRPMS/sbt-0.13.1-2.mga6.src.rpm | grep sbt
sbt = 0.13.1

$ rpm -ivh /ssd/co/cauldron/sbt/SRPMS/sbt-0.13.1-2.mga6.src.rpm
Updating / installing...
   1:sbt-0.13.1-2.mga6                ################################# [100%]

$ bm -l 
creating package list
processing package sbt-%{sbt_version}-%mkrel %{rel}
building source and binary packages
error: Failed build dependencies:
	sbt = 0.13.1 is needed by sbt-0.13.1-2.mga6.noarch
error: failed!
Comment 2 Pascal Terjan 2015-06-25 18:53:02 CEST
Also, installing from the spec works:

$ sudo urpmi --buildrequires SPECS/sbt.spec
To satisfy dependencies, the following package is going to be installed:
  Package                        Version      Release       Arch    
(medium "Core Release")
  sbt                            0.13.1       1.mga6        noarch  
16MB of additional disk space will be used.
7.8MB of packages will be retrieved.
Proceed with the installation of one package? (Y/n)
Comment 3 Thierry Vignaud 2015-08-31 13:13:16 CEST
That's requires on name, name being satisfied by both SRPM & binary RPM

The solution here is to add some specific provides. eg:
BuildRequires: sbt-runtime
Provides: sbt-runtime

Status: NEW => RESOLVED
Resolution: (none) => WONTFIX

Comment 4 Pascal Terjan 2015-08-31 20:48:00 CEST
I don't agree.
The src.rpm is not to be installed so what it provides should not matter when running urpmi --buildrequires. I wouldn't expect a different behaviour from running it on the spec.