| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 # | 4 # |
| 5 # This script should not be run directly but sourced by the other | 5 # This script should not be run directly but sourced by the other |
| 6 # scripts (e.g. sysroot-creator-trusty.sh). Its up to the parent scripts | 6 # scripts (e.g. sysroot-creator-trusty.sh). Its up to the parent scripts |
| 7 # to define certain environment variables: e.g. | 7 # to define certain environment variables: e.g. |
| 8 # DISTRO=ubuntu | 8 # DISTRO=ubuntu |
| 9 # DIST=trusty | 9 # DIST=trusty |
| 10 # APT_REPO=http://archive.ubuntu.com/ubuntu | 10 # APT_REPO=http://archive.ubuntu.com/ubuntu |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 ###################################################################### | 57 ###################################################################### |
| 58 | 58 |
| 59 PACKAGES_EXT=${PACKAGES_EXT:-bz2} | 59 PACKAGES_EXT=${PACKAGES_EXT:-bz2} |
| 60 readonly RELEASE_FILE="Release" | 60 readonly RELEASE_FILE="Release" |
| 61 readonly RELEASE_FILE_GPG="Release.gpg" | 61 readonly RELEASE_FILE_GPG="Release.gpg" |
| 62 readonly RELEASE_LIST="${REPO_BASEDIR}/${RELEASE_FILE}" | 62 readonly RELEASE_LIST="${REPO_BASEDIR}/${RELEASE_FILE}" |
| 63 readonly RELEASE_LIST_GPG="${REPO_BASEDIR}/${RELEASE_FILE_GPG}" | 63 readonly RELEASE_LIST_GPG="${REPO_BASEDIR}/${RELEASE_FILE_GPG}" |
| 64 readonly PACKAGE_FILE_AMD64="main/binary-amd64/Packages.${PACKAGES_EXT}" | 64 readonly PACKAGE_FILE_AMD64="main/binary-amd64/Packages.${PACKAGES_EXT}" |
| 65 readonly PACKAGE_FILE_I386="main/binary-i386/Packages.${PACKAGES_EXT}" | 65 readonly PACKAGE_FILE_I386="main/binary-i386/Packages.${PACKAGES_EXT}" |
| 66 readonly PACKAGE_FILE_ARM="main/binary-armhf/Packages.${PACKAGES_EXT}" | 66 readonly PACKAGE_FILE_ARM="main/binary-armhf/Packages.${PACKAGES_EXT}" |
| 67 readonly PACKAGE_FILE_ARM64="main/binary-arm64/Packages.${PACKAGES_EXT}" |
| 67 readonly PACKAGE_FILE_MIPS="main/binary-mipsel/Packages.${PACKAGES_EXT}" | 68 readonly PACKAGE_FILE_MIPS="main/binary-mipsel/Packages.${PACKAGES_EXT}" |
| 68 readonly PACKAGE_LIST_AMD64="${REPO_BASEDIR}/${PACKAGE_FILE_AMD64}" | 69 readonly PACKAGE_LIST_AMD64="${REPO_BASEDIR}/${PACKAGE_FILE_AMD64}" |
| 69 readonly PACKAGE_LIST_I386="${REPO_BASEDIR}/${PACKAGE_FILE_I386}" | 70 readonly PACKAGE_LIST_I386="${REPO_BASEDIR}/${PACKAGE_FILE_I386}" |
| 70 readonly PACKAGE_LIST_ARM="${REPO_BASEDIR}/${PACKAGE_FILE_ARM}" | 71 readonly PACKAGE_LIST_ARM="${REPO_BASEDIR}/${PACKAGE_FILE_ARM}" |
| 72 readonly PACKAGE_LIST_ARM64="${REPO_BASEDIR}/${PACKAGE_FILE_ARM64}" |
| 71 readonly PACKAGE_LIST_MIPS="${REPO_BASEDIR}/${PACKAGE_FILE_MIPS}" | 73 readonly PACKAGE_LIST_MIPS="${REPO_BASEDIR}/${PACKAGE_FILE_MIPS}" |
| 72 | 74 |
| 73 readonly DEBIAN_DEP_LIST_AMD64="packagelist.${DIST}.amd64" | 75 readonly DEBIAN_DEP_LIST_AMD64="packagelist.${DIST}.amd64" |
| 74 readonly DEBIAN_DEP_LIST_I386="packagelist.${DIST}.i386" | 76 readonly DEBIAN_DEP_LIST_I386="packagelist.${DIST}.i386" |
| 75 readonly DEBIAN_DEP_LIST_ARM="packagelist.${DIST}.arm" | 77 readonly DEBIAN_DEP_LIST_ARM="packagelist.${DIST}.arm" |
| 78 readonly DEBIAN_DEP_LIST_ARM64="packagelist.${DIST}.arm64" |
| 76 readonly DEBIAN_DEP_LIST_MIPS="packagelist.${DIST}.mipsel" | 79 readonly DEBIAN_DEP_LIST_MIPS="packagelist.${DIST}.mipsel" |
| 77 | 80 |
| 78 ###################################################################### | 81 ###################################################################### |
| 79 # Helper | 82 # Helper |
| 80 ###################################################################### | 83 ###################################################################### |
| 81 | 84 |
| 82 Banner() { | 85 Banner() { |
| 83 echo "######################################################################" | 86 echo "######################################################################" |
| 84 echo $* | 87 echo $* |
| 85 echo "######################################################################" | 88 echo "######################################################################" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 echo $1 | grep -qs Amd64$ && ARCH=AMD64 | 125 echo $1 | grep -qs Amd64$ && ARCH=AMD64 |
| 123 if [ -z "$ARCH" ]; then | 126 if [ -z "$ARCH" ]; then |
| 124 echo $1 | grep -qs I386$ && ARCH=I386 | 127 echo $1 | grep -qs I386$ && ARCH=I386 |
| 125 fi | 128 fi |
| 126 if [ -z "$ARCH" ]; then | 129 if [ -z "$ARCH" ]; then |
| 127 echo $1 | grep -qs Mips$ && ARCH=MIPS | 130 echo $1 | grep -qs Mips$ && ARCH=MIPS |
| 128 fi | 131 fi |
| 129 if [ -z "$ARCH" ]; then | 132 if [ -z "$ARCH" ]; then |
| 130 echo $1 | grep -qs ARM$ && ARCH=ARM | 133 echo $1 | grep -qs ARM$ && ARCH=ARM |
| 131 fi | 134 fi |
| 135 if [ -z "$ARCH" ]; then |
| 136 echo $1 | grep -qs ARM64$ && ARCH=ARM64 |
| 137 fi |
| 132 if [ -z "${ARCH}" ]; then | 138 if [ -z "${ARCH}" ]; then |
| 133 echo "ERROR: Unable to determine architecture based on: $1" | 139 echo "ERROR: Unable to determine architecture based on: $1" |
| 134 exit 1 | 140 exit 1 |
| 135 fi | 141 fi |
| 136 ARCH_LOWER=$(echo $ARCH | tr '[:upper:]' '[:lower:]') | 142 ARCH_LOWER=$(echo $ARCH | tr '[:upper:]' '[:lower:]') |
| 137 } | 143 } |
| 138 | 144 |
| 139 | 145 |
| 140 # some sanity checks to make sure this script is run from the right place | 146 # some sanity checks to make sure this script is run from the right place |
| 141 # with the right tools | 147 # with the right tools |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 local output_file="$1" | 223 local output_file="$1" |
| 218 local package_list="${BUILD_DIR}/Packages.${DIST}_arm.${PACKAGES_EXT}" | 224 local package_list="${BUILD_DIR}/Packages.${DIST}_arm.${PACKAGES_EXT}" |
| 219 local tmp_package_list="${BUILD_DIR}/Packages.${DIST}_arm" | 225 local tmp_package_list="${BUILD_DIR}/Packages.${DIST}_arm" |
| 220 DownloadOrCopy "${PACKAGE_LIST_ARM}" "${package_list}" | 226 DownloadOrCopy "${PACKAGE_LIST_ARM}" "${package_list}" |
| 221 VerifyPackageListing "${PACKAGE_FILE_ARM}" "${package_list}" | 227 VerifyPackageListing "${PACKAGE_FILE_ARM}" "${package_list}" |
| 222 ExtractPackageBz2 "$package_list" "$tmp_package_list" | 228 ExtractPackageBz2 "$package_list" "$tmp_package_list" |
| 223 GeneratePackageList "$tmp_package_list" "$output_file" "${DEBIAN_PACKAGES} | 229 GeneratePackageList "$tmp_package_list" "$output_file" "${DEBIAN_PACKAGES} |
| 224 ${DEBIAN_PACKAGES_ARM}" | 230 ${DEBIAN_PACKAGES_ARM}" |
| 225 } | 231 } |
| 226 | 232 |
| 233 function GeneratePackageListARM64() { |
| 234 local output_file="$1" |
| 235 local package_list="${BUILD_DIR}/Packages.${DIST}_arm64.${PACKAGES_EXT}" |
| 236 local tmp_package_list="${BUILD_DIR}/Packages.${DIST}_arm64" |
| 237 DownloadOrCopy "${PACKAGE_LIST_ARM64}" "${package_list}" |
| 238 VerifyPackageListing "${PACKAGE_FILE_ARM64}" "${package_list}" |
| 239 ExtractPackageBz2 "$package_list" "$tmp_package_list" |
| 240 GeneratePackageList "$tmp_package_list" "$output_file" "${DEBIAN_PACKAGES} |
| 241 ${DEBIAN_PACKAGES_ARM64}" |
| 242 } |
| 243 |
| 227 GeneratePackageListMips() { | 244 GeneratePackageListMips() { |
| 228 local output_file="$1" | 245 local output_file="$1" |
| 229 local package_list="${BUILD_DIR}/Packages.${DIST}_mips.${PACKAGES_EXT}" | 246 local package_list="${BUILD_DIR}/Packages.${DIST}_mips.${PACKAGES_EXT}" |
| 230 local tmp_package_list="${BUILD_DIR}/Packages.${DIST}_mips" | 247 local tmp_package_list="${BUILD_DIR}/Packages.${DIST}_mips" |
| 231 DownloadOrCopy "${PACKAGE_LIST_MIPS}" "${package_list}" | 248 DownloadOrCopy "${PACKAGE_LIST_MIPS}" "${package_list}" |
| 232 VerifyPackageListing "${PACKAGE_FILE_MIPS}" "${package_list}" | 249 VerifyPackageListing "${PACKAGE_FILE_MIPS}" "${package_list}" |
| 233 ExtractPackageBz2 "$package_list" "$tmp_package_list" | 250 ExtractPackageBz2 "$package_list" "$tmp_package_list" |
| 234 GeneratePackageList "$tmp_package_list" "$output_file" "${DEBIAN_PACKAGES}" | 251 GeneratePackageList "$tmp_package_list" "$output_file" "${DEBIAN_PACKAGES}" |
| 235 } | 252 } |
| 236 | 253 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 sed -i -e 's|/lib/arm-linux-gnueabihf/||g' ${lscripts} | 333 sed -i -e 's|/lib/arm-linux-gnueabihf/||g' ${lscripts} |
| 317 | 334 |
| 318 # This is for chrome's ./build/linux/pkg-config-wrapper | 335 # This is for chrome's ./build/linux/pkg-config-wrapper |
| 319 # which overwrites PKG_CONFIG_LIBDIR internally | 336 # which overwrites PKG_CONFIG_LIBDIR internally |
| 320 SubBanner "Move pkgconfig files" | 337 SubBanner "Move pkgconfig files" |
| 321 mkdir -p ${INSTALL_ROOT}/usr/lib/pkgconfig | 338 mkdir -p ${INSTALL_ROOT}/usr/lib/pkgconfig |
| 322 mv ${INSTALL_ROOT}/usr/lib/arm-linux-gnueabihf/pkgconfig/* \ | 339 mv ${INSTALL_ROOT}/usr/lib/arm-linux-gnueabihf/pkgconfig/* \ |
| 323 ${INSTALL_ROOT}/usr/lib/pkgconfig | 340 ${INSTALL_ROOT}/usr/lib/pkgconfig |
| 324 } | 341 } |
| 325 | 342 |
| 343 function HacksAndPatchesARM64() { |
| 344 Banner "Misc Hacks & Patches" |
| 345 # these are linker scripts with absolute pathnames in them |
| 346 # which we rewrite here |
| 347 lscripts="${INSTALL_ROOT}/usr/lib/aarch64-linux-gnu/libpthread.so \ |
| 348 ${INSTALL_ROOT}/usr/lib/aarch64-linux-gnu/libc.so" |
| 349 |
| 350 # Rewrite linker scripts |
| 351 sed -i -e 's|/usr/lib/aarch64-linux-gnu/||g' ${lscripts} |
| 352 sed -i -e 's|/lib/aarch64-linux-gnu/||g' ${lscripts} |
| 353 |
| 354 # This is for chrome's ./build/linux/pkg-config-wrapper |
| 355 # which overwrites PKG_CONFIG_LIBDIR internally |
| 356 SubBanner "Move pkgconfig files" |
| 357 mkdir -p ${INSTALL_ROOT}/usr/lib/pkgconfig |
| 358 mv ${INSTALL_ROOT}/usr/lib/aarch64-linux-gnu/pkgconfig/* \ |
| 359 ${INSTALL_ROOT}/usr/lib/pkgconfig |
| 360 |
| 361 } |
| 326 | 362 |
| 327 HacksAndPatchesMips() { | 363 HacksAndPatchesMips() { |
| 328 Banner "Misc Hacks & Patches" | 364 Banner "Misc Hacks & Patches" |
| 329 # these are linker scripts with absolute pathnames in them | 365 # these are linker scripts with absolute pathnames in them |
| 330 # which we rewrite here | 366 # which we rewrite here |
| 331 lscripts="${INSTALL_ROOT}/usr/lib/mipsel-linux-gnu/libpthread.so \ | 367 lscripts="${INSTALL_ROOT}/usr/lib/mipsel-linux-gnu/libpthread.so \ |
| 332 ${INSTALL_ROOT}/usr/lib/mipsel-linux-gnu/libc.so" | 368 ${INSTALL_ROOT}/usr/lib/mipsel-linux-gnu/libc.so" |
| 333 | 369 |
| 334 # Rewrite linker scripts | 370 # Rewrite linker scripts |
| 335 sed -i -e 's|/usr/lib/mipsel-linux-gnu/||g' ${lscripts} | 371 sed -i -e 's|/usr/lib/mipsel-linux-gnu/||g' ${lscripts} |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 cd ${INSTALL_ROOT} | 427 cd ${INSTALL_ROOT} |
| 392 local libdirs="lib usr/lib" | 428 local libdirs="lib usr/lib" |
| 393 if [ "${ARCH}" != "MIPS" ]; then | 429 if [ "${ARCH}" != "MIPS" ]; then |
| 394 libdirs+=" lib64" | 430 libdirs+=" lib64" |
| 395 fi | 431 fi |
| 396 find $libdirs -type l -printf '%p %l\n' | while read link target; do | 432 find $libdirs -type l -printf '%p %l\n' | while read link target; do |
| 397 # skip links with non-absolute paths | 433 # skip links with non-absolute paths |
| 398 echo "${target}" | grep -qs ^/ || continue | 434 echo "${target}" | grep -qs ^/ || continue |
| 399 echo "${link}: ${target}" | 435 echo "${link}: ${target}" |
| 400 case "${link}" in | 436 case "${link}" in |
| 401 usr/lib/gcc/*-linux-gnu/4.*/* | usr/lib/gcc/arm-linux-gnueabihf/4.*/*) | 437 usr/lib/gcc/*-linux-gnu/4.*/* | usr/lib/gcc/arm-linux-gnueabihf/4.*/* |\ |
| 438 usr/lib/gcc/aarch64-linux-gnu/4.*/*) |
| 402 # Relativize the symlink. | 439 # Relativize the symlink. |
| 403 ln -snfv "../../../../..${target}" "${link}" | 440 ln -snfv "../../../../..${target}" "${link}" |
| 404 ;; | 441 ;; |
| 405 usr/lib/*-linux-gnu/* | usr/lib/arm-linux-gnueabihf/*) | 442 usr/lib/*-linux-gnu/* | usr/lib/arm-linux-gnueabihf/*) |
| 406 # Relativize the symlink. | 443 # Relativize the symlink. |
| 407 ln -snfv "../../..${target}" "${link}" | 444 ln -snfv "../../..${target}" "${link}" |
| 408 ;; | 445 ;; |
| 409 usr/lib/*) | 446 usr/lib/*) |
| 410 # Relativize the symlink. | 447 # Relativize the symlink. |
| 411 ln -snfv "../..${target}" "${link}" | 448 ln -snfv "../..${target}" "${link}" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 local files_and_sha256sums="$(cat ${package_file})" | 510 local files_and_sha256sums="$(cat ${package_file})" |
| 474 StripChecksumsFromPackageList "$package_file" | 511 StripChecksumsFromPackageList "$package_file" |
| 475 VerifyPackageFilesMatch "$package_file" "$DEBIAN_DEP_LIST_ARM" | 512 VerifyPackageFilesMatch "$package_file" "$DEBIAN_DEP_LIST_ARM" |
| 476 APT_REPO=${APR_REPO_ARM:=$APT_REPO} | 513 APT_REPO=${APR_REPO_ARM:=$APT_REPO} |
| 477 InstallIntoSysroot ${files_and_sha256sums} | 514 InstallIntoSysroot ${files_and_sha256sums} |
| 478 CleanupJailSymlinks | 515 CleanupJailSymlinks |
| 479 HacksAndPatchesARM | 516 HacksAndPatchesARM |
| 480 CreateTarBall | 517 CreateTarBall |
| 481 } | 518 } |
| 482 | 519 |
| 520 #@ BuildSysrootARM64 |
| 521 #@ |
| 522 #@ Build everything and package it |
| 523 function BuildSysrootARM64() { |
| 524 ClearInstallDir |
| 525 local package_file="$BUILD_DIR/package_with_sha256sum_arm64" |
| 526 GeneratePackageListARM64 "$package_file" |
| 527 local files_and_sha256sums="$(cat ${package_file})" |
| 528 StripChecksumsFromPackageList "$package_file" |
| 529 VerifyPackageFilesMatch "$package_file" "$DEBIAN_DEP_LIST_ARM64" |
| 530 APT_REPO=${APR_REPO_ARM64:=$APT_REPO} |
| 531 InstallIntoSysroot ${files_and_sha256sums} |
| 532 CleanupJailSymlinks |
| 533 HacksAndPatchesARM64 |
| 534 CreateTarBall |
| 535 } |
| 536 |
| 537 |
| 483 #@ | 538 #@ |
| 484 #@ BuildSysrootMips | 539 #@ BuildSysrootMips |
| 485 #@ | 540 #@ |
| 486 #@ Build everything and package it | 541 #@ Build everything and package it |
| 487 BuildSysrootMips() { | 542 BuildSysrootMips() { |
| 488 ClearInstallDir | 543 ClearInstallDir |
| 489 local package_file="$BUILD_DIR/package_with_sha256sum_arm" | 544 local package_file="$BUILD_DIR/package_with_sha256sum_arm" |
| 490 GeneratePackageListMips "$package_file" | 545 GeneratePackageListMips "$package_file" |
| 491 local files_and_sha256sums="$(cat ${package_file})" | 546 local files_and_sha256sums="$(cat ${package_file})" |
| 492 StripChecksumsFromPackageList "$package_file" | 547 StripChecksumsFromPackageList "$package_file" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 UploadSysroot "$@" | 590 UploadSysroot "$@" |
| 536 } | 591 } |
| 537 | 592 |
| 538 #@ | 593 #@ |
| 539 #@ UploadSysrootARM <revision> | 594 #@ UploadSysrootARM <revision> |
| 540 #@ | 595 #@ |
| 541 UploadSysrootARM() { | 596 UploadSysrootARM() { |
| 542 UploadSysroot "$@" | 597 UploadSysroot "$@" |
| 543 } | 598 } |
| 544 | 599 |
| 600 #@ UploadSysrootARM64 <revision> |
| 601 #@ |
| 602 function UploadSysrootARM64() { |
| 603 UploadSysroot "$@" |
| 604 } |
| 605 |
| 545 #@ | 606 #@ |
| 546 #@ UploadSysrootMips <revision> | 607 #@ UploadSysrootMips <revision> |
| 547 #@ | 608 #@ |
| 548 UploadSysrootMips() { | 609 UploadSysrootMips() { |
| 549 UploadSysroot "$@" | 610 UploadSysroot "$@" |
| 550 } | 611 } |
| 551 | 612 |
| 552 #@ | 613 #@ |
| 553 #@ UploadSysrootAll <revision> | 614 #@ UploadSysrootAll <revision> |
| 554 #@ | 615 #@ |
| 555 #@ Upload sysroot image for all architectures | 616 #@ Upload sysroot image for all architectures |
| 556 UploadSysrootAll() { | 617 UploadSysrootAll() { |
| 557 RunCommand UploadSysrootAmd64 "$@" | 618 RunCommand UploadSysrootAmd64 "$@" |
| 558 RunCommand UploadSysrootI386 "$@" | 619 RunCommand UploadSysrootI386 "$@" |
| 559 RunCommand UploadSysrootARM "$@" | 620 RunCommand UploadSysrootARM "$@" |
| 621 RunCommand UploadSysrootARM64 "$@" |
| 560 RunCommand UploadSysrootMips "$@" | 622 RunCommand UploadSysrootMips "$@" |
| 561 } | 623 } |
| 562 | 624 |
| 563 # | 625 # |
| 564 # CheckForDebianGPGKeyring | 626 # CheckForDebianGPGKeyring |
| 565 # | 627 # |
| 566 # Make sure the Debian GPG keys exist. Otherwise print a helpful message. | 628 # Make sure the Debian GPG keys exist. Otherwise print a helpful message. |
| 567 # | 629 # |
| 568 CheckForDebianGPGKeyring() { | 630 CheckForDebianGPGKeyring() { |
| 569 if [ ! -e "$KEYRING_FILE" ]; then | 631 if [ ! -e "$KEYRING_FILE" ]; then |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 661 #@ | 723 #@ |
| 662 #@ UpdatePackageListsARM | 724 #@ UpdatePackageListsARM |
| 663 #@ | 725 #@ |
| 664 #@ Regenerate the package lists such that they contain an up-to-date | 726 #@ Regenerate the package lists such that they contain an up-to-date |
| 665 #@ list of URLs within the Debian archive. (For arm) | 727 #@ list of URLs within the Debian archive. (For arm) |
| 666 UpdatePackageListsARM() { | 728 UpdatePackageListsARM() { |
| 667 GeneratePackageListARM "$DEBIAN_DEP_LIST_ARM" | 729 GeneratePackageListARM "$DEBIAN_DEP_LIST_ARM" |
| 668 StripChecksumsFromPackageList "$DEBIAN_DEP_LIST_ARM" | 730 StripChecksumsFromPackageList "$DEBIAN_DEP_LIST_ARM" |
| 669 } | 731 } |
| 670 | 732 |
| 733 #@ UpdatePackageListsARM64 |
| 734 #@ |
| 735 #@ Regenerate the package lists such that they contain an up-to-date |
| 736 #@ list of URLs within the Debian archive. (For arm) |
| 737 function UpdatePackageListsARM64() { |
| 738 GeneratePackageListARM64 "$DEBIAN_DEP_LIST_ARM64" |
| 739 StripChecksumsFromPackageList "$DEBIAN_DEP_LIST_ARM64" |
| 740 } |
| 741 |
| 671 #@ | 742 #@ |
| 672 #@ UpdatePackageListsMips | 743 #@ UpdatePackageListsMips |
| 673 #@ | 744 #@ |
| 674 #@ Regenerate the package lists such that they contain an up-to-date | 745 #@ Regenerate the package lists such that they contain an up-to-date |
| 675 #@ list of URLs within the Debian archive. (For arm) | 746 #@ list of URLs within the Debian archive. (For arm) |
| 676 UpdatePackageListsMips() { | 747 UpdatePackageListsMips() { |
| 677 GeneratePackageListMips "$DEBIAN_DEP_LIST_MIPS" | 748 GeneratePackageListMips "$DEBIAN_DEP_LIST_MIPS" |
| 678 StripChecksumsFromPackageList "$DEBIAN_DEP_LIST_MIPS" | 749 StripChecksumsFromPackageList "$DEBIAN_DEP_LIST_MIPS" |
| 679 } | 750 } |
| 680 | 751 |
| 681 #@ | 752 #@ |
| 682 #@ UpdatePackageListsAll | 753 #@ UpdatePackageListsAll |
| 683 #@ | 754 #@ |
| 684 #@ Regenerate the package lists for all architectures. | 755 #@ Regenerate the package lists for all architectures. |
| 685 UpdatePackageListsAll() { | 756 UpdatePackageListsAll() { |
| 686 RunCommand UpdatePackageListsAmd64 | 757 RunCommand UpdatePackageListsAmd64 |
| 687 RunCommand UpdatePackageListsI386 | 758 RunCommand UpdatePackageListsI386 |
| 688 RunCommand UpdatePackageListsARM | 759 RunCommand UpdatePackageListsARM |
| 760 RunCommand UpdatePackageListsARM64 |
| 689 RunCommand UpdatePackageListsMips | 761 RunCommand UpdatePackageListsMips |
| 690 } | 762 } |
| 691 | 763 |
| 692 RunCommand() { | 764 RunCommand() { |
| 693 SetEnvironmentVariables "$1" | 765 SetEnvironmentVariables "$1" |
| 694 SanityCheck | 766 SanityCheck |
| 695 "$@" | 767 "$@" |
| 696 } | 768 } |
| 697 | 769 |
| 698 if [ $# -eq 0 ] ; then | 770 if [ $# -eq 0 ] ; then |
| 699 echo "ERROR: you must specify a mode on the commandline" | 771 echo "ERROR: you must specify a mode on the commandline" |
| 700 echo | 772 echo |
| 701 Usage | 773 Usage |
| 702 exit 1 | 774 exit 1 |
| 703 elif [ "$(type -t $1)" != "function" ]; then | 775 elif [ "$(type -t $1)" != "function" ]; then |
| 704 echo "ERROR: unknown function '$1'." >&2 | 776 echo "ERROR: unknown function '$1'." >&2 |
| 705 echo "For help, try:" | 777 echo "For help, try:" |
| 706 echo " $0 help" | 778 echo " $0 help" |
| 707 exit 1 | 779 exit 1 |
| 708 else | 780 else |
| 709 ChangeDirectory | 781 ChangeDirectory |
| 710 if echo $1 | grep -qs "All$"; then | 782 if echo $1 | grep -qs "All$"; then |
| 711 "$@" | 783 "$@" |
| 712 else | 784 else |
| 713 RunCommand "$@" | 785 RunCommand "$@" |
| 714 fi | 786 fi |
| 715 fi | 787 fi |
| OLD | NEW |