@@ -648,7 +648,7 @@ $(addprefix $(FILES_PATH)/, $(SONIC_MAKE_FILES)) : $(FILES_PATH)/% : .platform $
648
648
# Remove target to force rebuild
649
649
rm -f $(addprefix $(FILES_PATH)/, $*)
650
650
# Apply series of patches if exist
651
- if [ -f $($*_SRC_PATH).patch/series ]; then pushd $($*_SRC_PATH) && quilt applied || QUILT_PATCHES=../$(notdir $($*_SRC_PATH)).patch quilt push -a; popd; fi $(LOG)
651
+ if [ -f $($*_SRC_PATH).patch/series ]; then pushd $($*_SRC_PATH) && ( quilt pop -a -f 1>/dev/null 2>&1 || true ) && QUILT_PATCHES=../$(notdir $($*_SRC_PATH)).patch quilt push -a; popd; fi $(LOG)
652
652
# Build project and take package
653
653
make DEST=$(shell pwd)/$(FILES_PATH) -C $($*_SRC_PATH) $(shell pwd)/$(FILES_PATH)/$* $(LOG)
654
654
# Clean up
@@ -692,7 +692,7 @@ $(addprefix $(DEBS_PATH)/, $(SONIC_MAKE_DEBS)) : $(DEBS_PATH)/% : .platform $$(a
692
692
# Remove target to force rebuild
693
693
rm -f $(addprefix $(DEBS_PATH)/, $* $($*_DERIVED_DEBS) $($*_EXTRA_DEBS))
694
694
# Apply series of patches if exist
695
- if [ -f $($*_SRC_PATH).patch/series ]; then pushd $($*_SRC_PATH) && quilt applied || QUILT_PATCHES=../$(notdir $($*_SRC_PATH)).patch quilt push -a; popd; fi $(LOG)
695
+ if [ -f $($*_SRC_PATH).patch/series ]; then pushd $($*_SRC_PATH) && ( quilt pop -a -f 1>/dev/null 2>&1 || true ) && QUILT_PATCHES=../$(notdir $($*_SRC_PATH)).patch quilt push -a; popd; fi $(LOG)
696
696
# Build project and take package
697
697
$(SETUP_OVERLAYFS_FOR_DPKG_ADMINDIR)
698
698
DEB_BUILD_OPTIONS="${DEB_BUILD_OPTIONS_GENERIC}" $(ANT_DEB_CONFIG) $(CROSS_COMPILE_FLAGS) make -j$(SONIC_CONFIG_MAKE_JOBS) DEST=$(shell pwd)/$(DEBS_PATH) -C $($*_SRC_PATH) $(shell pwd)/$(DEBS_PATH)/$* $(LOG)
@@ -732,7 +732,7 @@ $(addprefix $(DEBS_PATH)/, $(SONIC_DPKG_DEBS)) : $(DEBS_PATH)/% : .platform $$(a
732
732
# Remove old build logs if they exist
733
733
rm -f $($*_SRC_PATH)/debian/*.debhelper.log
734
734
# Apply series of patches if exist
735
- if [ -f $($*_SRC_PATH).patch/series ]; then pushd $($*_SRC_PATH) && quilt applied || QUILT_PATCHES=../$(notdir $($*_SRC_PATH)).patch quilt push -a; popd; fi $(LOG)
735
+ if [ -f $($*_SRC_PATH).patch/series ]; then pushd $($*_SRC_PATH) && ( quilt pop -a -f 1>/dev/null 2>&1 || true ) && QUILT_PATCHES=../$(notdir $($*_SRC_PATH)).patch quilt push -a; popd; fi $(LOG)
736
736
# Build project
737
737
pushd $($*_SRC_PATH) $(LOG_SIMPLE)
738
738
if [ -f ./autogen.sh ]; then ./autogen.sh $(LOG); fi
@@ -846,7 +846,7 @@ $(addprefix $(PYTHON_DEBS_PATH)/, $(SONIC_PYTHON_STDEB_DEBS)) : $(PYTHON_DEBS_PA
846
846
if [ -z '$($*_CACHE_LOADED)' ] ; then
847
847
848
848
# Apply series of patches if exist
849
- if [ -f $($*_SRC_PATH).patch/series ]; then pushd $($*_SRC_PATH) && quilt applied || QUILT_PATCHES=../$(notdir $($*_SRC_PATH)).patch quilt push -a; popd; fi $(LOG)
849
+ if [ -f $($*_SRC_PATH).patch/series ]; then pushd $($*_SRC_PATH) && ( quilt pop -a -f 1>/dev/null 2>&1 || true ) && QUILT_PATCHES=../$(notdir $($*_SRC_PATH)).patch quilt push -a; popd; fi $(LOG)
850
850
# Build project
851
851
pushd $($*_SRC_PATH) $(LOG_SIMPLE)
852
852
rm -rf deb_dist/* $(LOG)
@@ -886,7 +886,7 @@ $(addprefix $(PYTHON_WHEELS_PATH)/, $(SONIC_PYTHON_WHEELS)) : $(PYTHON_WHEELS_PA
886
886
887
887
pushd $($*_SRC_PATH) $(LOG_SIMPLE)
888
888
# apply series of patches if exist
889
- if [ -f ../$(notdir $($*_SRC_PATH)).patch/series ]; then quilt applied || QUILT_PATCHES=../$(notdir $($*_SRC_PATH)).patch quilt push -a; fi $(LOG)
889
+ if [ -f ../$(notdir $($*_SRC_PATH)).patch/series ]; then ( quilt pop -a -f 1>/dev/null 2>&1 || true ) && QUILT_PATCHES=../$(notdir $($*_SRC_PATH)).patch quilt push -a; fi $(LOG)
890
890
ifneq ($(CROSS_BUILD_ENVIRON ) ,y)
891
891
# Use pip instead of later setup.py to install dependencies into user home, but uninstall self
892
892
pip$($*_PYTHON_VERSION) install . && pip$($*_PYTHON_VERSION) uninstall --yes `python$($*_PYTHON_VERSION) setup.py --name`
@@ -952,7 +952,7 @@ docker-start :
952
952
$(addprefix $(TARGET_PATH ) /, $(SONIC_SIMPLE_DOCKER_IMAGES ) ) : $(TARGET_PATH ) /% .gz : .platform docker-start $$(addsuffix -load,$$(addprefix $(TARGET_PATH ) /,$$($$* .gz_LOAD_DOCKERS) ) )
953
953
$(HEADER )
954
954
# Apply series of patches if exist
955
- if [ -f $( $* .gz_PATH) .patch/series ]; then pushd $( $* .gz_PATH) && quilt applied || QUILT_PATCHES=../$( notdir $( $* .gz_PATH) ) .patch quilt push -a; popd ; fi $(LOG )
955
+ if [ -f $( $* .gz_PATH) .patch/series ]; then pushd $( $* .gz_PATH) && ( quilt pop -a -f 1> /dev/null 2>&1 || true ) && QUILT_PATCHES=../$( notdir $( $* .gz_PATH) ) .patch quilt push -a; popd ; fi $(LOG )
956
956
# Prepare docker build info
957
957
SONIC_ENFORCE_VERSIONS=$(SONIC_ENFORCE_VERSIONS ) \
958
958
TRUSTED_GPG_URLS=$(TRUSTED_GPG_URLS ) \
@@ -1050,7 +1050,7 @@ $(addprefix $(TARGET_PATH)/, $(DOCKER_IMAGES)) : $(TARGET_PATH)/%.gz : .platform
1050
1050
if [ -z '$($*.gz_CACHE_LOADED)' ] ; then
1051
1051
1052
1052
# Apply series of patches if exist
1053
- if [ -f $($*.gz_PATH).patch/series ]; then pushd $($*.gz_PATH) && quilt applied || QUILT_PATCHES=../$(notdir $($*.gz_PATH)).patch quilt push -a; popd; fi $(LOG)
1053
+ if [ -f $($*.gz_PATH).patch/series ]; then pushd $($*.gz_PATH) && ( quilt pop -a -f 1>/dev/null 2>&1 || true ) && QUILT_PATCHES=../$(notdir $($*.gz_PATH)).patch quilt push -a; popd; fi $(LOG)
1054
1054
mkdir -p $($*.gz_PATH)/debs $(LOG)
1055
1055
mkdir -p $($*.gz_PATH)/files $(LOG)
1056
1056
mkdir -p $($*.gz_PATH)/python-debs $(LOG)
0 commit comments