[pacman-dev] [PATCH] Make "makepkg -g" ignore the current architecture.
makepkg -g no longer works on PKGBUILDs which do not include the current architecture due to a change in the 4.2.1 -> 5.0.0 cycle. I'm not sure how to approach the fix, so I've just made "makepkg -g" set the IGNOREARCH flag. Is this a reasonable approach? The other option that I considered would be to move lint_pkgbuild to after GENINTEG is processed, but I think that having some sanity checking on the PKGBUILD's source array before downloading the sources would be helpful? On a related note, is there any tests for makepkg? I couldn't see any, but I may have missed something obvious. If so, then I could try to make a test for this case to ensure that it doesn't break again in the future.
Commit 663c74150ab4ba6d3adc55b0e3f539557a16e352 (makepkg: merge arch dependent variables after PKGBUILD linting) broke "makepkg -g" on a PKGBUILD which did not include the current architecture, by moving the lint_pkgbuild call before GENINTEG was processed. Fix that by setting IGNOREARCH for the "-g" option. --- scripts/makepkg.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 80b95f4..f9eb888 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1803,7 +1803,7 @@ while true; do -e|--noextract) NOEXTRACT=1 ;; -f|--force) FORCE=1 ;; -F) INFAKEROOT=1 ;; - -g|--geninteg) GENINTEG=1 ;; + -g|--geninteg) GENINTEG=1 IGNOREARCH=1;; --holdver) HOLDVER=1 ;; -i|--install) INSTALL=1 ;; --key) shift; GPGKEY=$1 ;; -- 2.7.0
On 06/02/16 17:54, Alastair Hughes wrote:
Commit 663c74150ab4ba6d3adc55b0e3f539557a16e352 (makepkg: merge arch dependent variables after PKGBUILD linting) broke "makepkg -g" on a PKGBUILD which did not include the current architecture, by moving the lint_pkgbuild call before GENINTEG was processed. Fix that by setting IGNOREARCH for the "-g" option. --- scripts/makepkg.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 80b95f4..f9eb888 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1803,7 +1803,7 @@ while true; do -e|--noextract) NOEXTRACT=1 ;; -f|--force) FORCE=1 ;; -F) INFAKEROOT=1 ;; - -g|--geninteg) GENINTEG=1 ;;
Committed to my patchqueue branch with and added commit: # generating integrity checks does not depend on architecture
+ -g|--geninteg) GENINTEG=1 IGNOREARCH=1;; --holdver) HOLDVER=1 ;; -i|--install) INSTALL=1 ;; --key) shift; GPGKEY=$1 ;;
On 06/02/16 17:54, Alastair Hughes wrote:
makepkg -g no longer works on PKGBUILDs which do not include the current architecture due to a change in the 4.2.1 -> 5.0.0 cycle. I'm not sure how to approach the fix, so I've just made "makepkg -g" set the IGNOREARCH flag. Is this a reasonable approach?
I need to mull this over some more... but I am leaning towards yes.
The other option that I considered would be to move lint_pkgbuild to after GENINTEG is processed, but I think that having some sanity checking on the PKGBUILD's source array before downloading the sources would be helpful?
I agree - nothing should be done with a PKGBUILD that fails the checking.
On a related note, is there any tests for makepkg? I couldn't see any, but I may have missed something obvious. If so, then I could try to make a test for this case to ensure that it doesn't break again in the future.
There are no test cases. I started looking at this once, but was never sure how to best implement it. This is definitely something I want added if you are volunteering! Allan
participants (2)
-
Alastair Hughes
-
Allan McRae