diff options
author | Simon Rettberg | 2021-04-27 17:12:09 +0200 |
---|---|---|
committer | Your Name | 2021-04-27 17:12:09 +0200 |
commit | 78ad5a42f4d26d8341e83aa0bb7212219fba180e (patch) | |
tree | 0de59089686cb03d169f6c70d4438c57a073fe74 /core/modules | |
parent | [vbox-src] 6.1.20 (diff) | |
download | mltk-78ad5a42f4d26d8341e83aa0bb7212219fba180e.tar.gz mltk-78ad5a42f4d26d8341e83aa0bb7212219fba180e.tar.xz mltk-78ad5a42f4d26d8341e83aa0bb7212219fba180e.zip |
[kernel-vanilla] Improve aufs patch selection again
Diffstat (limited to 'core/modules')
-rw-r--r-- | core/modules/kernel-vanilla/module.build | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/core/modules/kernel-vanilla/module.build b/core/modules/kernel-vanilla/module.build index 81eff22e..9886640a 100644 --- a/core/modules/kernel-vanilla/module.build +++ b/core/modules/kernel-vanilla/module.build @@ -158,6 +158,7 @@ patch_aufs() { git clone "git://aufs.git.sourceforge.net/gitroot/aufs/${AUFS}-standalone.git" || perror "Cloning ${AUFS} failed." else git clone "git://github.com/sfjro/${AUFS}-standalone.git" || perror "Cloning ${AUFS} failed." + #git clone "git://github.com/bnied/${AUFS}-standalone.git" || perror "Cloning ${AUFS} failed." fi # get the needed version cde "${MODULE_WORK_DIR}/${AUFS}-standalone" @@ -167,16 +168,26 @@ patch_aufs() { if [ -z "$major" ] || [ -z "$minor" ]; then perror "REQUIRED_KERNEL not in properly set, this should not happen!" fi - local NEEDED_BRANCH="aufs${major}.${minor}" - local testvar - while [ "${patch}" -gt 0 ]; do - for testvar in "${branches[@]}"; do - if [ "$testvar" = "${NEEDED_BRANCH}.${patch}" ] || [ "$testvar" = "${NEEDED_BRANCH}.${patch}+" ]; then - NEEDED_BRANCH="$testvar" - break 2 - fi + local testvar outer NEEDED_BRANCH + while (( minor >= 0 )); do + NEEDED_BRANCH="aufs${major}.${minor}" + outer=false + while (( patch > 0 )); do + for testvar in "${branches[@]}"; do + if [ "$testvar" = "${NEEDED_BRANCH}.${patch}" ] || [ "$testvar" = "${NEEDED_BRANCH}.${patch}+" ]; then + NEEDED_BRANCH="$testvar" + break 3 + elif [ "$testvar" = "${NEEDED_BRANCH}" ]; then + outer=true + fi + done + (( patch-- )) done - patch=$(( patch - 1 )) + $outer && break + if (( patch == 0 )); then + patch=500 + (( minor-- )) + fi done pinfo "Getting branch origin/$NEEDED_BRANCH" git checkout "origin/$NEEDED_BRANCH" || git checkout "origin/${AUFS}.x-rcN" || perror "Could not checkout needed branch." |