Check for missing deps on bootstrap target for Centos and Fedora. 98/5798/3
authorThomas F Herbert <therbert@redhat.com>
Mon, 20 Mar 2017 23:19:51 +0000 (19:19 -0400)
committerDamjan Marion <dmarion.lists@gmail.com>
Mon, 27 Mar 2017 15:00:57 +0000 (15:00 +0000)
Change-Id: I823a066417fb6205d1e6b0fdf1de17b054f6d312
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
Makefile

index ac571a6..bdf20e8 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -143,6 +143,21 @@ ifeq ($(OS_ID),ubuntu)
          exit 1 ; \
        fi ; \
        exit 0
+else ifneq ("$(wildcard /etc/redhat-release)","")
+       @for i in $(RPM_DEPENDS) $(EPEL_DEPENDS) ; do \
+           RPM=$$(basename -s .rpm "$${i##*/}" | cut -d- -f1,2,3)  ;   \
+           if [[ "$$RPM" =~ "epel-release-latest" ]] ; then            \
+               MISSING+=$$(rpm -q epel-release | grep "^package") ;    \
+           else                                                        \
+               MISSING+=$$(rpm -q $$RPM | grep "^package")        ;    \
+           fi                                                     ;    \
+       done                                                       ;    \
+       if [ -n "$$MISSING" ] ; then \
+         echo "Please install missing RPMs: \n$$MISSING\n" ; \
+         echo "by executing \"make install-dep\"\n" ; \
+         exit 1 ; \
+       fi ; \
+       exit 0
 endif
        @echo "SOURCE_PATH = $(WS_ROOT)"                   > $(BR)/build-config.mk
        @echo "#!/bin/bash\n"                              > $(BR)/path_setup