Policy for Requires in spec files supporting optional features

Tim Jackson lists at timj.co.uk
Mon Jan 9 22:03:34 UTC 2006


On Mon, January 9, 2006 6:36 pm, Ville Skyttä said:

> On Mon, 2006-01-09 at 18:13 +0000, Tim Jackson wrote:
>> I believe that some other packaging systems have a
>> way of specifying "suggested dependencies", which is what's needed here,
>> but RPM doesn't (unless I'm missing something).
> It does in >= 4.4 (Suggests:, Enhances:, Requires(missingok), maybe
> others (and maybe I don't remember the names accurately)) but I'm not
> aware of any frontends which would support that functionality.  Not sure
> about plain rpm CLI.

Wow. That one missed me (and others, by the sound of it). Interesting.

Unfortunately it seems pretty useless right now, at least on FC4:

Name: test
Suggests: test2
$ rpmbuild -ba newpackage.spec
error: line 9: Unknown tag: Suggests: test2


Name: test
Enhances: test2
$ rpmbuild -ba newpackage.spec
error: line 9: Unknown tag: Enhances: test2

Name: test
Requires(missingok): test2
[rpmbuild is OK]

# rpm -q yum
yum-2.4.1-1.fc4
# rpm -q rpm
rpm-4.4.1-22

# rpm -ivh test-1-1.i386.rpm
error: Failed dependencies:
        test2 is needed by test-1-1.i386
# yum localinstall test-1-1.i386.rpm
Setting up Local Package Process
Examining test-1-1.i386.rpm: test - 1-1.i386
Marking test-1-1.i386.rpm to be installed
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package test.i386 0:1-1 set to be updated
--> Running transaction check
Setting up repositories
Reading repository metadata in from local files
--> Processing Dependency: test2 for package: test
--> Finished Dependency Resolution
Error: Missing Dependency: test2 is needed by package test


So, at least for the time being, would the best thing be to just make all
the "optional" deps Requires as long as they don't cause ridiculous dep
bloat? That's certainly my inclination.

Tim




More information about the fedora-extras-list mailing list