Patchwork [meta-oe,RFC,23/27] networkmanager: inherit systemd / added NetworkManager-wait-online.service / remove unneeded systemd code

login
register
mail settings
Submitter Andreas Müller
Date Feb. 7, 2012, 3:12 p.m.
Message ID <1328627573-5217-24-git-send-email-schnitzeltony@googlemail.com>
Download mbox | patch
Permalink /patch/20849/
State Rejected
Headers show

Comments

Andreas Müller - Feb. 7, 2012, 3:12 p.m.
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
 .../networkmanager/networkmanager_0.9.2.0.bb       |   26 ++++---------------
 1 files changed, 6 insertions(+), 20 deletions(-)

Patch

diff --git a/meta-oe/recipes-connectivity/networkmanager/networkmanager_0.9.2.0.bb b/meta-oe/recipes-connectivity/networkmanager/networkmanager_0.9.2.0.bb
index 1dcc3cf..02b5664 100644
--- a/meta-oe/recipes-connectivity/networkmanager/networkmanager_0.9.2.0.bb
+++ b/meta-oe/recipes-connectivity/networkmanager/networkmanager_0.9.2.0.bb
@@ -4,10 +4,10 @@  SECTION = "net/misc"
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=cbbffd568227ada506640fe950a4823b"
 
-PR = "r2"
+PR = "r3"
 
-DEPENDS = "systemd libnl dbus dbus-glib udev wireless-tools polkit gnutls util-linux ppp"
-inherit gnome gettext
+DEPENDS = "libnl dbus dbus-glib udev wireless-tools polkit gnutls util-linux ppp ${@base_conditional('INIT_MANAGER', 'systemd', 'systemd', '', d)}"
+inherit gnome gettext systemd
 
 SRC_URI = "${GNOME_MIRROR}/NetworkManager/${@gnome_verdir("${PV}")}/NetworkManager-${PV}.tar.bz2 \
     file://0001-don-t-try-to-run-sbin-dhclient-to-get-the-version-nu.patch \
@@ -27,6 +27,9 @@  EXTRA_OECONF = " \
         --with-iptables=${sbindir}/iptables \
 "
 
+SYSTEMD_PACKAGES = "${PN}-systemd"
+SYSTEMD_SERVICE_${PN}-systemd = "NetworkManager.service NetworkManager-wait-online.service"
+
 do_configure_prepend() {
     cp ${WORKDIR}/gtk-doc.make ${S}/
     echo "EXTRA_DIST = version.xml" > gnome-doc-utils.make
@@ -70,7 +73,6 @@  FILES_${PN} += " \
 		${datadir}/polkit-1 \
 		${datadir}/dbus-1 \
 		${base_libdir}/udev/* \
-        ${base_libdir}/systemd \
 "
 
 RRECOMMENDS_${PN} += "iptables"
@@ -96,20 +98,4 @@  FILES_${PN}-tests = "${bindir}/nm-tool \
                      ${bindir}/nm-testdevices"
 
 
-pkg_postinst_${PN}() {
-    # can't do this offline
-    if [ "x$D" != "x" ]; then
-        exit 1
-    fi
-    
-    systemctl enable NetworkManager.service
-}
-
-pkg_prerm_${PN}() {
-    # can't do this offline
-    if [ "x$D" != "x" ]; then
-        exit 1
-    fi
 
-    systemctl disable NetworkManager.service
-}