[gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in net-misc/bti: bti-007.ebuild ChangeLog metadata.xml Manifest

2008-10-26 Thread Thomas Anderson
On Sun, Oct 26, 2008 at 05:22:26PM +, Greg Kroah-Hartman (gregkh) wrote:
 # Copyright 1999-2008 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/net-misc/bti/bti-007.ebuild,v 1.1 
 2008/10/26 17:22:26 gregkh Exp $
 
 RDEPEND=${DEPEND}
 
 src_compile() {
   emake || die emake failed
 }
This is the default src_compile.
 
 src_install() {
   doman bti.1
   dobin bti
   dodoc bti.example README RELEASE-NOTES
 }
You really should have some or all of these functions die on failure.
Since that's all the ebuild installs, the package is completely
nonfunctional if bti is not installed(I'd die on all three but you don't
have to die on the last one).


pgp9ukcpiV2Fc.pgp
Description: PGP signature


[gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in net-misc/bti: bti-007.ebuild ChangeLog metadata.xml Manifest

2008-10-26 Thread Greg KH
On Sun, Oct 26, 2008 at 01:36:29PM -0400, Thomas Anderson wrote:
 On Sun, Oct 26, 2008 at 05:22:26PM +, Greg Kroah-Hartman (gregkh) wrote:
  # Copyright 1999-2008 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  # $Header: /var/cvsroot/gentoo-x86/net-misc/bti/bti-007.ebuild,v 1.1 
  2008/10/26 17:22:26 gregkh Exp $
  
  RDEPEND=${DEPEND}
  
  src_compile() {
  emake || die emake failed
  }
 This is the default src_compile.

Ah, thanks, I should just drop this then.

  src_install() {
  doman bti.1
  dobin bti
  dodoc bti.example README RELEASE-NOTES
  }
 You really should have some or all of these functions die on failure.

Why would any of these fail if the src_compile succeeded?

And, for some reason I thought that the default was that if there was an
error in them, they would die on their own.  Is that not the case?

 Since that's all the ebuild installs, the package is completely
 nonfunctional if bti is not installed(I'd die on all three but you don't
 have to die on the last one).

Might as well be consistent :)

thanks for the review,

greg k-h



Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in net-misc/bti: bti-007.ebuild ChangeLog metadata.xml Manifest

2008-10-26 Thread Thomas Sachau
Greg KH schrieb:
 src_install() {
 doman bti.1
 dobin bti
 dodoc bti.example README RELEASE-NOTES
 }
 You really should have some or all of these functions die on failure.
 
 Why would any of these fail if the src_compile succeeded?

What happens, if upstream changes the name of the binary on version bump or 
changes the compile
output location?

 
 And, for some reason I thought that the default was that if there was an
 error in them, they would die on their own.  Is that not the case?

Sadly not. Some functions do die (like epatch or econf), others do not (like 
emake, dobin,
doman). If i remember correctly, those that are external functions do die, 
the others do not.


-- 
Thomas Sachau

Gentoo Linux Developer



signature.asc
Description: OpenPGP digital signature


[gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in net-misc/bti: bti-007.ebuild ChangeLog metadata.xml Manifest

2008-10-26 Thread Thomas Anderson
On Sun, Oct 26, 2008 at 02:58:02PM -0700, Greg KH wrote:
 On Sun, Oct 26, 2008 at 01:36:29PM -0400, Thomas Anderson wrote:
  On Sun, Oct 26, 2008 at 05:22:26PM +, Greg Kroah-Hartman (gregkh) wrote:
   src_install() {
 doman bti.1
 dobin bti
 dodoc bti.example README RELEASE-NOTES
   }
  You really should have some or all of these functions die on failure.
 
 Why would any of these fail if the src_compile succeeded?
Succeeded and Not error out are different. Src_compile could not
error out but still not produce the executables/produce an executable
with a different name. Either way you end up with a broken installation
of bti.
 And, for some reason I thought that the default was that if there was an
 error in them, they would die on their own.  Is that not the case?
No, they don't die on their own. As far as I know, very few ebuild
functions do. Econf does, and epatch does as well. I'll look into
writing up a list of which functions die and which don't though, for
convenience.


pgptdpnKyJ2V9.pgp
Description: PGP signature


Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in net-misc/bti: bti-007.ebuild ChangeLog metadata.xml Manifest

2008-10-26 Thread Greg KH
On Sun, Oct 26, 2008 at 11:17:14PM +0100, Thomas Sachau wrote:
 Greg KH schrieb:
  src_install() {
doman bti.1
dobin bti
dodoc bti.example README RELEASE-NOTES
  }
  You really should have some or all of these functions die on failure.
  
  Why would any of these fail if the src_compile succeeded?
 
 What happens, if upstream changes the name of the binary on version
 bump or changes the compile output location?

Then I will go and swat upstream upside the head for not realizing that
he also needed to fix the ebuild when he bumbed the version :)

(hint, upstream and me are the same...)

thanks,

greg k-h



[gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in net-misc/bti: bti-007.ebuild ChangeLog metadata.xml Manifest

2008-10-26 Thread Greg KH
On Sun, Oct 26, 2008 at 06:29:13PM -0400, Thomas Anderson wrote:
 On Sun, Oct 26, 2008 at 02:58:02PM -0700, Greg KH wrote:
  On Sun, Oct 26, 2008 at 01:36:29PM -0400, Thomas Anderson wrote:
   On Sun, Oct 26, 2008 at 05:22:26PM +, Greg Kroah-Hartman (gregkh) 
   wrote:
src_install() {
doman bti.1
dobin bti
dodoc bti.example README RELEASE-NOTES
}
   You really should have some or all of these functions die on failure.
  
  Why would any of these fail if the src_compile succeeded?
 Succeeded and Not error out are different. Src_compile could not
 error out but still not produce the executables/produce an executable
 with a different name. Either way you end up with a broken installation
 of bti.
  And, for some reason I thought that the default was that if there was an
  error in them, they would die on their own.  Is that not the case?
 No, they don't die on their own. As far as I know, very few ebuild
 functions do. Econf does, and epatch does as well. I'll look into
 writing up a list of which functions die and which don't though, for
 convenience.

Ok, thanks for the information, I appreciate it.

greg k-h