commit:     621a5d73183812dbf43da10b2e8884c4087cff73
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Wed May 17 19:14:55 2017 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Wed May 17 19:15:02 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=621a5d73

sys-apps/systemd: rework pkg_pretend

Move all kernel logic behind the MERGE_TYPE check.
Only check DMIID on X86.

Bug: https://bugs.gentoo.org/618750
Package-Manager: Portage-2.3.5_p32, Repoman-2.3.2_p62

 sys-apps/systemd/systemd-233-r1.ebuild | 39 ++++++++++++++++++----------------
 sys-apps/systemd/systemd-9999.ebuild   | 39 ++++++++++++++++++----------------
 2 files changed, 42 insertions(+), 36 deletions(-)

diff --git a/sys-apps/systemd/systemd-233-r1.ebuild 
b/sys-apps/systemd/systemd-233-r1.ebuild
index a0d34d1835f..c307e925041 100644
--- a/sys-apps/systemd/systemd-233-r1.ebuild
+++ b/sys-apps/systemd/systemd-233-r1.ebuild
@@ -106,28 +106,31 @@ python_check_deps() {
 }
 
 pkg_pretend() {
-       local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS
-               ~CHECKPOINT_RESTORE ~DEVTMPFS ~DMIID ~EPOLL ~FANOTIFY ~FHANDLE
-               ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS
-               ~TIMERFD ~TMPFS_XATTR ~UNIX
-               ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH
-               ~!FW_LOADER_USER_HELPER ~!GRKERNSEC_PROC ~!IDE 
~!SYSFS_DEPRECATED
-               ~!SYSFS_DEPRECATED_V2"
-
-       use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL"
-       use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER"
-       kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG"
-       kernel_is -lt 4 7 && CONFIG_CHECK+=" ~DEVPTS_MULTIPLE_INSTANCES"
-
-       if linux_config_exists; then
-               local uevent_helper_path=$(linux_chkconfig_string 
UEVENT_HELPER_PATH)
-                       if [ -n "${uevent_helper_path}" ] && [ 
"${uevent_helper_path}" != '""' ]; then
+       if [[ ${MERGE_TYPE} != buildonly ]]; then
+               local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS
+                       ~CHECKPOINT_RESTORE ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE
+                       ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD 
~SYSFS
+                       ~TIMERFD ~TMPFS_XATTR ~UNIX
+                       ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH
+                       ~!FW_LOADER_USER_HELPER ~!GRKERNSEC_PROC ~!IDE 
~!SYSFS_DEPRECATED
+                       ~!SYSFS_DEPRECATED_V2"
+
+               use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL"
+               use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER"
+               kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG"
+               kernel_is -lt 4 7 && CONFIG_CHECK+=" ~DEVPTS_MULTIPLE_INSTANCES"
+
+               if linux_config_exists; then
+                       local uevent_helper_path=$(linux_chkconfig_string 
UEVENT_HELPER_PATH)
+                       if [[ -n ${uevent_helper_path} ]] && [[ 
${uevent_helper_path} != '""' ]]; then
                                ewarn "It's recommended to set an empty value 
to the following kernel config option:"
                                ewarn 
"CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
                        fi
-       fi
+                       if linux_chkconfig_present X86; then
+                               CONFIG_CHECK+=" ~DMIID"
+                       fi
+               fi
 
-       if [[ ${MERGE_TYPE} != buildonly ]]; then
                if kernel_is -lt ${MINKV//./ }; then
                        ewarn "Kernel version at least ${MINKV} required"
                fi

diff --git a/sys-apps/systemd/systemd-9999.ebuild 
b/sys-apps/systemd/systemd-9999.ebuild
index d2b4c84ad63..e384f59919a 100644
--- a/sys-apps/systemd/systemd-9999.ebuild
+++ b/sys-apps/systemd/systemd-9999.ebuild
@@ -106,28 +106,31 @@ DEPEND="${COMMON_DEPEND}
 "
 
 pkg_pretend() {
-       local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS
-               ~CHECKPOINT_RESTORE ~DEVTMPFS ~DMIID ~EPOLL ~FANOTIFY ~FHANDLE
-               ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS
-               ~TIMERFD ~TMPFS_XATTR ~UNIX
-               ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH
-               ~!FW_LOADER_USER_HELPER ~!GRKERNSEC_PROC ~!IDE 
~!SYSFS_DEPRECATED
-               ~!SYSFS_DEPRECATED_V2"
-
-       use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL"
-       use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER"
-       kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG"
-       kernel_is -lt 4 7 && CONFIG_CHECK+=" ~DEVPTS_MULTIPLE_INSTANCES"
-
-       if linux_config_exists; then
-               local uevent_helper_path=$(linux_chkconfig_string 
UEVENT_HELPER_PATH)
-                       if [ -n "${uevent_helper_path}" ] && [ 
"${uevent_helper_path}" != '""' ]; then
+       if [[ ${MERGE_TYPE} != buildonly ]]; then
+               local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS
+                       ~CHECKPOINT_RESTORE ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE
+                       ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD 
~SYSFS
+                       ~TIMERFD ~TMPFS_XATTR ~UNIX
+                       ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH
+                       ~!FW_LOADER_USER_HELPER ~!GRKERNSEC_PROC ~!IDE 
~!SYSFS_DEPRECATED
+                       ~!SYSFS_DEPRECATED_V2"
+
+               use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL"
+               use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER"
+               kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG"
+               kernel_is -lt 4 7 && CONFIG_CHECK+=" ~DEVPTS_MULTIPLE_INSTANCES"
+
+               if linux_config_exists; then
+                       local uevent_helper_path=$(linux_chkconfig_string 
UEVENT_HELPER_PATH)
+                       if [[ -n ${uevent_helper_path} ]] && [[ 
${uevent_helper_path} != '""' ]]; then
                                ewarn "It's recommended to set an empty value 
to the following kernel config option:"
                                ewarn 
"CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
                        fi
-       fi
+                       if linux_chkconfig_present X86; then
+                               CONFIG_CHECK+=" ~DMIID"
+                       fi
+               fi
 
-       if [[ ${MERGE_TYPE} != buildonly ]]; then
                if kernel_is -lt ${MINKV//./ }; then
                        ewarn "Kernel version at least ${MINKV} required"
                fi

Reply via email to