Red Hat Bugzilla – Bug 1029795
RFE: Allow to call main man page simply
Last modified: 2015-01-29 23:44:20 EST
Description of problem:
We'd like to have a common man page for every Software Collection, which would provide general introduction to the collections, but it should have some specific features:
* should be located under /opt/.. root, so there is no collision with system man pages and we generally want to avoid files located outside /opt
* should be easy to reach -- `scl enable myscl "man myscl"` seems too complicated for anyone who isn't familiar with SCL concept yet; something like `scl man myscl` seems much better.
I'll attach a proof-of-concept patch with a solution above later today.
If we go by "scl man myscl", I would like to see some generic solution, which would allow to have various scriptlets in place of man. I can imagine that "scl run ruby193 -- -v" would be equivalent to "scl enable ruby193 'ruby -v'", or "scl service mariadb55" would start the mariadb daemon.
Created attachment 823377 [details]
proof-of-concept patch to implement `scl man myscl` shortcut
As Vit said, this is probably not the smartest solution from general POV; it's rather hack. I'll try a better one.
Created attachment 823449 [details]
alternative patch that generally allows to use generic actions
(In reply to Vít Ondruch from comment #1)
> If we go by "scl man myscl", I would like to see some generic solution,
> which would allow to have various scriptlets in place of man. I can imagine
> that "scl run ruby193 -- -v" would be equivalent to "scl enable ruby193
> 'ruby -v'", or "scl service mariadb55" would start the mariadb daemon.
I agree and believe we are allowed to afford such a change. What we know about using generic actions other than "enable" right now is probably the only thing what scl(1) says:
"<action> is a script name to execute in a bash environment before the application itself takes in executed. Currently only enable scriptlet is mandatory which is needed to update search paths, etc."
This is really not what scl command does right now and the attached patch is something scl utility should actually do to correspond with such man page description.
Particularly, according to the man page, other actions shouldn't enable SCL environment (X_SCLS is adjusted for every action now; however, we can use scl_source for that generally in other actions' scripts, if we explicitly need it), but should just execute some bash script. In that case it doesn't make sense to enforce a command for such actions, so it should be mandatory only for enable action. Specifying an arbitrary command for other actions could be done by -- separator though.
So what the attached patch does is that it changes usage of other than enable actions as follows:
scl enable <collection1> [<collection2> ...] <command>
scl enable <collection1> [<collection2> ...] -- <command>
scl <action> <collection1> [<collection2> ...]
scl <action> <collection1> [<collection2> ...] -- <command>
I'm aware that this is a change of behaviour, but the behaviour is based on undocumented functionality, so everybody, who's used it, has done it on his own responsibility.
So, in case we want to have something similar in scl-utils 2.0, I guess we can implement something similar in current scl-utils as well.
scl-utils-2.0.1-1.fc21 has been submitted as an update for Fedora 21.
scl-utils-2.0.1-1.fc20 has been submitted as an update for Fedora 20.
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing scl-utils-2.0.1-2.fc21'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
scl-utils-2.0.1-2.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.
scl-utils-2.0.1-2.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.