diff --git a/doc/makepkg.8.txt b/doc/makepkg.8.txt index a065b795..42abceae 100644 --- a/doc/makepkg.8.txt +++ b/doc/makepkg.8.txt @@ -37,9 +37,10 @@ your logs and output are not localized. Options ------- *-A, \--ignorearch*:: - Ignore a missing or incomplete arch field in the build script. This is - for rebuilding packages from source when the PKGBUILD may be slightly - outdated and not updated with an `arch=('yourarch')` field. + Ignore a missing or incomplete arch field in the build script, when + building packages. This is for rebuilding packages from source when + the PKGBUILD may be slightly outdated and not updated with an `arch=('yourarch')` + field. Act on all available arches, when performing other actions. *-c, \--clean*:: Clean up leftover work files and directories after a successful build. @@ -66,7 +67,8 @@ Options if required and perform the integrity checks. No extraction or build is performed. Dependencies specified in the PKGBUILD will not be handled unless `--syncdeps` is used. Useful for performing subsequent offline - builds. + builds. When `--ignorearch` is used, verify all split arch sources instead + of just the sources for the current arch. *-f, \--force*:: makepkg will not build a package if a built package already exists in @@ -201,7 +203,8 @@ Options *\--packagelist*:: List the package filenames that would be produced without building. Listed - package filenames include PKGDEST and PKGEXT. + package filenames include PKGDEST and PKGEXT. When `--ignorearch` is used, + list filenames for all supported arches. *\--printsrcinfo*:: Generate and print the SRCINFO file to stdout. diff --git a/scripts/libmakepkg/util/pkgbuild.sh.in b/scripts/libmakepkg/util/pkgbuild.sh.in index 2db46f1f..e23208c3 100644 --- a/scripts/libmakepkg/util/pkgbuild.sh.in +++ b/scripts/libmakepkg/util/pkgbuild.sh.in @@ -182,11 +182,17 @@ print_all_package_names() { local version=$(get_full_version) local architecture pkg opts a for pkg in ${pkgname[@]}; do - architecture=$(get_pkg_arch $pkg) - printf "%s/%s-%s-%s%s\n" "$PKGDEST" "$pkg" "$version" "$architecture" "$PKGEXT" - if check_option "debug" "y" && check_option "strip" "y"; then - printf "%s/%s-%s-%s-%s%s\n" "$PKGDEST" "$pkg" "@DEBUGSUFFIX@" "$version" "$architecture" "$PKGEXT" + if (( IGNOREARCH )); then + get_pkgbuild_attribute "$pkg" 'arch' 1 architecture + else + architecture=$(get_pkg_arch $pkg) fi + for a in "${architecture[@]}"; do + printf "%s/%s-%s-%s%s\n" "$PKGDEST" "$pkg" "$version" "$a" "$PKGEXT" + if check_option "debug" "y" && check_option "strip" "y"; then + printf "%s/%s-%s-%s-%s%s\n" "$PKGDEST" "$pkg" "@DEBUGSUFFIX@" "$version" "$a" "$PKGEXT" + fi + done done } diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index bc2d0061..584c10a8 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1262,7 +1262,7 @@ while true; do --nosign) SIGNPKG='n' ;; -o|--nobuild) NOBUILD=1 ;; -p) shift; BUILDFILE=$1 ;; - --packagelist) PACKAGELIST=1 IGNOREARCH=1;; + --packagelist) PACKAGELIST=1 ;; --printsrcinfo) PRINTSRCINFO=1 IGNOREARCH=1;; -r|--rmdeps) RMDEPS=1 ;; -R|--repackage) REPKG=1 ;; @@ -1631,8 +1631,13 @@ if (( !REPKG )); then if (( NOEXTRACT && ! VERIFYSOURCE )); then warning "$(gettext "Using existing %s tree")" "\$srcdir/" else - download_sources - check_source_integrity + if (( VERIFYSOURCE && IGNOREARCH )); then + download_sources allarch + check_source_integrity all + else + download_sources + check_source_integrity + fi (( VERIFYSOURCE )) && exit $E_OK if (( CLEANBUILD )); then