systemd.bbclass: get the correct /lib directory
authorSaul Wold <sgw@linux.intel.com>
Tue, 10 Sep 2013 17:28:14 +0000 (10:28 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 10 Sep 2013 22:15:16 +0000 (23:15 +0100)
By using os.path.dirname(systemd_unitdir) we get the correct /lib directory instead of
dealing with possibly multilib directories.  This address a QA Error for shipped/not
installed /lib with multilib and x32.

(From OE-Core rev: 5b451a46550ba62e2fbfe5dbe50723b34a4fd527)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/systemd.bbclass

index 8ec4992..eab8735 100644 (file)
@@ -168,9 +168,9 @@ python rm_systemd_unitdir (){
         systemd_unitdir = oe.path.join(d.getVar("D", True), d.getVar('systemd_unitdir', True))
         if os.path.exists(systemd_unitdir):
             shutil.rmtree(systemd_unitdir)
-        base_libdir = oe.path.join(d.getVar("D", True), d.getVar('base_libdir', True))
-        if (os.path.exists(base_libdir) and not os.listdir(base_libdir)):
-            os.rmdir(base_libdir)
+        systemd_libdir = os.path.dirname(systemd_unitdir)
+        if (os.path.exists(systemd_libdir) and not os.listdir(systemd_libdir)):
+            os.rmdir(systemd_libdir)
 }
 do_install[postfuncs] += "rm_systemd_unitdir "