[pacman-dev] Checking for VSC/SCM tools in makepkg

Xavier shiningxc at gmail.com
Mon Mar 9 03:59:28 EDT 2009

On Sun, Mar 8, 2009 at 7:16 AM, Allan McRae <allan at archlinux.org> wrote:
> Hi,
> Am I missing something here or should these sorts of tests cause a failure:
> devel_check() {
> ...
>       # Also do a brief check to make sure we have the VCS tool available.
> ...
>           [ $(type -p darcs) ] || return 0
> ...
>           [ $(type -p svn) ] || return 0
> etc.
> At the moment, these tests just seem useless to me.  Making this an error
> would require a decent change in makepkg as at the moment devel_check() is
> called before dependency resolution is done.   In fact, I don't think I have
> ever managed to build an SCM package in a clean chroot and this may be the
> cause.
> If no-one points out something obvious I am missing, then I will file a bug
> report so this is not forgotten.

A SCM package should have correct makedepends anyway.
Let's take a svn package, without svn makedepends. With a makepkg
without devel_check, it would have failed in the build() function of
the pkgbuild, where svn is called.
With a makepkg with devel_check and without the above tests, it would
fail in devel_check.
So a mistake in the PKGBUILD (lack of makedepends=svn) would result in
a failure in a makepkg internal function (devel_check) rather than in
the pkgbuild build() function.

More information about the pacman-dev mailing list