From ab24f9914ea252bc9b09cc70906ee1b992fe6887 Mon Sep 17 00:00:00 2001 From: Jeffrey Townsend Date: Wed, 16 Nov 2016 20:21:04 +0000 Subject: [PATCH] Use the new module database infrastructure. --- make/.gitignore | 3 ++- make/config.mk | 7 +++++-- tools/newmodule.py | 2 +- tools/scripts/post-merge.hook | 11 ++++------- tools/scripts/submodule-updated.sh | 2 +- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/make/.gitignore b/make/.gitignore index 4bf19b41..f6b5b210 100644 --- a/make/.gitignore +++ b/make/.gitignore @@ -1,3 +1,4 @@ versions/ -module-manifest.mk +modules/module* + diff --git a/make/config.mk b/make/config.mk index 0e8c23aa..2e1a69aa 100644 --- a/make/config.mk +++ b/make/config.mk @@ -26,8 +26,11 @@ export ONL_DEBIAN_SUITE_$(ONL_DEBIAN_SUITE)=1 export BUILD_DIR_BASE=BUILD/$(ONL_DEBIAN_SUITE) -# Generate manifest if necessary -export MODULEMANIFEST := $(shell $(BUILDER)/tools/mmg.py $(ONL)/make/mmg.yml $(ONL) --only-if-missing) + +# Use the new module database tool to resolve dependencies dynamically. +export BUILDER_MODULE_DATABASE := $(ONL)/make/modules/modules.json +# Regenerate the module manifest if necessary. +export MODULEMANIFEST := $(shell $(BUILDER)/tools/modtool.py --db $(BUILDER_MODULE_DATABASE) --dbroot $(ONL) --make-manifest $(ONL)/make/modules/modules.mk) # Generate versions if necessary. $(shell $(ONL)/tools/make-versions.py --import-file=$(ONL)/tools/onlvi --class-name=OnlVersionImplementation --output-dir $(ONL)/make/versions) diff --git a/tools/newmodule.py b/tools/newmodule.py index 0ac2d599..41d13573 100755 --- a/tools/newmodule.py +++ b/tools/newmodule.py @@ -58,7 +58,7 @@ if __name__ == "__main__": ModuleGenerator.main(globals().copy()) # Make sure the manifest gets regenerated. - os.system("rm -rf %s/make/module-manifest.mk" % ROOT) + os.system("rm -rf %s/make/modules/modules*" % ROOT) diff --git a/tools/scripts/post-merge.hook b/tools/scripts/post-merge.hook index e4bad577..e827fa32 100755 --- a/tools/scripts/post-merge.hook +++ b/tools/scripts/post-merge.hook @@ -2,14 +2,11 @@ ############################################################ # # Every time a merge is performed we should invalidate -# the module manifest. +# the module data. # ############################################################ -mm="$GIT_DIR/../make/module-manifest.mk" - -if [ -f "$mm" ]; then - echo "Removing module manifest after merge..." - rm "$mm" -fi +echo "Removing module data after merge..." +rm -rf "$GIT_DIR/../make/modules/modules*" + diff --git a/tools/scripts/submodule-updated.sh b/tools/scripts/submodule-updated.sh index c3ff4608..979bb64c 100755 --- a/tools/scripts/submodule-updated.sh +++ b/tools/scripts/submodule-updated.sh @@ -13,7 +13,7 @@ ############################################################ # Removing the manifest causes it to be regenerated. -rm -rf $ONL/make/module-manifest.mk +rm -rf $ONL/make/modules/module* # Rebuild pkg cache onlpm.py --rebuild-pkg-cache