Skip to content
This repository was archived by the owner on Jan 1, 2025. It is now read-only.

Commit 1f25d43

Browse files
committed
D8 rebase: preemptive package system repair
1 parent 0594604 commit 1f25d43

File tree

1 file changed

+28
-11
lines changed

1 file changed

+28
-11
lines changed

Makefile

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,11 @@ REPO := https://github.com/$(REPO_GIT)
4848
#TEST_SUBSET := $(if $(IS_DEVSYS),,$(shell grep -qi 'rebase-test' /root/kiwi.config/admin.json && echo true))
4949
TEST_SUBSET := $(if $(IS_DEVSYS),,$(shell grep -qi '"admin_password": "[a-h]' /root/kiwi.config/admin.json && echo true))
5050
#REBASE_DISTRO := $(and $(if $(IS_DEVSYS),,true), $(if $(shell [ $(DEBIAN_VERSION) -eq 8 ] && echo true),,true), $(if $(TEST_SUBSET),true,))
51-
REBASE_DISTRO := $(and $(if $(IS_DEVSYS),,true), $(if $(shell [ $(DEBIAN_VERSION) -eq 8 ] && echo true),,true))
52-
#REBASE_DISTRO := $(if $(IS_DEVSYS),,true)
51+
#REBASE_DISTRO := $(and $(if $(IS_DEVSYS),,true), $(if $(shell [ $(DEBIAN_VERSION) -eq 8 ] && echo true),,true))
52+
REBASE_DISTRO := $(if $(IS_DEVSYS),,true)
53+
REBASE_DISTRO_NOT_D8 := $(and $(if $(IS_DEVSYS),,true), $(if $(shell [ $(DEBIAN_VERSION) -ne 8 ] && echo true),true,))
54+
REBASE_DISTRO_D8 := $(and $(if $(IS_DEVSYS),,true), $(if $(shell [ $(DEBIAN_VERSION) -eq 8 ] && echo true),true,), $(if $(TEST_SUBSET),true,))
55+
5356
REPO_NAME_NEW := KiwiSDR
5457
REPO_DIR_NEW := /root/$(REPO_NAME_NEW)
5558
REPO_GIT_NEW := $(REPO_USER)/$(REPO_NAME_NEW).git
@@ -1429,15 +1432,29 @@ install: make_prereq
14291432
make make_install_binary
14301433
else
14311434
ifeq ($(REBASE_DISTRO),true)
1432-
@echo "==== REBASE distro ===="
1433-
if [ "`pwd`" = $(REPO_DIR) ]; then \
1434-
/usr/bin/du -sh .; \
1435-
rm -rf $(REPO_DIR); \
1436-
/usr/bin/du -sh .; \
1437-
cd /root; git clone $(REPO_NEW); \
1438-
/usr/bin/du -sh .; \
1439-
cd $(REPO_DIR_NEW); make clean; make; make install; \
1440-
fi
1435+
ifeq ($(REBASE_DISTRO_D8),true)
1436+
@echo "==== REBASE distro D8 ===="
1437+
if [ "`pwd`" = $(REPO_DIR) ]; then \
1438+
/usr/bin/du -sh .; \
1439+
rm -rf $(REPO_DIR); \
1440+
/usr/bin/du -sh .; \
1441+
cd /root; git clone $(REPO_NEW); \
1442+
/usr/bin/du -sh .; \
1443+
dpkg --configure -a; \
1444+
apt-get -f -y install; \
1445+
cd $(REPO_DIR_NEW); make clean; make; make install; \
1446+
fi
1447+
else ifeq ($(REBASE_DISTRO_NOT_D8),true)
1448+
@echo "==== REBASE distro not D8 ===="
1449+
if [ "`pwd`" = $(REPO_DIR) ]; then \
1450+
/usr/bin/du -sh .; \
1451+
rm -rf $(REPO_DIR); \
1452+
/usr/bin/du -sh .; \
1453+
cd /root; git clone $(REPO_NEW); \
1454+
/usr/bin/du -sh .; \
1455+
cd $(REPO_DIR_NEW); make clean; make; make install; \
1456+
fi
1457+
endif
14411458
else
14421459
make make_install
14431460
make make_install_files

0 commit comments

Comments
 (0)