diff options
author | Erich Eckner <git@eckner.net> | 2020-10-11 14:14:11 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-10-11 14:14:11 +0200 |
commit | 996cd177335570aba8bce351a1add66b7209d72f (patch) | |
tree | 9dd2c66aeeaf922aa05cc9267e70f94305af30d9 | |
parent | 3936ebc36a37ed4d1e15c9980f61c58deb4f7273 (diff) | |
download | archlinuxewe.git.save-996cd177335570aba8bce351a1add66b7209d72f.tar.xz |
archPackagesUpdate: request packages from arch.eckner.net and mirror.archlinux32.org
-rwxr-xr-x | archPackagesUpdate | 59 |
1 files changed, 39 insertions, 20 deletions
diff --git a/archPackagesUpdate b/archPackagesUpdate index 9b574edf..98faf612 100755 --- a/archPackagesUpdate +++ b/archPackagesUpdate @@ -303,6 +303,43 @@ fi if ${aufRechenknecht}; then + if ${force}; then + available_packages='' + else + available_packages=$( + curl -Ss 'https://arch.eckner.net/os/' \ + | sed ' + s@^.*<a href="\([^/"]\+\)/">\1/</a>.*$@\1@ + /^\.\.$/d + /^any$/d + t + d + ' \ + | while read -r arch; do + curl -Ss 'https://arch.eckner.net/os/'"${arch}"'/archlinuxewe.db.tar.gz' \ + | tar -Oxzf - \ + | sed ' + /^%FILENAME%$/ { + N + s@^%FILENAME%\n@archlinuxewe/'"${arch}"'/@ + t + } + d + ' + done + curl -Ss 'https://mirror.archlinux32.org/x86_64/releng/releng.db.tar.gz' \ + | tar -Oxzf - \ + | sed ' + /^%FILENAME%$/ { + N + s@^%FILENAME%\n@releng/x86_64/@ + t + } + d + ' + ) + fi + # collect packages for paket in $( \ echo */PKGBUILD | \ @@ -354,27 +391,9 @@ if ${aufRechenknecht}; then continue pkgFile="${pkgnam}-${epoch:+${epoch}:}${pkgver}-${pkgrel}-${singleArch}.pkg.tar.zst" - - if ${force}; then + if ! printf '%s\n' "${available_packages}" \ + | grep -qxF "${repo}/${singleArch}/${pkgFile}"; then printf '%s\n' "${singleArch}" - else -# TODO: this needs to query the repo server - if [ "${repo}" == 'releng' ]; then - [ ! -e "${pkgDir32}/${pkgFile}" ] \ - && [ ! -e "${pkgDir32}/${pkgFile%.zst}.xz" ] \ - && printf '%s\n' "${singleArch}" - fi - [ "${singleArch}" == "any" ] && \ - for dir in ${pkgDir}/*; do - [ ! -d "${dir}" ] && continue - [ ! -e "${dir}/${pkgFile}" ] \ - && [ ! -e "${dir}/${pkgFile%.zst}.xz" ] \ - && printf '%s\n' "${singleArch}" - done - - [ ! -e "${pkgDir}/${singleArch}/${pkgFile}" ] \ - && [ ! -e "${pkgDir}/${singleArch}/${pkgFile%.zst}.xz" ] \ - && printf '%s\n' "${singleArch}" fi done |