Fixed errors in packages/deb and mirror/ubuntu
1) unconditional rebuilding due to never existent file repocleanup.done used to depend on PHONY target (sources) which led to unconditional rebuilding. This didn't influence ISO builds because CI always cleans environment. 2) fail when try to rebuild second time without cleaning environment repo.done used to consume some config files created by reprepro.done target. After consuming those files it used to remove them not touching reprepro.done itself. Without cleaning build environment this fails the build process. Change-Id: Ib0de2e5ea94caeb7f93f5bc8d0f06a6f806e3ca6 Closes-Bug: #1448206
This commit is contained in:
parent
d4b50b2408
commit
f3d5199656
|
@ -34,38 +34,43 @@ ifneq ($(BUILD_PACKAGES),0)
|
|||
$(BUILD_DIR)/mirror/ubuntu/build.done: $(BUILD_DIR)/mirror/ubuntu/repo.done
|
||||
endif
|
||||
|
||||
REPREPRO_CONF_DIR:=$(BUILD_DIR)/mirror/ubuntu/reprepro/conf
|
||||
|
||||
define config_reprepro
|
||||
#Generate reprepro distributions config
|
||||
cat > $(LOCAL_MIRROR_UBUNTU)/conf/distributions << EOF
|
||||
cat > $(REPREPRO_CONF_DIR)/distributions << EOF
|
||||
$(reprepro_dist_conf)
|
||||
EOF
|
||||
#Generate reprepro updates config
|
||||
cat > $(LOCAL_MIRROR_UBUNTU)/conf/updates << EOF
|
||||
cat > $(REPREPRO_CONF_DIR)/updates << EOF
|
||||
$(reprepro_updates_conf)
|
||||
EOF
|
||||
endef
|
||||
|
||||
|
||||
$(BUILD_DIR)/mirror/ubuntu/reprepro.done: export config_reprepro:=$(config_reprepro)
|
||||
$(BUILD_DIR)/mirror/ubuntu/reprepro.done: $(BUILD_DIR)/mirror/ubuntu/mirror.done
|
||||
mkdir -p $(LOCAL_MIRROR_UBUNTU)/conf
|
||||
$(BUILD_DIR)/mirror/ubuntu/reprepro_config.done: export config_reprepro:=$(config_reprepro)
|
||||
$(BUILD_DIR)/mirror/ubuntu/reprepro_config.done:
|
||||
mkdir -p $(REPREPRO_CONF_DIR)
|
||||
sh -c "$${config_reprepro}"
|
||||
#Import existing Ubuntu repository
|
||||
cd $(LOCAL_MIRROR_UBUNTU) && reprepro --confdir=$(LOCAL_MIRROR_UBUNTU)/conf -V update
|
||||
$(ACTION.TOUCH)
|
||||
|
||||
$(BUILD_DIR)/mirror/ubuntu/repo.done: $(BUILD_DIR)/mirror/ubuntu/mirror.done \
|
||||
$(BUILD_DIR)/mirror/ubuntu/reprepro.done
|
||||
#FIXME(aglarendil): do not touch upstream repo. instead - build new repo
|
||||
#Import newly built packages
|
||||
cd $(LOCAL_MIRROR_UBUNTU) && reprepro --confdir=$(LOCAL_MIRROR_UBUNTU)/conf -V includedeb $(PRODUCT_NAME)$(PRODUCT_VERSION) $(BUILD_DIR)/packages/deb/packages/*.deb
|
||||
#Clean up reprepro data
|
||||
$(BUILD_DIR)/mirror/ubuntu/reprepro.done: \
|
||||
$(BUILD_DIR)/mirror/ubuntu/mirror.done \
|
||||
$(BUILD_DIR)/mirror/ubuntu/reprepro_config.done
|
||||
# Import existing Ubuntu repository
|
||||
cd $(LOCAL_MIRROR_UBUNTU) && reprepro --confdir=$(REPREPRO_CONF_DIR) -V update
|
||||
$(ACTION.TOUCH)
|
||||
|
||||
$(BUILD_DIR)/mirror/ubuntu/repo.done: \
|
||||
$(BUILD_DIR)/mirror/ubuntu/reprepro_config.done \
|
||||
$(BUILD_DIR)/mirror/ubuntu/reprepro.done
|
||||
# FIXME(aglarendil): do not touch upstream repo. instead - build new repo
|
||||
# Import newly built packages
|
||||
cd $(LOCAL_MIRROR_UBUNTU) && reprepro --confdir=$(REPREPRO_CONF_DIR) -V includedeb $(PRODUCT_NAME)$(PRODUCT_VERSION) $(BUILD_DIR)/packages/deb/packages/*.deb
|
||||
# Clean up reprepro data
|
||||
rm -rf $(LOCAL_MIRROR_UBUNTU)/db
|
||||
rm -rf $(LOCAL_MIRROR_UBUNTU)/lists
|
||||
rm -rf $(LOCAL_MIRROR_UBUNTU)/conf
|
||||
$(ACTION.TOUCH)
|
||||
|
||||
|
||||
$(BUILD_DIR)/mirror/ubuntu/mirror.done:
|
||||
mkdir -p $(LOCAL_MIRROR_UBUNTU)
|
||||
ifeq (none,$(strip $(USE_MIRROR)))
|
||||
|
|
|
@ -56,12 +56,12 @@ define remove_deb
|
|||
mkdir -p $(BUILD_DIR)/packages/deb
|
||||
perl $(SOURCE_DIR)/packages/deb/genpkgnames.pl $(BUILD_DIR)/repos/$1/debian/control > $(BUILD_DIR)/packages/deb/$1.cleanup.list
|
||||
cd $(LOCAL_MIRROR_UBUNTU) && cat $(BUILD_DIR)/packages/deb/$1.cleanup.list | \
|
||||
xargs -n1 -I{} reprepro --confdir=$(LOCAL_MIRROR_UBUNTU)/conf remove $(PRODUCT_NAME)$(PRODUCT_VERSION) {} $(NEWLINE)
|
||||
xargs -n1 -I{} reprepro --confdir=$(REPREPRO_CONF_DIR) remove $(PRODUCT_NAME)$(PRODUCT_VERSION) {} $(NEWLINE)
|
||||
endef
|
||||
|
||||
$(BUILD_DIR)/mirror/ubuntu/repo.done: $(BUILD_DIR)/packages/deb/repocleanup.done
|
||||
$(BUILD_DIR)/packages/deb/repocleanup.done: $(BUILD_DIR)/mirror/ubuntu/mirror.done
|
||||
$(BUILD_DIR)/packages/deb/repocleanup.done: sources
|
||||
$(BUILD_DIR)/packages/deb/repocleanup.done: $(packages_list:%=$(BUILD_DIR)/packages/source_%.done)
|
||||
$(foreach pkg,$(fuel_debian_packages),$(call remove_deb,$(pkg)))
|
||||
$(ACTION.TOUCH)
|
||||
|
||||
|
|
Loading…
Reference in New Issue