some errors in make system

Bug #1448206 reported by Vladimir Kozhukalov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
High
Vladimir Kozhukalov

Bug Description

1) this line leads to rebuilding repocleanup.done target every time because 'sources' file never exists.

$(BUILD_DIR)/packages/deb/repocleanup.done: sources
 $(foreach pkg,$(fuel_debian_packages),$(call remove_deb,$(pkg)))
 $(ACTION.TOUCH)

2) this block fails if we try to build repo.done target without removing reprepro.done, because reprepro.done prepares reprepro config and then repo.done uses this config and then removes config files and does not touch reprepro.done

$(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
 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
 rm -rf $(LOCAL_MIRROR_UBUNTU)/db
 rm -rf $(LOCAL_MIRROR_UBUNTU)/lists
 rm -rf $(LOCAL_MIRROR_UBUNTU)/conf
 $(ACTION.TOUCH)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-main (master)

Fix proposed to branch: master
Review: https://review.openstack.org/177349

Changed in fuel:
status: Triaged → In Progress
Revision history for this message
Alexei Sheplyakov (asheplyakov) wrote :

> this block fails if we try to build repo.done target without removing reprepro.done, because reprepro.done prepares reprepro config and then repo.done uses this config and then removes config files and does not touch reprepro.done

Partial rebuild (i.e. without make deep_clean) is a very bad idea (because the build alters a lot of global state)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-main (master)

Reviewed: https://review.openstack.org/177349
Committed: https://git.openstack.org/cgit/stackforge/fuel-main/commit/?id=f3d5199656f2ec12e242edcee731ece5a9376a23
Submitter: Jenkins
Branch: master

commit f3d5199656f2ec12e242edcee731ece5a9376a23
Author: Vladimir Kozhukalov <email address hidden>
Date: Fri Apr 24 19:22:48 2015 +0300

    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

Changed in fuel:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.