How do I use "suggests" in home-built rpm

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

How do I use "suggests" in home-built rpm

Postby jaywalker » Aug 7th, '12, 18:05

This one is for any hobbyist packagers out there.

I am playing with a little home-built sound recording "manager" (sounds a bit more sophisticated than "front-end for a command line program") written with Gambas3.

As I continue to bolt on new bits I frequently encounter situations where my chief tester (and only other user) doesn't have stuff on his machine which my program uses.

I have discovered that the built-in Gambas3 rpm creator will readily accept library and font resources (for example) in its "Extra dependencies" form and these are added to the Requires line in the rpm spec file. So far, so absolutley fine and good.

The thing is I would like to be able to suggest that auxiliary, useful programs be installed if they are found to be absent. That is where I hit the snags.

1. I believe that urpmi understands this type of possibly install suggestion
2. I can't find any mention of it in rpm documentation (there was at least one email discussion four or five years ago about possibly adding it to the rpm system)
3. I don't understand how "suggests" works - I only ever see it when using urpmi from the command line and even then, only rarely - How is it managed in rpmdrake?

There's lots more I don't know, but I have embarrassed myself enough for now. Any help will be gratefully received.

Richard
jaywalker
 
Posts: 341
Joined: Nov 17th, '11, 02:38
Location: Belfast, Northern Ireland

Re: How do I use "suggests" in home-built rpm

Postby doktor5000 » Aug 7th, '12, 21:23

Suggests are not conditionally, they will be treated as "soft" requires. I.e. you can install without them, when using --no-suggests option for urpmi.
So they generally get used for auxiliary programs, which are not essetinal for a programs normal operation, or only for additional features.
As rpmdrake internally also only uses urpmi, it is treated the same in both.

If you want to know about the internal rpm mechanics used here, search for the RPMSENSE_MISSINGOK flag and various implementations.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18018
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: How do I use "suggests" in home-built rpm

Postby jaywalker » Aug 7th, '12, 22:19

doktor5000 wrote:Suggests are not conditionally, they will be treated as "soft" requires. I.e. you can install without them, when using --no-suggests option for urpmi.


So, if I have a couple of programs as "suggests" in my spec file then rpmdrake will install them too (if not already present) unless I have a global option set for no-suggests in my urpmi.cfg.

It doesn't behave as a suggestion for this package (no opportunity to decline the suggestion), but as a requirement which, if I knew it were there, I could reject for all packages, but not for just this one, unless I use urpmi --no-suggests. But then, of course, I would have to have pre-knowledge that "suggests" were present in the package and that I didn't want them.

doktor5000 wrote:So they generally get used for auxiliary programs, which are not essetinal for a programs normal operation, or only for additional features.
As rpmdrake internally also only uses urpmi, it is treated the same in both.


So suggests can be useful, but are definitely not the sort of feature a newbie could be expected to be aware of, or expected to use as it requires a certain comfort in using the command line.

I think I will avoid the temptation of using suggests for the auxilliary programs my package can use and just rely on the documentation to advertise their benefit. Seems a shame. It could have been so useful if an accept/decline checkbox could have been presented in rpmdrake for those packages with suggests in their spec files.

Sadly my user/tester is not one of those who feels comfortable in a shell :-(

doktor5000 wrote:If you want to know about the internal rpm mechanics used here, search for the RPMSENSE_MISSINGOK flag and various implementations.


I tried to follow the discussion but I don't yet know enough about rpm and packaging in general to make much sense of it. It certainly looks like I can get some of the answers I need there so I will perservere.

Thanks Doc.

R
jaywalker
 
Posts: 341
Joined: Nov 17th, '11, 02:38
Location: Belfast, Northern Ireland

Re: How do I use "suggests" in home-built rpm

Postby doktor5000 » Aug 8th, '12, 21:33

Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18018
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: How do I use "suggests" in home-built rpm

Postby jaywalker » Aug 8th, '12, 23:32

Wow, that is VERY good news. I will follow it with great interest (and a little too much excitement).

R
jaywalker
 
Posts: 341
Joined: Nov 17th, '11, 02:38
Location: Belfast, Northern Ireland


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest