sys-kernel/dracut: use pkg-config at runtime for systemd
authorMike Gilbert <floppym@gentoo.org>
Wed, 3 May 2017 19:32:32 +0000 (15:32 -0400)
committerMike Gilbert <floppym@gentoo.org>
Mon, 29 May 2017 17:28:42 +0000 (13:28 -0400)
sys-apps/systemd may be moving from /usr/lib/systemd to /lib/systemd
in a future release. dracut will automatically call pkg-config at run
time if these paths are not in the config file.

Package-Manager: Portage-2.3.5_p31, Repoman-2.3.2_p61

sys-kernel/dracut/dracut-044-r3.ebuild [moved from sys-kernel/dracut/dracut-044-r2.ebuild with 88% similarity]

similarity index 88%
rename from sys-kernel/dracut/dracut-044-r2.ebuild
rename to sys-kernel/dracut/dracut-044-r3.ebuild
index 89b9eaf1e9e091a619c29f3c19988aa7463adf32..2af888711a723d4bd07cd61c7cea9136711116f5 100644 (file)
@@ -16,7 +16,10 @@ IUSE="debug selinux systemd"
 RESTRICT="test"
 
 CDEPEND="virtual/udev
-       systemd? ( >=sys-apps/systemd-199 )
+       systemd? (
+               >=sys-apps/systemd-199
+               virtual/pkgconfig
+       )
        "
 RDEPEND="${CDEPEND}
        app-arch/cpio
@@ -95,23 +98,7 @@ src_prepare() {
        sed -r -e "s|^(udevdir=).*$|\1${udevdir}|" \
                        -i "${S}/dracut.conf.d/gentoo.conf.example" || die
 
-       if use systemd; then
-               local systemdutildir="$(systemd_get_utildir)"
-               local systemdsystemunitdir="$(systemd_get_systemunitdir)"
-               local systemdsystemconfdir="$("$(tc-getPKG_CONFIG)" systemd \
-                       --variable=systemdsystemconfdir)"
-               [[ ${systemdsystemconfdir} ]] \
-                       || systemdsystemconfdir=/etc/systemd/system
-               einfo "Setting systemdutildir to ${systemdutildir} and ..."
-               sed -e "5asystemdutildir=\"${systemdutildir}\"" \
-                       -i "${S}/dracut.conf.d/gentoo.conf.example" || die
-               einfo "Setting systemdsystemunitdir to ${systemdsystemunitdir} and..."
-               sed -e "6asystemdsystemunitdir=\"${systemdsystemunitdir}\"" \
-                       -i "${S}/dracut.conf.d/gentoo.conf.example" || die
-               einfo "Setting systemdsystemconfdir to ${systemdsystemconfdir}..."
-               sed -e "7asystemdsystemconfdir=\"${systemdsystemconfdir}\"" \
-                       -i "${S}/dracut.conf.d/gentoo.conf.example" || die
-       else
+       if ! use systemd; then
                local systemdutildir="/lib/systemd"
                einfo "Setting systemdutildir for standalone udev to" \
                        "${systemdutildir}..."