Index: build/linux/sysroot_scripts/sysroot-creator.sh |
diff --git a/build/linux/sysroot_scripts/sysroot-creator.sh b/build/linux/sysroot_scripts/sysroot-creator.sh |
index 9c30ce01742f573ed9210debab8be9c679904993..bfb05094230abada99f96e81d2483e2a574f3ab8 100644 |
--- a/build/linux/sysroot_scripts/sysroot-creator.sh |
+++ b/build/linux/sysroot_scripts/sysroot-creator.sh |
@@ -49,9 +49,6 @@ if [ -z "${DEBIAN_PACKAGES:-}" ]; then |
fi |
readonly REPO_BASEDIR="${APT_REPO}/dists/${DIST}" |
-readonly REPO_BASEDIR_ARM=${REPO_BASEDIR_ARM:=$REPO_BASEDIR} |
-readonly REPO_BASEDIR_ARM64=${REPO_BASEDIR_ARM64:=$REPO_BASEDIR} |
-readonly REPO_BASEDIR_MIPS=${REPO_BASEDIR_MIPS:=$REPO_BASEDIR} |
readonly HAS_ARCH_AMD64=${HAS_ARCH_AMD64:=0} |
readonly HAS_ARCH_I386=${HAS_ARCH_I386:=0} |
@@ -70,16 +67,6 @@ readonly RELEASE_FILE="Release" |
readonly RELEASE_FILE_GPG="Release.gpg" |
readonly RELEASE_LIST="${REPO_BASEDIR}/${RELEASE_FILE}" |
readonly RELEASE_LIST_GPG="${REPO_BASEDIR}/${RELEASE_FILE_GPG}" |
-readonly PACKAGE_FILE_AMD64="main/binary-amd64/Packages.${PACKAGES_EXT}" |
-readonly PACKAGE_FILE_I386="main/binary-i386/Packages.${PACKAGES_EXT}" |
-readonly PACKAGE_FILE_ARM="main/binary-armhf/Packages.${PACKAGES_EXT}" |
-readonly PACKAGE_FILE_ARM64="main/binary-arm64/Packages.${PACKAGES_EXT}" |
-readonly PACKAGE_FILE_MIPS="main/binary-mipsel/Packages.${PACKAGES_EXT}" |
-readonly PACKAGE_LIST_AMD64="${REPO_BASEDIR}/${PACKAGE_FILE_AMD64}" |
-readonly PACKAGE_LIST_I386="${REPO_BASEDIR}/${PACKAGE_FILE_I386}" |
-readonly PACKAGE_LIST_ARM="${REPO_BASEDIR_ARM}/${PACKAGE_FILE_ARM}" |
-readonly PACKAGE_LIST_ARM64="${REPO_BASEDIR_ARM64}/${PACKAGE_FILE_ARM64}" |
-readonly PACKAGE_LIST_MIPS="${REPO_BASEDIR_MIPS}/${PACKAGE_FILE_MIPS}" |
readonly DEBIAN_DEP_LIST_AMD64="packagelist.${DIST}.amd64" |
readonly DEBIAN_DEP_LIST_I386="packagelist.${DIST}.i386" |
@@ -206,58 +193,47 @@ ExtractPackageBz2() { |
fi |
} |
-GeneratePackageListAmd64() { |
+GeneratePackageListCommon() { |
local output_file="$1" |
- local package_list="${BUILD_DIR}/Packages.${DIST}_amd64.${PACKAGES_EXT}" |
- local tmp_package_list="${BUILD_DIR}/Packages.${DIST}_amd64" |
- DownloadOrCopy "${PACKAGE_LIST_AMD64}" "${package_list}" |
- VerifyPackageListing "${PACKAGE_FILE_AMD64}" "${package_list}" |
+ local arch="$2" |
+ local apt_repo="$3" |
+ local packages="$4" |
+ |
+ local repo_basedir="${apt_repo}/dists/${DIST}" |
+ local package_list="${BUILD_DIR}/Packages.${DIST}_${arch}.${PACKAGES_EXT}" |
+ local tmp_package_list="${BUILD_DIR}/Packages.${DIST}_${arch}" |
+ local package_file_arch="main/binary-${arch}/Packages.${PACKAGES_EXT}" |
+ local package_list_arch="${repo_basedir}/${package_file_arch}" |
+ |
+ DownloadOrCopy "${package_list_arch}" "${package_list}" |
+ VerifyPackageListing "${package_file_arch}" "${package_list}" |
ExtractPackageBz2 "$package_list" "$tmp_package_list" |
- GeneratePackageList "$tmp_package_list" "$output_file" "${DEBIAN_PACKAGES} |
+ GeneratePackageList "$tmp_package_list" "$output_file" "${packages}" |
+} |
+ |
+GeneratePackageListAmd64() { |
+ GeneratePackageListCommon "$1" amd64 ${APT_REPO} "${DEBIAN_PACKAGES} |
${DEBIAN_PACKAGES_X86:=} ${DEBIAN_PACKAGES_AMD64:=}" |
} |
GeneratePackageListI386() { |
- local output_file="$1" |
- local package_list="${BUILD_DIR}/Packages.${DIST}_i386.${PACKAGES_EXT}" |
- local tmp_package_list="${BUILD_DIR}/Packages.${DIST}_amd64" |
- DownloadOrCopy "${PACKAGE_LIST_I386}" "${package_list}" |
- VerifyPackageListing "${PACKAGE_FILE_I386}" "${package_list}" |
- ExtractPackageBz2 "$package_list" "$tmp_package_list" |
- GeneratePackageList "$tmp_package_list" "$output_file" "${DEBIAN_PACKAGES} |
+ GeneratePackageListCommon "$1" i386 ${APT_REPO} "${DEBIAN_PACKAGES} |
${DEBIAN_PACKAGES_X86:=}" |
} |
GeneratePackageListARM() { |
- local output_file="$1" |
- local package_list="${BUILD_DIR}/Packages.${DIST}_arm.${PACKAGES_EXT}" |
- local tmp_package_list="${BUILD_DIR}/Packages.${DIST}_arm" |
- DownloadOrCopy "${PACKAGE_LIST_ARM}" "${package_list}" |
- VerifyPackageListing "${PACKAGE_FILE_ARM}" "${package_list}" |
- ExtractPackageBz2 "$package_list" "$tmp_package_list" |
- GeneratePackageList "$tmp_package_list" "$output_file" "${DEBIAN_PACKAGES} |
- ${DEBIAN_PACKAGES_ARM:=}" |
+ GeneratePackageListCommon "$1" armhf ${APT_REPO_ARM:-${APT_REPO}} \ |
+ "${DEBIAN_PACKAGES} ${DEBIAN_PACKAGES_ARM:=}" |
} |
GeneratePackageListARM64() { |
- local output_file="$1" |
- local package_list="${BUILD_DIR}/Packages.${DIST}_arm64.${PACKAGES_EXT}" |
- local tmp_package_list="${BUILD_DIR}/Packages.${DIST}_arm64" |
- DownloadOrCopy "${PACKAGE_LIST_ARM64}" "${package_list}" |
- VerifyPackageListing "${PACKAGE_FILE_ARM64}" "${package_list}" |
- ExtractPackageBz2 "$package_list" "$tmp_package_list" |
- GeneratePackageList "$tmp_package_list" "$output_file" "${DEBIAN_PACKAGES} |
- ${DEBIAN_PACKAGES_ARM64:=}" |
+ GeneratePackageListCommon "$1" arm64 ${APT_REPO_ARM64:-${APT_REPO}} \ |
+ "${DEBIAN_PACKAGES} ${DEBIAN_PACKAGES_ARM64:=}" |
} |
GeneratePackageListMips() { |
- local output_file="$1" |
- local package_list="${BUILD_DIR}/Packages.${DIST}_mips.${PACKAGES_EXT}" |
- local tmp_package_list="${BUILD_DIR}/Packages.${DIST}_mips" |
- DownloadOrCopy "${PACKAGE_LIST_MIPS}" "${package_list}" |
- VerifyPackageListing "${PACKAGE_FILE_MIPS}" "${package_list}" |
- ExtractPackageBz2 "$package_list" "$tmp_package_list" |
- GeneratePackageList "$tmp_package_list" "$output_file" "${DEBIAN_PACKAGES}" |
+ GeneratePackageListCommon "$1" mipsel ${APT_REPO_MIPS:-${APT_REPO}} \ |
+ "${DEBIAN_PACKAGES}" |
} |
StripChecksumsFromPackageList() { |
@@ -784,7 +760,7 @@ UpdatePackageListsARM() { |
#@ UpdatePackageListsARM64 |
#@ |
#@ Regenerate the package lists such that they contain an up-to-date |
-#@ list of URLs within the Debian archive. (For arm) |
+#@ list of URLs within the Debian archive. (For arm64) |
UpdatePackageListsARM64() { |
if [ "$HAS_ARCH_ARM64" = "0" ]; then |
return |
@@ -797,7 +773,7 @@ UpdatePackageListsARM64() { |
#@ UpdatePackageListsMips |
#@ |
#@ Regenerate the package lists such that they contain an up-to-date |
-#@ list of URLs within the Debian archive. (For arm) |
+#@ list of URLs within the Debian archive. (For mips) |
UpdatePackageListsMips() { |
if [ "$HAS_ARCH_MIPS" = "0" ]; then |
return |