diff options
author | Erich Eckner <git@eckner.net> | 2017-06-02 13:30:04 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-06-02 13:30:04 +0200 |
commit | 587773ab3a7df4c8a24296df2decd25c59e657b9 (patch) | |
tree | f71c09cd0f48ac0ccce5ed15d298386caddae752 | |
parent | 08b1c4258bf55c6631e5cb2dd604b59f0f0dcebc (diff) | |
download | builder-587773ab3a7df4c8a24296df2decd25c59e657b9.tar.xz |
bin/get-assignment skip locked,broken,blocked packages from the beginning
-rwxr-xr-x | bin/common-functions | 13 | ||||
-rwxr-xr-x | bin/get-assignment | 9 |
2 files changed, 19 insertions, 3 deletions
diff --git a/bin/common-functions b/bin/common-functions index a04e734..9e3eeeb 100755 --- a/bin/common-functions +++ b/bin/common-functions @@ -132,3 +132,16 @@ find_git_repository_to_package_repository() { exit 1 } + +# package_locked_broken_or_blocked package git_revision mod_git_revision repository +# return if package - of given repository and revisions - is [locked or broken or blocked] + +package_locked_broken_or_blocked() { + if [ -f "${work_dir}/package-states/$1.$2.$3.$4.locked" ] || + [ -f "${work_dir}/package-states/$1.$2.$3.$4.broken" ] || + [ -f "${work_dir}/package-states/$1.$2.$3.$4.blocked" ]; then + return 0 + else + return 1 + fi +} diff --git a/bin/get-assignment b/bin/get-assignment index 18c8bc2..8ac77a3 100755 --- a/bin/get-assignment +++ b/bin/get-assignment @@ -23,9 +23,8 @@ mkdir -p "${work_dir}/package-states" hand_out_assignment() { - # locked and broken packages won't be handed out - if [ -f "${work_dir}/package-states/$1.$2.$3.$4.locked" ] || - [ -f "${work_dir}/package-states/$1.$2.$3.$4.broken" ]; then + # locked, broken and blocked packages won't be handed out + if package_locked_broken_or_blocked "$1" "$2" "$3" "$4"; then return 0 fi @@ -90,6 +89,10 @@ fi while read -r package git_revision mod_git_revision repository; do + if package_locked_broken_or_blocked "${package}" "${git_revision}" "${mod_git_revision}" "${repository}"; then + continue + fi + [ -z "$( ( cat "${work_dir}/package-infos/${package}."*".needs" |