[DellEMC] Dell Platform Modules Debian Build Error Fix (#4108)
- Fix for Azure/sonic-buildimage#4095 - Exit status from failed make command(action) didnt reached parent target because the make command is inside the "for" loop. - Only the exit status of the last command in the last iteration of the for loop is read by parent target. - This is the reason why dpkg-buildpackage ignored the make error. - Fixed the issue with help of "set -e".
This commit is contained in:
parent
9c73df9cda
commit
57d4c841db
@ -12,6 +12,7 @@ COMMON_DIR := common
|
|||||||
dh $@
|
dh $@
|
||||||
|
|
||||||
override_dh_auto_build:
|
override_dh_auto_build:
|
||||||
|
set -e; \
|
||||||
(for mod in $(MODULE_DIRS); do \
|
(for mod in $(MODULE_DIRS); do \
|
||||||
if [ $$mod = "s6100" ]; then \
|
if [ $$mod = "s6100" ]; then \
|
||||||
cp $(COMMON_DIR)/dell_pmc.c $(MOD_SRC_DIR)/$${mod}/modules/dell_s6100_lpc.c; \
|
cp $(COMMON_DIR)/dell_pmc.c $(MOD_SRC_DIR)/$${mod}/modules/dell_s6100_lpc.c; \
|
||||||
@ -37,9 +38,11 @@ override_dh_auto_build:
|
|||||||
fi; \
|
fi; \
|
||||||
echo "making man page alias $$mod -> $$mod APIs";\
|
echo "making man page alias $$mod -> $$mod APIs";\
|
||||||
make -C $(KERNEL_SRC)/build M=$(MOD_SRC_DIR)/$${mod}/modules; \
|
make -C $(KERNEL_SRC)/build M=$(MOD_SRC_DIR)/$${mod}/modules; \
|
||||||
done)
|
done); \
|
||||||
|
set +e
|
||||||
|
|
||||||
override_dh_auto_install:
|
override_dh_auto_install:
|
||||||
|
set -e; \
|
||||||
(for mod in $(MODULE_DIRS); do \
|
(for mod in $(MODULE_DIRS); do \
|
||||||
dh_installdirs -pplatform-modules-$${mod} \
|
dh_installdirs -pplatform-modules-$${mod} \
|
||||||
$(KERNEL_SRC)/$(INSTALL_MOD_DIR); \
|
$(KERNEL_SRC)/$(INSTALL_MOD_DIR); \
|
||||||
@ -49,12 +52,14 @@ override_dh_auto_install:
|
|||||||
dh_installdirs -pplatform-modules-$${mod} usr/local/bin ; \
|
dh_installdirs -pplatform-modules-$${mod} usr/local/bin ; \
|
||||||
cp -r $(MOD_SRC_DIR)/$${mod}/scripts/* debian/platform-modules-$${mod}/usr/local/bin; \
|
cp -r $(MOD_SRC_DIR)/$${mod}/scripts/* debian/platform-modules-$${mod}/usr/local/bin; \
|
||||||
fi; \
|
fi; \
|
||||||
done)
|
done); \
|
||||||
|
set +e
|
||||||
|
|
||||||
override_dh_usrlocal:
|
override_dh_usrlocal:
|
||||||
|
|
||||||
override_dh_clean:
|
override_dh_clean:
|
||||||
dh_clean
|
dh_clean
|
||||||
|
set -e; \
|
||||||
(for mod in $(MODULE_DIRS); do \
|
(for mod in $(MODULE_DIRS); do \
|
||||||
if [ $$mod = "s6100" ]; then \
|
if [ $$mod = "s6100" ]; then \
|
||||||
rm -f $(MOD_SRC_DIR)/$${mod}/modules/dell_s6100_lpc.c; \
|
rm -f $(MOD_SRC_DIR)/$${mod}/modules/dell_s6100_lpc.c; \
|
||||||
@ -79,5 +84,6 @@ override_dh_clean:
|
|||||||
rm -rf $(MOD_SRC_DIR)/$${mod}/build/*.egg-info; \
|
rm -rf $(MOD_SRC_DIR)/$${mod}/build/*.egg-info; \
|
||||||
fi; \
|
fi; \
|
||||||
make -C $(KERNEL_SRC)/build M=$(MOD_SRC_DIR)/$${mod}/modules clean; \
|
make -C $(KERNEL_SRC)/build M=$(MOD_SRC_DIR)/$${mod}/modules clean; \
|
||||||
done)
|
done); \
|
||||||
|
set +e
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user