From: Hyokeun Jeon Date: Tue, 12 Jan 2021 07:22:46 +0000 (+0900) Subject: Call createdirdeps only if repo refresh needed X-Git-Tag: submit/trunk/20210201.152700^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9bce2c06a7cc4fee44ff87f4cd07c572a1c83883;p=tools%2Fdepanneur.git Call createdirdeps only if repo refresh needed - Do not have to create cache.local after the build. - Change to one time when starting the next build. - Build time improvement: 10 minutes savings for 1895 packges Change-Id: I96005334bff71f5a129d340531c7666e38e12fce --- diff --git a/depanneur b/depanneur index 2be73b0..241ef03 100755 --- a/depanneur +++ b/depanneur @@ -1850,6 +1850,15 @@ sub update_repo_with_rpms { } } +#--------------------------------------------------------------------- +# create repo.cache.local +#--------------------------------------------------------------------- +sub create_cache_local { + my_system("'$build_dir'/createdirdeps '$rpm_repo_path' > '$order_dir'/.repo.cache.local "); + my_system("echo D: >> '$order_dir'/.repo.cache.local"); + my_system("cat '$order_dir'/.repo.cache.local '$order_dir'/.repo.cache.remote >'$order_dir'/.repo.cache"); +} + #--------------------------------------------------------------------- # Generate buid command and run it #--------------------------------------------------------------------- @@ -2120,10 +2129,6 @@ sub build_package { my_system ("sudo ln '$_' '$rpm_repo_path'"); } } - - my_system("'$build_dir'/createdirdeps '$rpm_repo_path' > '$order_dir'/.repo.cache.local "); - my_system("echo D: >> '$order_dir'/.repo.cache.local"); - my_system("cat '$order_dir'/.repo.cache.local '$order_dir'/.repo.cache.remote >'$order_dir'/.repo.cache"); } info("finished building $name"); $packages_built = 1; @@ -2943,6 +2948,7 @@ while (! $TERM) { lock($DETACHING); if ($dirty) { # there is any package has been built + create_cache_local(); refresh_repo(); update_expansion_errors(); #update_pkgdeps();