public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] variable quoting, setting optional variables to "", and depending on virtual/libc
@ 2006-06-17  4:35 Thomas Cort
  2006-06-17  5:22 ` Alin Nastac
                   ` (5 more replies)
  0 siblings, 6 replies; 25+ messages in thread
From: Thomas Cort @ 2006-06-17  4:35 UTC (permalink / raw
  To: gentoo-dev

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

What is the proper quoting style for using epatch? In the tree there
are about 3 different styles...

	epatch ${FILESDIR}/some-fix.patch      # used by 7326 ebuilds
	epatch "${FILESDIR}"/some-fix.patch    # used by 3092 ebuilds
	epatch "${FILESDIR}/some-fix.patch"    # used by 1434 ebuilds

What is the proper quoting style for defining the S variable? In the
tree there are about 3 different styles...

	S=${WORKDIR}/${MY_P}    # used by 5270 ebuilds
	S="${WORKDIR}"/${MY_P}  # used by 43 ebuilds
	S="${WORKDIR}/${MY_P}"  # used by 2259 ebuilds

What is the purpose of setting DEPEND and RDEPEND to "" if DEPEND and
RDEPEND are optional[1][2]? Isn't that just a waste of disk space /
bandwidth? DEPEND="virtual/libc" seems like a waste too as it is an
implicit system dependency[3], any reason for using it?

	DEPEND=""             # used by 1479 ebuilds
	RDEPEND=""            # used by 884 ebuilds
	DEPEND="virtual/libc" # used by 809 ebuilds

[1] http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml?part=2&chap=1#doc_chap_pre2
[2] http://devmanual.gentoo.org/ebuild-writing/variables/index.html#optional-variables
[3] http://devmanual.gentoo.org/general-concepts/dependencies/index.html#implicit-system-dependency

[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]

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

* Re: [gentoo-dev] variable quoting, setting optional variables to "", and depending on virtual/libc
  2006-06-17  4:35 [gentoo-dev] variable quoting, setting optional variables to "", and depending on virtual/libc Thomas Cort
@ 2006-06-17  5:22 ` Alin Nastac
  2006-06-17  7:30   ` Mike Frysinger
  2006-06-17  5:34 ` [gentoo-dev] " Donnie Berkholz
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 25+ messages in thread
From: Alin Nastac @ 2006-06-17  5:22 UTC (permalink / raw
  To: gentoo-dev

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

Thomas Cort wrote:
> What is the proper quoting style for using epatch? In the tree there
> are about 3 different styles...
>
> 	epatch ${FILESDIR}/some-fix.patch      # used by 7326 ebuilds
> 	epatch "${FILESDIR}"/some-fix.patch    # used by 3092 ebuilds
> 	epatch "${FILESDIR}/some-fix.patch"    # used by 1434 ebuilds
>   
2 and 3 are fine.
> What is the proper quoting style for defining the S variable? In the
> tree there are about 3 different styles...
>
> 	S=${WORKDIR}/${MY_P}    # used by 5270 ebuilds
> 	S="${WORKDIR}"/${MY_P}  # used by 43 ebuilds
> 	S="${WORKDIR}/${MY_P}"  # used by 2259 ebuilds
>   
ditto
> What is the purpose of setting DEPEND and RDEPEND to "" if DEPEND and
> RDEPEND are optional[1][2]? Isn't that just a waste of disk space /
> bandwidth? DEPEND="virtual/libc" seems like a waste too as it is an
> implicit system dependency[3], any reason for using it?
>
> 	DEPEND=""             # used by 1479 ebuilds
> 	RDEPEND=""            # used by 884 ebuilds
> 	DEPEND="virtual/libc" # used by 809 ebuilds
>   
If the package don't have dependencies, then don't set *DEPEND.
virtual/libc dependency is probably futile, unless the package is part
of the system class or is a dependency of a package which is part of the
system class.



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

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

* Re: [gentoo-dev] variable quoting, setting optional variables to "", and depending on virtual/libc
  2006-06-17  4:35 [gentoo-dev] variable quoting, setting optional variables to "", and depending on virtual/libc Thomas Cort
  2006-06-17  5:22 ` Alin Nastac
@ 2006-06-17  5:34 ` Donnie Berkholz
  2006-06-17  7:31   ` Mike Frysinger
  2006-06-17  5:48 ` [gentoo-dev] " Michael Sterrett -Mr. Bones.-
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 25+ messages in thread
From: Donnie Berkholz @ 2006-06-17  5:34 UTC (permalink / raw
  To: gentoo-dev

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

Thomas Cort wrote:
> What is the proper quoting style for using epatch? In the tree there
> are about 3 different styles...
> 
> 	epatch ${FILESDIR}/some-fix.patch      # used by 7326 ebuilds
> 	epatch "${FILESDIR}"/some-fix.patch    # used by 3092 ebuilds
> 	epatch "${FILESDIR}/some-fix.patch"    # used by 1434 ebuilds
> 
> What is the proper quoting style for defining the S variable? In the
> tree there are about 3 different styles...
> 
> 	S=${WORKDIR}/${MY_P}    # used by 5270 ebuilds
> 	S="${WORKDIR}"/${MY_P}  # used by 43 ebuilds
> 	S="${WORKDIR}/${MY_P}"  # used by 2259 ebuilds

The reasoning for quoting here is at least twofold:

1) There may be spaces in paths (e.g. PORTDIR and PORTAGE_TMPDIR), so
you need to use quotes.
2) When you set a variable to a string, you should use quotes.

Older ebuilds probably mostly lack quoting around uses of $FILESDIR, $S
and $D in the ebuild.

Thanks,
Donnie


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

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

* [gentoo-dev] Re: variable quoting, setting optional variables to "", and depending on virtual/libc
  2006-06-17  4:35 [gentoo-dev] variable quoting, setting optional variables to "", and depending on virtual/libc Thomas Cort
  2006-06-17  5:22 ` Alin Nastac
  2006-06-17  5:34 ` [gentoo-dev] " Donnie Berkholz
@ 2006-06-17  5:48 ` Michael Sterrett -Mr. Bones.-
  2006-06-17  5:51 ` [gentoo-dev] " Harald van Dijk
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 25+ messages in thread
From: Michael Sterrett -Mr. Bones.- @ 2006-06-17  5:48 UTC (permalink / raw
  To: gentoo-dev

On Sat, 17 Jun 2006, Thomas Cort wrote:

> What is the proper quoting style for using epatch? In the tree there
> are about 3 different styles...
>
> 	epatch ${FILESDIR}/some-fix.patch      # used by 7326 ebuilds
> 	epatch "${FILESDIR}"/some-fix.patch    # used by 3092 ebuilds
> 	epatch "${FILESDIR}/some-fix.patch"    # used by 1434 ebuilds

The second and third are fine.  The quoting is needed since FILESDIR
is user-set and could contain a space.

> What is the proper quoting style for defining the S variable? In the
> tree there are about 3 different styles...
>
> 	S=${WORKDIR}/${MY_P}    # used by 5270 ebuilds
> 	S="${WORKDIR}"/${MY_P}  # used by 43 ebuilds
> 	S="${WORKDIR}/${MY_P}"  # used by 2259 ebuilds

The first is correct.  The second and third have unnecessary quoting.

Michael Sterrett
   -Mr. Bones.-
mr_bones_@gentoo.org
-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] variable quoting, setting optional variables to "", and depending on virtual/libc
  2006-06-17  4:35 [gentoo-dev] variable quoting, setting optional variables to "", and depending on virtual/libc Thomas Cort
                   ` (2 preceding siblings ...)
  2006-06-17  5:48 ` [gentoo-dev] " Michael Sterrett -Mr. Bones.-
@ 2006-06-17  5:51 ` Harald van Dijk
  2006-06-17  6:31   ` Drake Wyrm
  2006-06-17  6:02 ` Drake Wyrm
  2006-06-17  9:15 ` Kevin F. Quinn
  5 siblings, 1 reply; 25+ messages in thread
From: Harald van Dijk @ 2006-06-17  5:51 UTC (permalink / raw
  To: gentoo-dev

On Sat, Jun 17, 2006 at 12:35:30AM -0400, Thomas Cort wrote:
> What is the proper quoting style for using epatch? In the tree there
> are about 3 different styles...
> 
> 	epatch ${FILESDIR}/some-fix.patch      # used by 7326 ebuilds
> 	epatch "${FILESDIR}"/some-fix.patch    # used by 3092 ebuilds
> 	epatch "${FILESDIR}/some-fix.patch"    # used by 1434 ebuilds

${FILESDIR} should be quoted, but as long as there are no wildcards in
the "/some-fix.patch", it doesn't matter whether that is.

> What is the proper quoting style for defining the S variable? In the
> tree there are about 3 different styles...
> 
> 	S=${WORKDIR}/${MY_P}    # used by 5270 ebuilds
> 	S="${WORKDIR}"/${MY_P}  # used by 43 ebuilds
> 	S="${WORKDIR}/${MY_P}"  # used by 2259 ebuilds

Any is fine, there is no word splitting or wildcard expansion in
shell variable assignments.

> What is the purpose of setting DEPEND and RDEPEND to "" if DEPEND and
> RDEPEND are optional[1][2]? Isn't that just a waste of disk space /
> bandwidth?

RDEPEND defaults to DEPEND (in ebuilds), so if DEPEND is set, and
RDEPEND should be empty, then RDEPEND must be set to "" explicitly.
As for DEPEND="", that's mostly a stylistic issue, I think.

> DEPEND="virtual/libc" seems like a waste too as it is an
> implicit system dependency[3], any reason for using it?

Not really.
-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] variable quoting, setting optional variables to "", and depending on virtual/libc
  2006-06-17  4:35 [gentoo-dev] variable quoting, setting optional variables to "", and depending on virtual/libc Thomas Cort
                   ` (3 preceding siblings ...)
  2006-06-17  5:51 ` [gentoo-dev] " Harald van Dijk
@ 2006-06-17  6:02 ` Drake Wyrm
  2006-06-17  7:30   ` Robin H. Johnson
  2006-06-17  7:33   ` Mike Frysinger
  2006-06-17  9:15 ` Kevin F. Quinn
  5 siblings, 2 replies; 25+ messages in thread
From: Drake Wyrm @ 2006-06-17  6:02 UTC (permalink / raw
  To: gentoo-dev

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

Thomas Cort <tcort@gentoo.org> wrote:
> What is the proper quoting style for using epatch? In the tree there
> are about 3 different styles...
<snip>
> What is the proper quoting style for defining the S variable? In the
> tree there are about 3 different styles...
It might be prudent to quote the variables, in case somebody, for
whatever reason, has strange characters in assorted paths.

> What is the purpose of setting DEPEND and RDEPEND to "" if DEPEND and
> RDEPEND are optional[1][2]? Isn't that just a waste of disk space /
> bandwidth? DEPEND="virtual/libc" seems like a waste too as it is an
> implicit system dependency[3], any reason for using it?
> 
> 	DEPEND=""             # used by 1479 ebuilds
> 	RDEPEND=""            # used by 884 ebuilds
These two are probably not necessary, but some devs might prefer to use
them in their ebuilds for the sake of explicitly stating the implied.

> 	DEPEND="virtual/libc" # used by 809 ebuilds
There are opinions on both sides of this subject, but I think that most
devs are starting to see the value in this. If a package requires some
other package, say so. It may be a bit more work (twelve keystrokes),
but it's worth the extra effort (twelve keystrokes) to be complete.

-- 
twelve keystrokes

[-- Attachment #2: Type: application/pgp-signature, Size: 199 bytes --]

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

* Re: [gentoo-dev] variable quoting, setting optional variables to "", and depending on virtual/libc
  2006-06-17  5:51 ` [gentoo-dev] " Harald van Dijk
@ 2006-06-17  6:31   ` Drake Wyrm
  2006-06-17  6:46     ` Harald van Dijk
  0 siblings, 1 reply; 25+ messages in thread
From: Drake Wyrm @ 2006-06-17  6:31 UTC (permalink / raw
  To: gentoo-dev

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

Harald van D??k <truedfx@gentoo.org> wrote:
> Any is fine, there is no word splitting or wildcard expansion in
> shell variable assignments.

$ foo="bar   *   baz"
$ wombat=$foo
$ echo $wombat
bar somedir somefile baz


-- 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^ A unix signature isn't a return address, it's the ASCII equivalent of ^
^ a black velvet clown painting. It's a rectangle of carets surrounding ^
^ a quote from a literary giant of weeniedom like Heinlein or Dr. Who.  ^
^   -- Chris Maeda                                                      ^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

[-- Attachment #2: Type: application/pgp-signature, Size: 199 bytes --]

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

* Re: [gentoo-dev] variable quoting, setting optional variables to "", and depending on virtual/libc
  2006-06-17  6:31   ` Drake Wyrm
@ 2006-06-17  6:46     ` Harald van Dijk
  2006-06-17 10:37       ` Drake Wyrm
  0 siblings, 1 reply; 25+ messages in thread
From: Harald van Dijk @ 2006-06-17  6:46 UTC (permalink / raw
  To: gentoo-dev

On Fri, Jun 16, 2006 at 11:31:27PM -0700, Drake Wyrm wrote:
> Harald van D??k <truedfx@gentoo.org> wrote:
> > Any is fine, there is no word splitting or wildcard expansion in
> > shell variable assignments.
> 
> $ foo="bar   *   baz"
> $ wombat=$foo
> $ echo $wombat
> bar somedir somefile baz

The wildcard expansion is not during the variable assignment, it's
during the expansion of $wombat. Just try echo "$wombat" instead.
-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] variable quoting, setting optional variables to "", and depending on virtual/libc
  2006-06-17  6:02 ` Drake Wyrm
@ 2006-06-17  7:30   ` Robin H. Johnson
  2006-06-17  9:19     ` Kevin F. Quinn
  2006-06-17  7:33   ` Mike Frysinger
  1 sibling, 1 reply; 25+ messages in thread
From: Robin H. Johnson @ 2006-06-17  7:30 UTC (permalink / raw
  To: gentoo-dev

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

On Fri, Jun 16, 2006 at 11:02:27PM -0700, Drake Wyrm wrote:
> Thomas Cort <tcort@gentoo.org> wrote:
> > What is the proper quoting style for using epatch? In the tree there
> > are about 3 different styles...
> <snip>
> > What is the proper quoting style for defining the S variable? In the
> > tree there are about 3 different styles...
> It might be prudent to quote the variables, in case somebody, for
> whatever reason, has strange characters in assorted paths.
> 
> > What is the purpose of setting DEPEND and RDEPEND to "" if DEPEND and
> > RDEPEND are optional[1][2]? Isn't that just a waste of disk space /
> > bandwidth? DEPEND="virtual/libc" seems like a waste too as it is an
> > implicit system dependency[3], any reason for using it?
> > 
> > 	DEPEND=""             # used by 1479 ebuilds
> > 	RDEPEND=""            # used by 884 ebuilds
> These two are probably not necessary, but some devs might prefer to use
> them in their ebuilds for the sake of explicitly stating the implied.
> 
> > 	DEPEND="virtual/libc" # used by 809 ebuilds
> There are opinions on both sides of this subject, but I think that most
> devs are starting to see the value in this. If a package requires some
> other package, say so. It may be a bit more work (twelve keystrokes),
> but it's worth the extra effort (twelve keystrokes) to be complete.
If I have a package that produces a dynamic (non-static) binary, and it
has no other deps, then I throw in virtual/libc.

If it produces a static binary only, or no binary, then it gets "".

What I would like to see at some point, is a real way of differencing
packages that really have no runtime dependencies - not even anything in
the system packages. As to what the best way to go about it, I'm not
certain, but I do think specifying a few packages: virtual/compiler,
virtual/libc and a few limited things from system packages should be ok.
Or maybe even virtual/system (with the compiler removed from that
virtual).

-- 
Robin Hugh Johnson
E-Mail     : robbat2@gentoo.org
GnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

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

* Re: [gentoo-dev] variable quoting, setting optional variables to "", and depending on virtual/libc
  2006-06-17  5:22 ` Alin Nastac
@ 2006-06-17  7:30   ` Mike Frysinger
  2006-06-17  9:00     ` [gentoo-dev] " Duncan
  0 siblings, 1 reply; 25+ messages in thread
From: Mike Frysinger @ 2006-06-17  7:30 UTC (permalink / raw
  To: gentoo-dev

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

On Saturday 17 June 2006 01:22, Alin Nastac wrote:
> Thomas Cort wrote:
> > What is the proper quoting style for using epatch? In the tree there
> > are about 3 different styles...
> >
> > 	epatch ${FILESDIR}/some-fix.patch      # used by 7326 ebuilds
> > 	epatch "${FILESDIR}"/some-fix.patch    # used by 3092 ebuilds
> > 	epatch "${FILESDIR}/some-fix.patch"    # used by 1434 ebuilds
>
> 2 and 3 are fine.

correct ... personally i prefer the 2nd myself

> > What is the proper quoting style for defining the S variable? In the
> > tree there are about 3 different styles...
> >
> > 	S=${WORKDIR}/${MY_P}    # used by 5270 ebuilds
> > 	S="${WORKDIR}"/${MY_P}  # used by 43 ebuilds
> > 	S="${WORKDIR}/${MY_P}"  # used by 2259 ebuilds
>
> ditto

not really ... all three will work fine, but i prefer the first myself as the 
quoting is not needed here
-mike

[-- Attachment #2: Type: application/pgp-signature, Size: 827 bytes --]

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

* Re: [gentoo-dev] variable quoting, setting optional variables to "", and depending on virtual/libc
  2006-06-17  5:34 ` [gentoo-dev] " Donnie Berkholz
@ 2006-06-17  7:31   ` Mike Frysinger
  0 siblings, 0 replies; 25+ messages in thread
From: Mike Frysinger @ 2006-06-17  7:31 UTC (permalink / raw
  To: gentoo-dev

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

On Saturday 17 June 2006 01:34, Donnie Berkholz wrote:
> 2) When you set a variable to a string, you should use quotes.

dont need them, bash does not expand in setting variables
-mike

[-- Attachment #2: Type: application/pgp-signature, Size: 827 bytes --]

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

* Re: [gentoo-dev] variable quoting, setting optional variables to "", and depending on virtual/libc
  2006-06-17  6:02 ` Drake Wyrm
  2006-06-17  7:30   ` Robin H. Johnson
@ 2006-06-17  7:33   ` Mike Frysinger
  2006-06-17  9:40     ` Kevin F. Quinn
  1 sibling, 1 reply; 25+ messages in thread
From: Mike Frysinger @ 2006-06-17  7:33 UTC (permalink / raw
  To: gentoo-dev

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

On Saturday 17 June 2006 02:02, Drake Wyrm wrote:
> Thomas Cort <tcort@gentoo.org> wrote:
> > 	DEPEND="virtual/libc" # used by 809 ebuilds
>
> There are opinions on both sides of this subject, but I think that most
> devs are starting to see the value in this. If a package requires some
> other package, say so. It may be a bit more work (twelve keystrokes),
> but it's worth the extra effort (twelve keystrokes) to be complete.

virtual/libc has no value in DEPEND/RDEPEND

you cannot have a system without a system libc (well you can, but this *very 
edge* case doesnt matter in the portage world)
-mike

[-- Attachment #2: Type: application/pgp-signature, Size: 827 bytes --]

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

* [gentoo-dev]  Re: variable quoting, setting optional variables to "", and depending on virtual/libc
  2006-06-17  7:30   ` Mike Frysinger
@ 2006-06-17  9:00     ` Duncan
  2006-06-17  9:09       ` Peper
  0 siblings, 1 reply; 25+ messages in thread
From: Duncan @ 2006-06-17  9:00 UTC (permalink / raw
  To: gentoo-dev

Mike Frysinger <vapier@gentoo.org> posted
200606170330.29685.vapier@gentoo.org, excerpted below, on  Sat, 17 Jun
2006 03:30:29 -0400:

>> > What is the proper quoting style for defining the S variable? In the
>> > tree there are about 3 different styles...
>> >
>> > 	S=${WORKDIR}/${MY_P}    # used by 5270 ebuilds
>> > 	S="${WORKDIR}"/${MY_P}  # used by 43 ebuilds
>> > 	S="${WORKDIR}/${MY_P}"  # used by 2259 ebuilds
>>
>> ditto
> 
> not really ... all three will work fine, but i prefer the first myself as the 
> quoting is not needed here

What if someone has PORTAGE_TMPDIR="/tmp/portage temporary workspace" or
"/var/tmp/\$whatever" or some such (yes I know that's crazy, but...)?  I'd
agree with the ditto, not with the all three will work fine.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman

-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev]  Re: variable quoting, setting optional variables to "", and depending on virtual/libc
  2006-06-17  9:00     ` [gentoo-dev] " Duncan
@ 2006-06-17  9:09       ` Peper
  2006-06-17  9:21         ` [gentoo-dev] " Duncan
  0 siblings, 1 reply; 25+ messages in thread
From: Peper @ 2006-06-17  9:09 UTC (permalink / raw
  To: gentoo-dev

> What if someone has PORTAGE_TMPDIR="/tmp/portage temporary workspace" or
> "/var/tmp/\$whatever" or some such (yes I know that's crazy, but...)?  I'd
> agree with the ditto, not with the all three will work fine.
It makes no difference in assignments, so all of them will do.

-- 
Best Regards,
Peper
-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] variable quoting, setting optional variables to "", and depending on virtual/libc
  2006-06-17  4:35 [gentoo-dev] variable quoting, setting optional variables to "", and depending on virtual/libc Thomas Cort
                   ` (4 preceding siblings ...)
  2006-06-17  6:02 ` Drake Wyrm
@ 2006-06-17  9:15 ` Kevin F. Quinn
  2006-06-17  9:26   ` Peper
  2006-06-17 12:39   ` Michael Cummings
  5 siblings, 2 replies; 25+ messages in thread
From: Kevin F. Quinn @ 2006-06-17  9:15 UTC (permalink / raw
  To: gentoo-dev

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

On Sat, 17 Jun 2006 00:35:30 -0400
Thomas Cort <tcort@gentoo.org> wrote:

> What is the purpose of setting DEPEND and RDEPEND to "" if DEPEND and
> RDEPEND are optional[1][2]? Isn't that just a waste of disk space /
> bandwidth? DEPEND="virtual/libc" seems like a waste too as it is an
> implicit system dependency[3], any reason for using it?
> 
> 	DEPEND=""             # used by 1479 ebuilds
> 	RDEPEND=""            # used by 884 ebuilds
> 	DEPEND="virtual/libc" # used by 809 ebuilds

Setting RDEPEND to "" indicates that the stuff in DEPEND isn't needed
to run the package, and can safely be pruned later.  If RDEPEND is not
set, it is defaulted to $DEPEND by portage.

-- 
Kevin F. Quinn

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 191 bytes --]

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

* Re: [gentoo-dev] variable quoting, setting optional variables to "", and depending on virtual/libc
  2006-06-17  7:30   ` Robin H. Johnson
@ 2006-06-17  9:19     ` Kevin F. Quinn
  0 siblings, 0 replies; 25+ messages in thread
From: Kevin F. Quinn @ 2006-06-17  9:19 UTC (permalink / raw
  To: gentoo-dev

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

On Sat, 17 Jun 2006 00:30:04 -0700
"Robin H. Johnson" <robbat2@gentoo.org> wrote:

> If I have a package that produces a dynamic (non-static) binary, and
> it has no other deps, then I throw in virtual/libc.
> 
> If it produces a static binary only, or no binary, then it gets "".

If you're going to do that, static binaries would usually depend on
virtual/libc to be built (using libc.a) so it would be in DEPEND but
explicitly removed from RDEPEND.

> What I would like to see at some point, is a real way of differencing
> packages that really have no runtime dependencies - not even anything
> in the system packages. As to what the best way to go about it, I'm
> not certain, but I do think specifying a few packages:
> virtual/compiler, virtual/libc and a few limited things from system
> packages should be ok. Or maybe even virtual/system (with the
> compiler removed from that virtual).

-- 
Kevin F. Quinn

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 191 bytes --]

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

* [gentoo-dev]  Re: Re: variable quoting, setting optional variables to "", and depending on virtual/libc
  2006-06-17  9:09       ` Peper
@ 2006-06-17  9:21         ` Duncan
  2006-06-17  9:30           ` Peper
  0 siblings, 1 reply; 25+ messages in thread
From: Duncan @ 2006-06-17  9:21 UTC (permalink / raw
  To: gentoo-dev

Peper <peper@aster.pl> posted 200606171109.45478.peper@aster.pl, excerpted
below, on  Sat, 17 Jun 2006 11:09:45 +0200:

> It makes no difference in assignments, so all of them will do.

Noted that based on the other replies after posting.  Thanks, tho.  I
didn't know that until reading the thread.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman

-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] variable quoting, setting optional variables to "", and depending on virtual/libc
  2006-06-17  9:15 ` Kevin F. Quinn
@ 2006-06-17  9:26   ` Peper
  2006-06-17 11:57     ` Ciaran McCreesh
  2006-06-17 12:39   ` Michael Cummings
  1 sibling, 1 reply; 25+ messages in thread
From: Peper @ 2006-06-17  9:26 UTC (permalink / raw
  To: gentoo-dev

> Setting RDEPEND to "" indicates that the stuff in DEPEND isn't needed
> to run the package, and can safely be pruned later.  If RDEPEND is not
> set, it is defaulted to $DEPEND by portage.
If you inherit some eclass with deps, not set RDEPEND won't be defaulted to 
DEPEND from ebuild, but will also include deps from eclass, which is 
incorrect b/c these deps are needed for build time only(like sed, 
autotools...). One needs to make sure that RDEPEND is correct if not set 
manually in ebuild with eclasses.

-- 
Best Regards,
Peper
-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev]  Re: Re: variable quoting, setting optional variables to "", and depending on virtual/libc
  2006-06-17  9:21         ` [gentoo-dev] " Duncan
@ 2006-06-17  9:30           ` Peper
  0 siblings, 0 replies; 25+ messages in thread
From: Peper @ 2006-06-17  9:30 UTC (permalink / raw
  To: gentoo-dev

> Noted that based on the other replies after posting.  Thanks, tho.  I
> didn't know that until reading the thread.
No, it was genstef who pointed me that out when making my first ebuild.

-- 
Best Regards,
Peper
-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] variable quoting, setting optional variables to "", and depending on virtual/libc
  2006-06-17  7:33   ` Mike Frysinger
@ 2006-06-17  9:40     ` Kevin F. Quinn
  0 siblings, 0 replies; 25+ messages in thread
From: Kevin F. Quinn @ 2006-06-17  9:40 UTC (permalink / raw
  To: gentoo-dev

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

On Sat, 17 Jun 2006 03:33:28 -0400
Mike Frysinger <vapier@gentoo.org> wrote:

> On Saturday 17 June 2006 02:02, Drake Wyrm wrote:
> > Thomas Cort <tcort@gentoo.org> wrote:
> > > 	DEPEND="virtual/libc" # used by 809 ebuilds
> >
> > There are opinions on both sides of this subject, but I think that
> > most devs are starting to see the value in this. If a package
> > requires some other package, say so. It may be a bit more work
> > (twelve keystrokes), but it's worth the extra effort (twelve
> > keystrokes) to be complete.
> 
> virtual/libc has no value in DEPEND/RDEPEND
> 
> you cannot have a system without a system libc (well you can, but
> this *very edge* case doesnt matter in the portage world)

Agreed.

However "Package Dependencies" in the dev handbook
http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml?part=2&chap=1#doc_chap5
suggests adding it as it uses virtual/libc as an example of the use of
virtuals.

Regarding implicit system dependencies which can be omitted from *DEPEND
http://devmanual.gentoo.org/general-concepts/dependencies/index.html#implicit-system-dependency
obviously USE flag settings affect what's pulled in by system as does
the profile.

So I think if we're to allow essential system dependencies to be
omitted, we should be very explicit; i.e. publish a strict list.

-- 
Kevin F. Quinn

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 191 bytes --]

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

* Re: [gentoo-dev] variable quoting, setting optional variables to "", and depending on virtual/libc
  2006-06-17  6:46     ` Harald van Dijk
@ 2006-06-17 10:37       ` Drake Wyrm
  0 siblings, 0 replies; 25+ messages in thread
From: Drake Wyrm @ 2006-06-17 10:37 UTC (permalink / raw
  To: gentoo-dev

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

Harald van D??k <truedfx@gentoo.org> wrote:
> On Fri, Jun 16, 2006 at 11:31:27PM -0700, Drake Wyrm wrote:
> > Harald van D??k <truedfx@gentoo.org> wrote:
> > > Any is fine, there is no word splitting or wildcard expansion in
> > > shell variable assignments.
> > 
> > $ foo="bar   *   baz"
> > $ wombat=$foo
> > $ echo $wombat
> > bar somedir somefile baz
> 
> The wildcard expansion is not during the variable assignment, it's
> during the expansion of $wombat. Just try echo "$wombat" instead.

Right, you are! I do apologize.

-- 
Major premise: You can't handle the truth.
Minor premise: The truth is out there.
Conclusion: You can't handle what is out there.

[-- Attachment #2: Type: application/pgp-signature, Size: 199 bytes --]

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

* Re: [gentoo-dev] variable quoting, setting optional variables to "", and depending on virtual/libc
  2006-06-17  9:26   ` Peper
@ 2006-06-17 11:57     ` Ciaran McCreesh
  2006-06-18  0:14       ` Peper
  0 siblings, 1 reply; 25+ messages in thread
From: Ciaran McCreesh @ 2006-06-17 11:57 UTC (permalink / raw
  To: gentoo-dev

On Sat, 17 Jun 2006 11:26:12 +0200 Peper <peper@aster.pl> wrote:
| > Setting RDEPEND to "" indicates that the stuff in DEPEND isn't
| > needed to run the package, and can safely be pruned later.  If
| > RDEPEND is not set, it is defaulted to $DEPEND by portage.
|
| If you inherit some eclass with deps, not set RDEPEND won't be
| defaulted to DEPEND from ebuild, but will also include deps from
| eclass, which is incorrect b/c these deps are needed for build time
| only(like sed, autotools...). One needs to make sure that RDEPEND is
| correct if not set manually in ebuild with eclasses.

Incorrect.

-- 
Ciaran McCreesh
Mail            : ciaran dot mccreesh at blueyonder.co.uk


-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] variable quoting, setting optional variables to "", and depending on virtual/libc
  2006-06-17  9:15 ` Kevin F. Quinn
  2006-06-17  9:26   ` Peper
@ 2006-06-17 12:39   ` Michael Cummings
  2006-06-17 13:13     ` Carsten Lohrke
  1 sibling, 1 reply; 25+ messages in thread
From: Michael Cummings @ 2006-06-17 12:39 UTC (permalink / raw
  To: gentoo-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kevin F. Quinn wrote:
> 
 If RDEPEND is not set, it is defaulted to $DEPEND by portage.

Alas, if only. If you inherit an eclass with deps this carry over won't
happen. (And I have the bugs to prove it ;)

~mcummings


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEk/gNq1ztTp5/Ti4RAkjIAJwKPLEKd+T/bHl1v7B850XXCHOP3gCeMF8x
1hosIlwmFZm2f96F9VE5DxI=
=qdGO
-----END PGP SIGNATURE-----
-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] variable quoting, setting optional variables to "", and depending on virtual/libc
  2006-06-17 12:39   ` Michael Cummings
@ 2006-06-17 13:13     ` Carsten Lohrke
  0 siblings, 0 replies; 25+ messages in thread
From: Carsten Lohrke @ 2006-06-17 13:13 UTC (permalink / raw
  To: gentoo-dev

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

On Saturday 17 June 2006 14:39, Michael Cummings wrote:
> Kevin F. Quinn wrote:
>
>  If RDEPEND is not set, it is defaulted to $DEPEND by portage.
>
> Alas, if only. If you inherit an eclass with deps this carry over won't
> happen. (And I have the bugs to prove it ;)

Well, has been the job of the eclass the ensure that, of course. But since 
Portage 2.1 this is deprecated anyways and every developer is expected to set 
RDEPEND explicitly, including RDEPEND=$DEPEND, if necessary. Unfortunately 
the ebuild policy has still not been updated.

See also https://bugs.gentoo.org/show_bug.cgi?id=135945


Carsten


[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: [gentoo-dev] variable quoting, setting optional variables to "", and depending on virtual/libc
  2006-06-17 11:57     ` Ciaran McCreesh
@ 2006-06-18  0:14       ` Peper
  0 siblings, 0 replies; 25+ messages in thread
From: Peper @ 2006-06-18  0:14 UTC (permalink / raw
  To: gentoo-dev

> | If you inherit some eclass with deps, not set RDEPEND won't be
> | defaulted to DEPEND from ebuild, but will also include deps from
> | eclass, which is incorrect b/c these deps are needed for build time
> | only(like sed, autotools...). One needs to make sure that RDEPEND is
> | correct if not set manually in ebuild with eclasses.
>
> Incorrect.
What's incorrect? Made some tests and that's how it seems to work for me. If i 
am wrong be more specific plz.

-- 
Best Regards,
Peper
-- 
gentoo-dev@gentoo.org mailing list



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

end of thread, other threads:[~2006-06-18  0:17 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-17  4:35 [gentoo-dev] variable quoting, setting optional variables to "", and depending on virtual/libc Thomas Cort
2006-06-17  5:22 ` Alin Nastac
2006-06-17  7:30   ` Mike Frysinger
2006-06-17  9:00     ` [gentoo-dev] " Duncan
2006-06-17  9:09       ` Peper
2006-06-17  9:21         ` [gentoo-dev] " Duncan
2006-06-17  9:30           ` Peper
2006-06-17  5:34 ` [gentoo-dev] " Donnie Berkholz
2006-06-17  7:31   ` Mike Frysinger
2006-06-17  5:48 ` [gentoo-dev] " Michael Sterrett -Mr. Bones.-
2006-06-17  5:51 ` [gentoo-dev] " Harald van Dijk
2006-06-17  6:31   ` Drake Wyrm
2006-06-17  6:46     ` Harald van Dijk
2006-06-17 10:37       ` Drake Wyrm
2006-06-17  6:02 ` Drake Wyrm
2006-06-17  7:30   ` Robin H. Johnson
2006-06-17  9:19     ` Kevin F. Quinn
2006-06-17  7:33   ` Mike Frysinger
2006-06-17  9:40     ` Kevin F. Quinn
2006-06-17  9:15 ` Kevin F. Quinn
2006-06-17  9:26   ` Peper
2006-06-17 11:57     ` Ciaran McCreesh
2006-06-18  0:14       ` Peper
2006-06-17 12:39   ` Michael Cummings
2006-06-17 13:13     ` Carsten Lohrke

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