Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 450564 - net-analyzer/net-snmp should not RDEPEND on sys-apps/openrc
Summary: net-analyzer/net-snmp should not RDEPEND on sys-apps/openrc
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2013-01-06 16:31 UTC by Geaaru
Modified: 2014-04-30 23:31 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Ebuild with fix on RDEPEND. (net-snmp-5.7.2.ebuild,4.37 KB, text/plain)
2013-01-06 16:31 UTC, Geaaru
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Geaaru 2013-01-06 16:31:31 UTC
Created attachment 334674 [details]
Ebuild with fix on RDEPEND.

Ebuild of the package net-snmp-5.7.2 require a runtime dependency to openrc that it isn't available if it is installed systemd. So it is needed add an "or" condition to ebuild.
Probably, best solution is create a virtual like sys-apps/init to use on all ebuild that permit to add a dependency generic and not relative to a particular init system.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2013-01-07 03:58:51 UTC
Comment on attachment 334674 [details]
Ebuild with fix on RDEPEND.

--- net-snmp-5.7.2.ebuild       2012-10-20 07:00:03.000000000 +0200
+++ -   2013-01-07 04:58:37.972174189 +0100
@@ -45,7 +45,11 @@
                !minimal? ( dev-perl/TermReadKey )
        )
        selinux? ( sec-policy/selinux-snmp )
-       sys-apps/openrc"
+       || (
+               sys-apps/openrc
+               sys-apps/systemd
+       )
+"
 
 # Dependency on autoconf due to bug #225893
 DEPEND="${COMMON}
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2013-01-07 04:10:01 UTC
I have removed the dependency
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2013-01-07 14:44:28 UTC
The dependency is because we use the new syntax in openrc. I'm no sure if that's a good idea.

Besides, if we have to start making this conditional, we have to look at it as a global policy, as we install the init scripts unconditionally.
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2013-01-07 17:47:22 UTC
(In reply to comment #3)
> The dependency is because we use the new syntax in openrc. I'm no sure if
> that's a good idea.

Depending on one of many init packages is not a good idea, you mean? I whole-heartedly agree with that.

If you insist on forcing everyone to use openrc, wouldn't it be better to depend on !<sys-apps/baselayout-2 in that case?

> Besides, if we have to start making this conditional, we have to look at it
> as a global policy, as we install the init scripts unconditionally.

I don't think the systemd people are after that.
Comment 5 Diego Elio Pettenò (RETIRED) gentoo-dev 2013-01-08 14:36:42 UTC
Quite a few packages are going to get minimum version requirements for sys-apps/openrc soon enough because of tmpfilesd. Do you think we should block instead of just allowing dependencies to be handled correctly?

I disagree that doing either || () or simply dropping openrc dependencies is the correct way to do that.
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2013-01-08 15:04:56 UTC
(In reply to comment #5)
> Quite a few packages are going to get minimum version requirements for
> sys-apps/openrc soon enough because of tmpfilesd. Do you think we should
> block instead of just allowing dependencies to be handled correctly?

Yes, why not block some !<sys-apps/openrc-[version] ? It gives users a choice to not install/use openrc at all.
Comment 7 Geaaru 2013-01-08 15:24:56 UTC
Main problem is that is there a lot of todo for systemd integration (because there are a lot of tools/package that use for example function.sh) and i think that it is correct create a virtual package for init system and then as dependency of systemd could be useful have a systemd-init-tools package that install all shell script that permit to use without patch all others scripts/packages.
For example:
- revdep-rebuild inside setup_color() has a source of the /etc/init.d/function.sh that it isn't available if i removed openrc;
- gcc-config: at begin try to source /etc/init.d/functions.sh and exit if it isn't available

In some cases it only needed comment include of functions.sh but it isn't a fine solution.
Comment 8 Diego Elio Pettenò (RETIRED) gentoo-dev 2013-01-08 15:26:03 UTC
This is the wrong place to discuss revdep-rebuild or anything else.

Also honestly, <QA hat on>I don't really care about an openrc-less system right now</QA hat on>.
Comment 9 Geaaru 2013-01-08 16:46:05 UTC
My comment it isn't relative to problems with revdev-rebuild, etc. but is relative to find a best solution to handle RDEPEND of the net-snmp ebuild. Net-snmp like others packages use standard shell scripts like functions.sh, etc. and probably (i think) is for this that is been added dependency to openrc inside RDEPEND.
Insert systemd in "or" condition is a workaround not a solution like remove dependency to openrc.
Without enter on discussion about support systemd inside Gentoo i think that best solution is use a virtual alias for openrc/init script because:
a) permit in the future to handle environment with both openrc and systemd without a static RDEPEND
b) avoid insert of a particular dependency to a package like systemd that doens't contains files required/used from net-snmp
c) leave open solution about how manage correctly problem with init script without needed in the future editing of net-snmp ebuild.

Only my cent.

Bye
Comment 10 Jeroen Roovers (RETIRED) gentoo-dev 2014-04-30 23:31:21 UTC
(In reply to Diego Elio Pettenò from comment #3)
> The dependency is because we use the new syntax in openrc. I'm no sure if
> that's a good idea.

It isn't clear from the ChangeLog what new syntax necessitated the sys-apps/openrc dependency at the time. I assume the original problem has solved itself, as nobody has complained about the lack of that dependency in over a year.