Fork of Arch Linux devtools from https://git.archlinux.org/devtools.git
Go to file
Dave Reisner 2d79191c97 commitpkg: behavior more sanely in searching for built pkgs
In the case of a .pkg.tar.xz and a .pkg.tar.gz existing in the same
directory, all commitpkg would say is:

  ==> WARNING: Could not find . Skipping x86_64

Upon digging into the logic, we did a few things poorly, mostly in
getpkgfile:

- getpkgfile tried to die in a subshell (within the command substituion
  assignment to 'pkgfile'). This will never work.
- We assumed that proper glob expansion happened when we received
  exactly 1 arg. This isn't necessarily true without nullglob in effect.
- We dumped the real error (spewed by getpkgfile) to /dev/null.
- We checked for the package twice in both $PWD and $DESTDIR/.
- We checked for file existance multiple times.

Address this by:

- not hiding errors. revamp the wording a little bit to make it more
  obvious why we failed, particularly in the case of a glob expanding to
  more than 1 file. Logic here is simplified to pointing out the failure
  cases of 0 and >1.
- setting nullglob so the number of arguments passed into getpkgfile is
  meaningful from a 'did it decisively resolve' point of view.
- not trying to exit the entire script from a subshell. Just return a
  value (and use it).
- avoiding the package file existance check afterwards. this is a
  freebie from getpkgfile when the glob passed fails to expand.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-01-18 11:06:51 +01:00
lib lib/common.sh: Revise setup_workdir() 2011-11-04 19:34:00 +01:00
.gitignore add libdepends script 2011-10-31 22:57:12 +01:00
Makefile prepare release 2012-01-14 20:25:43 +01:00
archbuild.in archbuild: exec makechrootpkg to preserve exit value 2011-12-04 18:13:13 +01:00
archco.in Use double brackets everywhere 2011-12-04 18:00:57 +01:00
archrelease.in Capitalize output messages 2011-11-04 19:33:29 +01:00
archrm.in Use double brackets everywhere 2011-12-04 18:00:57 +01:00
bash_completion.in Support non-standard install locations 2011-10-07 21:53:02 +02:00
checkpkg.in Move common functions to a shared file 2011-11-01 15:33:08 +01:00
commitpkg.in commitpkg: behavior more sanely in searching for built pkgs 2012-01-18 11:06:51 +01:00
find-libdeps.in Use double brackets everywhere 2011-12-04 18:00:57 +01:00
finddeps.in Move common functions to a shared file 2011-11-01 15:33:08 +01:00
lddd.in Use #!/bin/bash instead of #!/bin/sh 2011-12-20 23:05:38 +01:00
makechrootpkg.in makearchroot: source /etc/profile before building 2011-12-04 18:04:47 +01:00
makepkg-i686.conf Apply pacman 4.0 changes to our copies of makepkg.conf and pacman.conf 2011-10-14 09:09:46 +02:00
makepkg-x86_64.conf Apply pacman 4.0 changes to our copies of makepkg.conf and pacman.conf 2011-10-14 09:09:46 +02:00
mkarchroot.in mkarchroot: do not create /etc/mtab 2011-12-20 23:05:44 +01:00
pacman-extra.conf archbuild: Always use recent makepkg.conf and pacman.conf; Run namcap by default 2011-11-06 10:32:55 +01:00
pacman-gnome-unstable.conf Add support for kde-unstable and gnome-unstable 2011-12-04 17:48:46 +01:00
pacman-kde-unstable.conf Add support for kde-unstable and gnome-unstable 2011-12-04 17:48:46 +01:00
pacman-multilib-staging.conf Add support for multilib-staging 2012-01-14 20:22:26 +01:00
pacman-multilib-testing.conf Disable pacman's CheckSpace option as it fails within a chroot 2011-10-14 10:16:55 +02:00
pacman-multilib.conf archbuild: Always use recent makepkg.conf and pacman.conf; Run namcap by default 2011-11-06 10:32:55 +01:00
pacman-staging.conf Disable pacman's CheckSpace option as it fails within a chroot 2011-10-14 10:16:55 +02:00
pacman-testing.conf Disable pacman's CheckSpace option as it fails within a chroot 2011-10-14 10:16:55 +02:00
rebuildpkgs.in Use double brackets everywhere 2011-12-04 18:00:57 +01:00
zsh_completion.in Add support for multilib-staging 2012-01-14 20:22:26 +01:00