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

Allan McRae allan at archlinux.org
Mon Mar 9 04:36:33 EDT 2009


Xavier wrote:
> 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.

Yeah, I was just wondering if the devel_check should come after the 
installation of deps and makedeps so that if a VCS tool is missing, we 
can make it an error.  At the moment, we can not update the pkgver 
during the first devel_check.  So you end up with issues like this:

==> Making package: notify-sharp-svn 3009-2 i686 (Mon Mar  9 08:23:02 
UTC 2009)
...
==> Installing missing dependencies...
(subversion)
==> Entering fakeroot environment...
==> Determining latest svn revision...
  -> Version found: 3032
(note the different version there and how --forcever does not seem to 
have been used/work)
...
==> Finished making: notify-sharp-svn 3009-2 i686 (Mon Mar  9 08:25:36 
UTC 2009)


Hmmm..... while testing this I noticed this:
==> Validating source files with md5sums...
==> Validating source files with sha1sums...
==> Validating source files with sha256sums...
==> Validating source files with sha384sums...
==> Validating source files with sha512sums...

Note that svn packages tend to have "md5sums=()" in the PKGBUILD.  I 
wonder if that is still an issue?

Allan




More information about the pacman-dev mailing list