From 82aa6334278712f09b7eed252967727e1a61de30 Mon Sep 17 00:00:00 2001 From: Fernando Basso Date: Sat, 27 Feb 2016 08:24:38 -0300 Subject: [PATCH] Don't use --pkg option with makepkg This argument was removed from makepkg with the release of Pacman 5.0. When a PKGBUILD containing a split package is built, all packages contained therein are built. Links: - https://lists.archlinux.org/pipermail/pacman-dev/2015-September/020353.html - https://projects.archlinux.org/pacman.git/commit/scripts/makepkg.sh.in?id=169287e494a5348687260a00697be06b36ba4434 Note: when --install is used, all packages are installed. Users that don't want this are advised to build with aurget -Sb and install what they want with pacman -U directly. We could potentially simplify further, but removing this option should fix the current bug of aurget not working at all with the latest Pacman version. --- aurget | 4 +-- test/build.t | 19 ++++++------ .../exit_code | 1 + .../a4d1de35e646de96e95c53af5bea2678/stderr | 29 +++++++++++++++++++ .../a4d1de35e646de96e95c53af5bea2678/stdout | 8 +++++ 5 files changed, 50 insertions(+), 11 deletions(-) create mode 100644 test/fixtures/makepkg/a4d1de35e646de96e95c53af5bea2678/exit_code create mode 100644 test/fixtures/makepkg/a4d1de35e646de96e95c53af5bea2678/stderr create mode 100644 test/fixtures/makepkg/a4d1de35e646de96e95c53af5bea2678/stdout diff --git a/aurget b/aurget index 7bc56e3..f1fdd88 100755 --- a/aurget +++ b/aurget @@ -657,9 +657,9 @@ build_target() { if prompt_to_edit "$pkgbase" './PKGBUILD' 'building'; then if (( ${target_deps[$pkgbase]} )); then - buildpkg --pkg "${targets[$pkgbase]}" --asdeps || die "dependency package $pkgbase failed to build, aborting" + buildpkg --asdeps || die "dependency package $pkgbase failed to build, aborting" else - buildpkg --pkg "${targets[$pkgbase]}" || { ret=1; warn "package $pkgbase failed to build, skipping"; } + buildpkg || { ret=1; warn "package $pkgbase failed to build, skipping"; } fi fi diff --git a/test/build.t b/test/build.t index bafc87a..6db20b1 100644 --- a/test/build.t +++ b/test/build.t @@ -10,13 +10,15 @@ Building the package for aurget Proceed with installation? [Y/n] Y :: Retrieving taurball from AUR... :: Building package... - install -Dm755 aurget /tmp/cramtests-BIZOuT/build.t/aurget/pkg/aurget//usr/bin/aurget - install -Dm644 aurgetrc /tmp/cramtests-BIZOuT/build.t/aurget/pkg/aurget//usr/share/doc/aurget/samples/aurgetrc - install -Dm644 doc/aurget.1 /tmp/cramtests-BIZOuT/build.t/aurget/pkg/aurget//usr/share/man/man1/aurget.1 - install -Dm644 doc/aurgetrc.5 /tmp/cramtests-BIZOuT/build.t/aurget/pkg/aurget//usr/share/man/man5/aurgetrc.5 - install -Dm644 completion/bash /tmp/cramtests-BIZOuT/build.t/aurget/pkg/aurget//usr/share/bash-completion/completions/aurget - install -Dm644 completion/zsh /tmp/cramtests-BIZOuT/build.t/aurget/pkg/aurget//usr/share/zsh/site-functions/_aurget - ==> Making package: aurget 4.6.0-1 (Mon Feb 29 22:16:01 GMT 2016) + make[1]: Entering directory '/tmp/cramtests-q1oEQU/build.t/aurget/src/aurget-4.6.0' + install -Dm755 aurget /tmp/cramtests-q1oEQU/build.t/aurget/pkg/aurget//usr/bin/aurget + install -Dm644 aurgetrc /tmp/cramtests-q1oEQU/build.t/aurget/pkg/aurget//usr/share/doc/aurget/samples/aurgetrc + install -Dm644 doc/aurget.1 /tmp/cramtests-q1oEQU/build.t/aurget/pkg/aurget//usr/share/man/man1/aurget.1 + install -Dm644 doc/aurgetrc.5 /tmp/cramtests-q1oEQU/build.t/aurget/pkg/aurget//usr/share/man/man5/aurgetrc.5 + install -Dm644 completion/bash /tmp/cramtests-q1oEQU/build.t/aurget/pkg/aurget//usr/share/bash-completion/completions/aurget + install -Dm644 completion/zsh /tmp/cramtests-q1oEQU/build.t/aurget/pkg/aurget//usr/share/zsh/site-functions/_aurget + make[1]: Leaving directory '/tmp/cramtests-q1oEQU/build.t/aurget/src/aurget-4.6.0' + ==> Making package: aurget 4.6.0-1 (Tue Mar 1 16:48:32 GMT 2016) ==> Checking runtime dependencies... ==> Checking buildtime dependencies... ==> Retrieving sources... @@ -28,7 +30,6 @@ Building the package for aurget * (glob) * (glob) * (glob) - * (glob) ==> Validating source files with md5sums... v4.6.0.tar.gz ... Passed ==> Extracting sources... @@ -48,4 +49,4 @@ Building the package for aurget -> Generating .MTREE file... -> Compressing package... ==> Leaving fakeroot environment. - ==> Finished making: aurget 4.6.0-1 (Mon Feb 29 22:16:03 GMT 2016) + ==> Finished making: aurget 4.6.0-1 (Tue Mar 1 16:48:33 GMT 2016) diff --git a/test/fixtures/makepkg/a4d1de35e646de96e95c53af5bea2678/exit_code b/test/fixtures/makepkg/a4d1de35e646de96e95c53af5bea2678/exit_code new file mode 100644 index 0000000..573541a --- /dev/null +++ b/test/fixtures/makepkg/a4d1de35e646de96e95c53af5bea2678/exit_code @@ -0,0 +1 @@ +0 diff --git a/test/fixtures/makepkg/a4d1de35e646de96e95c53af5bea2678/stderr b/test/fixtures/makepkg/a4d1de35e646de96e95c53af5bea2678/stderr new file mode 100644 index 0000000..eed008f --- /dev/null +++ b/test/fixtures/makepkg/a4d1de35e646de96e95c53af5bea2678/stderr @@ -0,0 +1,29 @@ +==> Making package: aurget 4.6.0-1 (Tue Mar 1 16:48:32 GMT 2016) +==> Checking runtime dependencies... +==> Checking buildtime dependencies... +==> Retrieving sources... + -> Downloading v4.6.0.tar.gz... + % Total % Received % Xferd Average Speed Time Time Time Current + Dload Upload Total Spent Left Speed + 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 123 0 123 0 0 1356 0 --:--:-- --:--:-- --:--:-- 1366 + 100 34034 0 34034 0 0 135k 0 --:--:-- --:--:-- --:--:-- 135k +==> Validating source files with md5sums... + v4.6.0.tar.gz ... Passed +==> Extracting sources... + -> Extracting v4.6.0.tar.gz with bsdtar +==> Entering fakeroot environment... +==> Starting package()... +==> Tidying install... + -> Removing libtool files... + -> Purging unwanted files... + -> Removing static library files... + -> Stripping unneeded symbols from binaries and libraries... + -> Compressing man and info pages... +==> Checking for packaging issue... +==> Creating package "aurget"... + -> Generating .PKGINFO file... + -> Generating .BUILDINFO file... + -> Generating .MTREE file... + -> Compressing package... +==> Leaving fakeroot environment. +==> Finished making: aurget 4.6.0-1 (Tue Mar 1 16:48:33 GMT 2016) diff --git a/test/fixtures/makepkg/a4d1de35e646de96e95c53af5bea2678/stdout b/test/fixtures/makepkg/a4d1de35e646de96e95c53af5bea2678/stdout new file mode 100644 index 0000000..eb414ba --- /dev/null +++ b/test/fixtures/makepkg/a4d1de35e646de96e95c53af5bea2678/stdout @@ -0,0 +1,8 @@ +make[1]: Entering directory '/tmp/cramtests-q1oEQU/build.t/aurget/src/aurget-4.6.0' +install -Dm755 aurget /tmp/cramtests-q1oEQU/build.t/aurget/pkg/aurget//usr/bin/aurget +install -Dm644 aurgetrc /tmp/cramtests-q1oEQU/build.t/aurget/pkg/aurget//usr/share/doc/aurget/samples/aurgetrc +install -Dm644 doc/aurget.1 /tmp/cramtests-q1oEQU/build.t/aurget/pkg/aurget//usr/share/man/man1/aurget.1 +install -Dm644 doc/aurgetrc.5 /tmp/cramtests-q1oEQU/build.t/aurget/pkg/aurget//usr/share/man/man5/aurgetrc.5 +install -Dm644 completion/bash /tmp/cramtests-q1oEQU/build.t/aurget/pkg/aurget//usr/share/bash-completion/completions/aurget +install -Dm644 completion/zsh /tmp/cramtests-q1oEQU/build.t/aurget/pkg/aurget//usr/share/zsh/site-functions/_aurget +make[1]: Leaving directory '/tmp/cramtests-q1oEQU/build.t/aurget/src/aurget-4.6.0'