FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 03-08-2009, 05:16 AM
Allan McRae
 
Default Checking for VSC/SCM tools in makepkg

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.


Allan




_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://www.archlinux.org/mailman/listinfo/pacman-dev
 
Old 03-09-2009, 06:59 AM
Xavier
 
Default Checking for VSC/SCM tools in makepkg

On Sun, Mar 8, 2009 at 7:16 AM, Allan McRae <allan@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.
_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://www.archlinux.org/mailman/listinfo/pacman-dev
 
Old 03-09-2009, 07:36 AM
Allan McRae
 
Default Checking for VSC/SCM tools in makepkg

Xavier wrote:

On Sun, Mar 8, 2009 at 7:16 AM, Allan McRae <allan@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


_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://www.archlinux.org/mailman/listinfo/pacman-dev
 
Old 03-09-2009, 10:08 PM
Xavier
 
Default Checking for VSC/SCM tools in makepkg

On Mon, Mar 9, 2009 at 9:36 AM, Allan McRae <allan@archlinux.org> wrote:
>
> 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)
>

I see, but in any cases, we won't be able to display this message
where it is now :
> ==> Making package: notify-sharp-svn 3009-2 i686 (Mon Mar 9 08:23:02 UTC
unless we either remove the version, or move this message after
installing missing dependencies (could look weird).

Here are the other things that happen between the current devel_check
and the missing deps install, which relies on $pkgver :
1) check of an existing package (and install with -i)
2) creation of the source package

For 2, I don't see why it would be needed to bump the pkgver to the last one.
For 1, it might be ok to not bump it either. This would make us aware
that there is already a package built for the pkgver in the pkgbuild,
so that we might want to just install that one. Otherwise, we can
force with -f, which may or may not result in a different $pkgver
after devel_update or devel_check, but well, that's what --holdver is
for.

So it seems doable to delay devel_check, having the three points above in mind.

>
> 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?
>

Ahah.
What about [ ${#source[@]} -eq 0 ] && return 0 at the top of check_checksums ?
_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://www.archlinux.org/mailman/listinfo/pacman-dev
 
Old 03-09-2009, 10:37 PM
Allan McRae
 
Default Checking for VSC/SCM tools in makepkg

Xavier wrote:

On Mon, Mar 9, 2009 at 9:36 AM, Allan McRae <allan@archlinux.org> wrote:


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)




I see, but in any cases, we won't be able to display this message
where it is now :


==> Making package: notify-sharp-svn 3009-2 i686 (Mon Mar 9 08:23:02 UTC


unless we either remove the version, or move this message after
installing missing dependencies (could look weird).

Here are the other things that happen between the current devel_check
and the missing deps install, which relies on $pkgver :
1) check of an existing package (and install with -i)
2) creation of the source package

For 2, I don't see why it would be needed to bump the pkgver to the last one.
For 1, it might be ok to not bump it either. This would make us aware
that there is already a package built for the pkgver in the pkgbuild,
so that we might want to just install that one. Otherwise, we can
force with -f, which may or may not result in a different $pkgver
after devel_update or devel_check, but well, that's what --holdver is
for.

So it seems doable to delay devel_check, having the three points above in mind.





I am going to file a bug report so I do not forget about this. Given we
may have a release soon, I don't think I want to make all the changes
that this would require at the current time.




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?




Ahah.
What about [ ${#source[@]} -eq 0 ] && return 0 at the top of check_checksums ?


That would be a good solution. I can patch this up later. I have never
actually looked at the check_checksums function before...




_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://www.archlinux.org/mailman/listinfo/pacman-dev
 

Thread Tools




All times are GMT. The time now is 07:07 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org