public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] skel.ebuild cosmetics (move RESTRICT after DEPEND)
@ 2012-05-06 21:47 Samuli Suominen
  2012-05-06 21:56 ` Michael Sterrett
  2012-05-06 22:27 ` Ulrich Mueller
  0 siblings, 2 replies; 9+ messages in thread
From: Samuli Suominen @ 2012-05-06 21:47 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 289 bytes --]

If you `vim foo.ebuild` the default template will automatically include 
lines for DEPEND and RDEPEND, but not for RESTRICT

Therefore I suggest we move this example a bit down in skel.ebuild as 
it's more logical to continue with new lines instead of applying in-between

Any objections?

[-- Attachment #2: skel.ebuild.patch --]
[-- Type: text/x-patch, Size: 892 bytes --]

--- skel.ebuild	2012-01-20 18:18:14.692033044 +0200
+++ /tmp/skel.ebuild	2012-05-07 00:45:01.871648515 +0300
@@ -85,11 +85,6 @@
 # use any USE flags, set to "".
 IUSE="gnome X"
 
-# A space delimited list of portage features to restrict. man 5 ebuild
-# for details.  Usually not needed.
-#RESTRICT="strip"
-
-
 # Build-time dependencies, such as
 #    ssl? ( >=dev-libs/openssl-0.9.6b )
 #    >=dev-lang/perl-5.6.1-r1
@@ -103,6 +98,11 @@
 # The below is valid if the same run-time depends are required to compile.
 RDEPEND="${DEPEND}"
 
+# A space delimited list of portage features to restrict. man 5 ebuild
+# for details.  Usually not needed.
+#RESTRICT="strip"
+
+
 # Source directory; the dir where the sources can be found (automatically
 # unpacked) inside ${WORKDIR}.  The default value for S is ${WORKDIR}/${P}
 # If you don't need to change it, leave the S= line out of the ebuild

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] skel.ebuild cosmetics (move RESTRICT after DEPEND)
  2012-05-06 21:47 [gentoo-dev] skel.ebuild cosmetics (move RESTRICT after DEPEND) Samuli Suominen
@ 2012-05-06 21:56 ` Michael Sterrett
  2012-05-07  4:46   ` Mike Frysinger
  2012-05-06 22:27 ` Ulrich Mueller
  1 sibling, 1 reply; 9+ messages in thread
From: Michael Sterrett @ 2012-05-06 21:56 UTC (permalink / raw
  To: gentoo-dev

I prefer it right after IUSE which is where it currently is in skel.ebuild.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] skel.ebuild cosmetics (move RESTRICT after DEPEND)
  2012-05-06 21:47 [gentoo-dev] skel.ebuild cosmetics (move RESTRICT after DEPEND) Samuli Suominen
  2012-05-06 21:56 ` Michael Sterrett
@ 2012-05-06 22:27 ` Ulrich Mueller
  2012-05-06 22:33   ` Samuli Suominen
  1 sibling, 1 reply; 9+ messages in thread
From: Ulrich Mueller @ 2012-05-06 22:27 UTC (permalink / raw
  To: gentoo-dev

>>>>> On Mon, 07 May 2012, Samuli Suominen wrote:

> If you `vim foo.ebuild` the default template will automatically
> include lines for DEPEND and RDEPEND, but not for RESTRICT

Are we now using behaviour of editors as a reference? With Emacs or
XEmacs, the template includes RESTRICT and places it before DEPEND and
RDEPEND.

> Therefore I suggest we move this example a bit down in skel.ebuild
> as it's more logical to continue with new lines instead of applying
> in-between

> Any objections?

Yes. Please leave it as it is.

Ulrich



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] skel.ebuild cosmetics (move RESTRICT after DEPEND)
  2012-05-06 22:27 ` Ulrich Mueller
@ 2012-05-06 22:33   ` Samuli Suominen
  2012-05-06 23:24     ` Ulrich Mueller
  0 siblings, 1 reply; 9+ messages in thread
From: Samuli Suominen @ 2012-05-06 22:33 UTC (permalink / raw
  To: gentoo-dev

On 05/07/2012 01:27 AM, Ulrich Mueller wrote:
>>>>>> On Mon, 07 May 2012, Samuli Suominen wrote:
>
>> If you `vim foo.ebuild` the default template will automatically
>> include lines for DEPEND and RDEPEND, but not for RESTRICT
>
> Are we now using behaviour of editors as a reference? With Emacs or
> XEmacs, the template includes RESTRICT and places it before DEPEND and
> RDEPEND.

I would rather see RESTRICT dropped from the template included for 
emacs, because it's not expected for majority of ebuilds to have need 
for it (a fact).
The template for emacs should be kept in sync with the example for vim 
(or whichever way around).

>
>> Therefore I suggest we move this example a bit down in skel.ebuild
>> as it's more logical to continue with new lines instead of applying
>> in-between
>
>> Any objections?
>
> Yes. Please leave it as it is.

Yeah, I will if someone has a (good) argument for doing so.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] skel.ebuild cosmetics (move RESTRICT after DEPEND)
  2012-05-06 22:33   ` Samuli Suominen
@ 2012-05-06 23:24     ` Ulrich Mueller
  2012-05-06 23:40       ` Andreas K. Huettel
  2012-05-07  8:32       ` Samuli Suominen
  0 siblings, 2 replies; 9+ messages in thread
From: Ulrich Mueller @ 2012-05-06 23:24 UTC (permalink / raw
  To: gentoo-dev

>>>>> On Mon, 07 May 2012, Samuli Suominen wrote:

> On 05/07/2012 01:27 AM, Ulrich Mueller wrote:
>> Are we now using behaviour of editors as a reference? With Emacs or
>> XEmacs, the template includes RESTRICT and places it before DEPEND
>> and RDEPEND.

> I would rather see RESTRICT dropped from the template included for
> emacs, because it's not expected for majority of ebuilds to have
> need for it (a fact).

So what? Then you just leave the variable empty. The template (or
rather "skeleton" in Emacs' terms) knows that the RESTRICT variable is
optional and will automatically remove the line.

> The template for emacs should be kept in sync with the example for
> vim (or whichever way around).

The skeleton for Emacs is kept in sync with skel.ebuild and the
devmanual, of course. I don't use vim and therefore I don't know what
its template does.

>>> Therefore I suggest we move this example a bit down in skel.ebuild
>>> as it's more logical to continue with new lines instead of applying
>>> in-between
>> 
>>> Any objections?
>> 
>> Yes. Please leave it as it is.

> Yeah, I will if someone has a (good) argument for doing so.

RESTRICT and PROPERTIES are on a single line and it's natural to add
them to the second group of such variables, namely LICENSE, SLOT,
KEYWORDS, and IUSE.

Whereas DEPEND and RDEPEND typically extend over several lines;
sometimes they are quite long. So, a RESTRICT line placed after
*DEPEND will be much more easily missed than in its current place.

Ulrich



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] skel.ebuild cosmetics (move RESTRICT after DEPEND)
  2012-05-06 23:24     ` Ulrich Mueller
@ 2012-05-06 23:40       ` Andreas K. Huettel
  2012-05-07  8:32       ` Samuli Suominen
  1 sibling, 0 replies; 9+ messages in thread
From: Andreas K. Huettel @ 2012-05-06 23:40 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: Text/Plain, Size: 2003 bytes --]

Am Montag 07 Mai 2012, 01:24:39 schrieb Ulrich Mueller:
> >>>>> On Mon, 07 May 2012, Samuli Suominen wrote:
> > On 05/07/2012 01:27 AM, Ulrich Mueller wrote:
> >> Are we now using behaviour of editors as a reference? With Emacs or
> >> XEmacs, the template includes RESTRICT and places it before DEPEND
> >> and RDEPEND.
> > 
> > I would rather see RESTRICT dropped from the template included for
> > emacs, because it's not expected for majority of ebuilds to have
> > need for it (a fact).
> 
> So what? Then you just leave the variable empty. The template (or
> rather "skeleton" in Emacs' terms) knows that the RESTRICT variable is
> optional and will automatically remove the line.
> 
> > The template for emacs should be kept in sync with the example for
> > vim (or whichever way around).
> 
> The skeleton for Emacs is kept in sync with skel.ebuild and the
> devmanual, of course. I don't use vim and therefore I don't know what
> its template does.
> 
> >>> Therefore I suggest we move this example a bit down in skel.ebuild
> >>> as it's more logical to continue with new lines instead of applying
> >>> in-between
> >>> 
> >>> Any objections?
> >> 
> >> Yes. Please leave it as it is.
> > 
> > Yeah, I will if someone has a (good) argument for doing so.
> 
> RESTRICT and PROPERTIES are on a single line and it's natural to add
> them to the second group of such variables, namely LICENSE, SLOT,
> KEYWORDS, and IUSE.
> 
> Whereas DEPEND and RDEPEND typically extend over several lines;
> sometimes they are quite long. So, a RESTRICT line placed after
> *DEPEND will be much more easily missed than in its current place.


This entire ridiculous discussion just makes me convinced that it's best to

* use neither vi nor emacs
* and stick to my own personal preference of variable order, which is not 
identical to either. 

Eat this!



-- 

Andreas K. Huettel
Gentoo Linux developer 
dilfridge@gentoo.org
http://www.akhuettel.de/


[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] skel.ebuild cosmetics (move RESTRICT after DEPEND)
  2012-05-06 21:56 ` Michael Sterrett
@ 2012-05-07  4:46   ` Mike Frysinger
  0 siblings, 0 replies; 9+ messages in thread
From: Mike Frysinger @ 2012-05-07  4:46 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: Text/Plain, Size: 145 bytes --]

On Sunday 06 May 2012 17:56:41 Michael Sterrett wrote:
> I prefer it right after IUSE which is where it currently is in skel.ebuild.

this
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] skel.ebuild cosmetics (move RESTRICT after DEPEND)
  2012-05-06 23:24     ` Ulrich Mueller
  2012-05-06 23:40       ` Andreas K. Huettel
@ 2012-05-07  8:32       ` Samuli Suominen
  2012-05-17 20:03         ` Maciej Mrozowski
  1 sibling, 1 reply; 9+ messages in thread
From: Samuli Suominen @ 2012-05-07  8:32 UTC (permalink / raw
  To: gentoo-dev

On 05/07/2012 02:24 AM, Ulrich Mueller wrote:
>>>> Therefore I suggest we move this example a bit down in skel.ebuild
>>>> as it's more logical to continue with new lines instead of applying
>>>> in-between
>>>
>>>> Any objections?
>>>
>>> Yes. Please leave it as it is.
>
>> Yeah, I will if someone has a (good) argument for doing so.
>
> RESTRICT and PROPERTIES are on a single line and it's natural to add
> them to the second group of such variables, namely LICENSE, SLOT,
> KEYWORDS, and IUSE.
>
> Whereas DEPEND and RDEPEND typically extend over several lines;
> sometimes they are quite long. So, a RESTRICT line placed after
> *DEPEND will be much more easily missed than in its current place.

Oh well, you have a point here. I'll just leave it as is and adjust my 
own behavior accordingly instead.

Case closed.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] skel.ebuild cosmetics (move RESTRICT after DEPEND)
  2012-05-07  8:32       ` Samuli Suominen
@ 2012-05-17 20:03         ` Maciej Mrozowski
  0 siblings, 0 replies; 9+ messages in thread
From: Maciej Mrozowski @ 2012-05-17 20:03 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1347 bytes --]

On Monday 07 of May 2012 10:32:45 Samuli Suominen wrote:
> On 05/07/2012 02:24 AM, Ulrich Mueller wrote:
> >>>> Therefore I suggest we move this example a bit down in skel.ebuild
> >>>> as it's more logical to continue with new lines instead of applying
> >>>> in-between
> >>>> 
> >>>> Any objections?
> >>> 
> >>> Yes. Please leave it as it is.
> >> 
> >> Yeah, I will if someone has a (good) argument for doing so.
> > 
> > RESTRICT and PROPERTIES are on a single line and it's natural to add
> > them to the second group of such variables, namely LICENSE, SLOT,
> > KEYWORDS, and IUSE.
> > 
> > Whereas DEPEND and RDEPEND typically extend over several lines;
> > sometimes they are quite long. So, a RESTRICT line placed after
> > *DEPEND will be much more easily missed than in its current place.

And I use quite different 'rule' where to place variables:
- to separate frequently changed ones (KEYWORDS, IUSE) with rather invariant 
ones (SLOT, LICENSE)

Rationale:
It generates smaller diffs (and less conflicts when doing semi-automatic 
merges of ebuild changes between branches as those are likely both IUSE and 
KEYWORDS changes, KEYWORDS changes are rarely desired to be included in merge, 
if IUSE is just below the line with KEYWORDS, KEYWORD change will be 
accidentally taken in)

-- 
regards
MM

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-05-17 20:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-06 21:47 [gentoo-dev] skel.ebuild cosmetics (move RESTRICT after DEPEND) Samuli Suominen
2012-05-06 21:56 ` Michael Sterrett
2012-05-07  4:46   ` Mike Frysinger
2012-05-06 22:27 ` Ulrich Mueller
2012-05-06 22:33   ` Samuli Suominen
2012-05-06 23:24     ` Ulrich Mueller
2012-05-06 23:40       ` Andreas K. Huettel
2012-05-07  8:32       ` Samuli Suominen
2012-05-17 20:03         ` Maciej Mrozowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox