Closed pitill0 closed 1 year ago
LGTM but why you use ../$(RELEASE_TAR_FILE)
. The RELEASE_TAR_FILE should be an absolute path so there is no need to use ../
I think we can do it in a simpler way. We can get the first value of the COLLECTIONS list variable.
--- a/Makefile
+++ b/Makefile
@@ -344,10 +344,11 @@ release: $(RELEASE_TAR_FILE)
$(RELEASE_TAR_FILE): $(ROOTFS_STAGE1_DIR)
@echo "[`date +'%F %T'`] Cleaning up"
@test ! -d $(ROOTFS_STAGE1_DIR)/workspace || sudo rmdir $(ROOTFS_STAGE1_DIR)/workspace
- @sudo rm -f $(ROOTFS_STAGE1_DIR)/etc/pkgmk.conf && \
- sudo cp $(PORTS_DIR)/core-arm/pkgutils/pkgmk.conf $(ROOTFS_STAGE1_DIR)/etc/pkgmk.conf
- @sudo rm -f $(ROOTFS_STAGE1_DIR)/etc/prt-get.conf && \
- sudo cp $(PORTS_DIR)/core-arm/prt-get/prt-get.conf $(ROOTFS_STAGE1_DIR)/etc/prt-get.conf
+ @sudo rm -f $(ROOTFS_STAGE1_DIR)/etc/pkgmk.conf
+ @sudo rm -f $(ROOTFS_STAGE1_DIR)/etc/prt-get.conf
+ @echo "[`date +'%F %T'`] Copying config files"
+ @sudo cp $(PORTS_DIR)/$(word 1, $(COLLECTIONS))/pkgutils/pkgmk.conf $(ROOTFS_STAGE1_DIR)/etc/pkgmk.conf
+ @sudo cp $(PORTS_DIR)/$(word 1, $(COLLECTIONS))/prt-get/prt-get.conf $(ROOTFS_STAGE1_DIR)/etc/prt-get.conf
@echo "[`date +'%F %T'`] Building $(RELEASE_TAR_FILE)"
@cd $(ROOTFS_STAGE1_DIR) && \
sudo tar cJf $(RELEASE_TAR_FILE) * && \
It serms to be a cleaner and a simpler way to manager this issue.
I'll test this patch locally and I'll share results.
It seems to be working right. This issue can be closed.
We are facing an issue when building the final release rootfs. The process is always setting up generic files instead of optimized ones.
This patch is intended to copy specific config files (pkgmk.conf and prt-get.conf) for optimized devices to the corresponding path according to the optimization chosen: