Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Gentoo: Dev

Don't require assignment of empty variables in ebuilds?

 

 

Gentoo dev RSS feed   Index | Next | Previous | View Threaded


ulm at gentoo

Jul 18, 2012, 10:53 AM

Post #1 of 10 (272 views)
Permalink
Don't require assignment of empty variables in ebuilds?

Our current policy [1] requires that ebuilds must assign the seven
variables DESCRIPTION, HOMEPAGE, SRC_URI, LICENSE, SLOT, KEYWORDS, and
IUSE, even if their value is empty.

Could we drop this requirement? Repoman already enforces that
DESCRIPTION, HOMEPAGE, LICENSE, SLOT, and KEYWORDS are non-empty
(with some exceptions for virtuals). I don't see why we need to
distinguish the "empty value" and "not assigned" cases.

For example, many live ebuilds already don't define SRC_URI. I'm not
aware of any problems caused by this.

Ulrich

[1] <http://devmanual.gentoo.org/ebuild-writing/variables/#required-variables>


robbat2 at gentoo

Jul 18, 2012, 11:02 AM

Post #2 of 10 (268 views)
Permalink
Re: Don't require assignment of empty variables in ebuilds? [In reply to]

On Wed, Jul 18, 2012 at 07:53:37PM +0200, Ulrich Mueller wrote:
> Our current policy [1] requires that ebuilds must assign the seven
> variables DESCRIPTION, HOMEPAGE, SRC_URI, LICENSE, SLOT, KEYWORDS, and
> IUSE, even if their value is empty.
>
> Could we drop this requirement? Repoman already enforces that
> DESCRIPTION, HOMEPAGE, LICENSE, SLOT, and KEYWORDS are non-empty
> (with some exceptions for virtuals). I don't see why we need to
> distinguish the "empty value" and "not assigned" cases.
>
> For example, many live ebuilds already don't define SRC_URI. I'm not
> aware of any problems caused by this.
+1 from me.

--
Robin Hugh Johnson
Gentoo Linux: Developer, Trustee & Infrastructure Lead
E-Mail : robbat2 [at] gentoo
GnuPG FP : 11ACBA4F 4778E3F6 E4EDF38E B27B944E 34884E85


pesa at gentoo

Jul 18, 2012, 11:11 AM

Post #3 of 10 (265 views)
Permalink
Re: Don't require assignment of empty variables in ebuilds? [In reply to]

On Wed, Jul 18, 2012 at 11:02 AM, Robin H. Johnson <robbat2 [at] gentoo> wrote:
> On Wed, Jul 18, 2012 at 07:53:37PM +0200, Ulrich Mueller wrote:
>> Our current policy [1] requires that ebuilds must assign the seven
>> variables DESCRIPTION, HOMEPAGE, SRC_URI, LICENSE, SLOT, KEYWORDS, and
>> IUSE, even if their value is empty.
>>
>> Could we drop this requirement? Repoman already enforces that
>> DESCRIPTION, HOMEPAGE, LICENSE, SLOT, and KEYWORDS are non-empty
>> (with some exceptions for virtuals). I don't see why we need to
>> distinguish the "empty value" and "not assigned" cases.
>>
>> For example, many live ebuilds already don't define SRC_URI. I'm not
>> aware of any problems caused by this.
> +1 from me.
>

++

Thanks,
Pesa


vapier at gentoo

Jul 25, 2012, 9:00 AM

Post #4 of 10 (256 views)
Permalink
Re: Don't require assignment of empty variables in ebuilds? [In reply to]

On Wednesday 18 July 2012 13:53:37 Ulrich Mueller wrote:
> Our current policy [1] requires that ebuilds must assign the seven
> variables DESCRIPTION, HOMEPAGE, SRC_URI, LICENSE, SLOT, KEYWORDS, and
> IUSE, even if their value is empty.
>
> Could we drop this requirement? Repoman already enforces that
> DESCRIPTION, HOMEPAGE, LICENSE, SLOT, and KEYWORDS are non-empty
> (with some exceptions for virtuals). I don't see why we need to
> distinguish the "empty value" and "not assigned" cases.

i think we should clarify and say that when an eclass provides these, the
ebuild need not. completely missing DESCRIPTION/HOMEPAGE should be a warning
(and maybe KEYWORDS), and LICENSE should be an error. there are plenty of
examples of SRC_URI not being set and that's fine (live ebuilds, ebuilds that
only install out of $FILESDIR, virtuals, etc...).
-mike
Attachments: signature.asc (0.82 KB)


ulm at gentoo

Jul 25, 2012, 9:38 AM

Post #5 of 10 (256 views)
Permalink
Re: Don't require assignment of empty variables in ebuilds? [In reply to]

>>>>> On Wed, 25 Jul 2012, Mike Frysinger wrote:

>> Our current policy [1] requires that ebuilds must assign the seven
>> variables DESCRIPTION, HOMEPAGE, SRC_URI, LICENSE, SLOT, KEYWORDS,
>> and IUSE, even if their value is empty.
>>
>> Could we drop this requirement? Repoman already enforces that
>> DESCRIPTION, HOMEPAGE, LICENSE, SLOT, and KEYWORDS are non-empty
>> (with some exceptions for virtuals). I don't see why we need to
>> distinguish the "empty value" and "not assigned" cases.

> i think we should clarify and say that when an eclass provides
> these, the ebuild need not. completely missing DESCRIPTION/HOMEPAGE
> should be a warning (and maybe KEYWORDS), and LICENSE should be an
> error. there are plenty of examples of SRC_URI not being set and
> that's fine (live ebuilds, ebuilds that only install out of
> $FILESDIR, virtuals, etc...).

I think we have to distinguish between PMS and tree policy here.
The package manager should be able to handle any empty or missing
variables (except for DESCRIPTION and SLOT). Otherwise we'd have to
complicate the spec with additional case distinctions, e.g. for
virtuals.

On the other hand, tree policy (as enforced by repoman) wouldn't
really change. In the cases you've mentioned above, it already
displays errors or warnings. Repoman also doesn't distinguish between
empty and unset variables. The single exception to this is IUSE, which
is required to be present in an ebuild even if it's empty. Maybe we
should drop this requirement, too.

Ulrich


pacho at gentoo

Jul 25, 2012, 9:56 AM

Post #6 of 10 (252 views)
Permalink
Re: Don't require assignment of empty variables in ebuilds? [In reply to]

El mié, 25-07-2012 a las 18:38 +0200, Ulrich Mueller escribió:
[...]
> The single exception to this is IUSE, which
> is required to be present in an ebuild even if it's empty. Maybe we
> should drop this requirement, too.

+1
Attachments: signature.asc (0.19 KB)


zerochaos at gentoo

Jul 25, 2012, 10:05 AM

Post #7 of 10 (261 views)
Permalink
Re: Don't require assignment of empty variables in ebuilds? [In reply to]

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

On 07/25/2012 12:56 PM, Pacho Ramos wrote:
> El mié, 25-07-2012 a las 18:38 +0200, Ulrich Mueller escribió:
> [...]
>> The single exception to this is IUSE, which
>> is required to be present in an ebuild even if it's empty. Maybe we
>> should drop this requirement, too.
>
> +1

So many pointless lines of code removed...

+1
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJQECdJAAoJEKXdFCfdEflKHbgP/30clLKhZOPB1A+2R64nYlQk
Nvt+YBHtN0kFcvKQMwFc9t7jGwhBiLPHfNBW4bfZnXuXA1PIl57/cx6EgmihYNVF
xwKkwCd43ri4IfBU8HDSM7hS0ZrOzy2hRoyEAE9G15ab7L71ZWb9wJoM41Zrweoa
IGHVBGFhv4MrFehRReC4Tt1MObFydlz4vofszh1/mpSPxSOx2124Mrmoe5WaWr2X
+KSEVtG7H8XM3U/eFiZNGDAtRc5lF1Qt4bxSop8FmTe3pCZTCdnUip+SydZ2nLc5
LVzc0YfFdbnasQ+ujO/sG8KVY/ScJzmJMSOrsUD+8oxDiLpAu3q9Dl3yqSYe44nz
P9njp6tubIuJ4DkbEn4wthcHW6OIatsxRM4rVSEOzQiWgTGGpOzyugRNkzYMJwdd
FcUGeHnwZ6QnfhDi1/MsT8XzykmuGuj2I6+Vr2V3NdXWk2qLUnqadElfxIKnqZA/
mIBTCbBue5R72gRHlPqoQHwbwIAatzU15d1Xo20YogOCeAAYNko7AVqF5Dc22yGZ
8MZzCZbPu03htfa5WABVT1tN5O8HoEeilAJAxTM/W6quYullo2yseuGInY0zU9BP
xf4uft+EHKCKBQF7+xYEpXdQicwtSMQSrnJgfX5r/QKWZpQDmEiyiYO9h2oO+Zxa
NRG/tAktlDVrVUvJ/kN1
=bmvc
-----END PGP SIGNATURE-----


mgorny at gentoo

Jul 25, 2012, 11:15 AM

Post #8 of 10 (251 views)
Permalink
Re: Don't require assignment of empty variables in ebuilds? [In reply to]

On Wed, 25 Jul 2012 18:38:05 +0200
Ulrich Mueller <ulm [at] gentoo> wrote:

> >>>>> On Wed, 25 Jul 2012, Mike Frysinger wrote:
>
> >> Our current policy [1] requires that ebuilds must assign the seven
> >> variables DESCRIPTION, HOMEPAGE, SRC_URI, LICENSE, SLOT, KEYWORDS,
> >> and IUSE, even if their value is empty.
> >>
> >> Could we drop this requirement? Repoman already enforces that
> >> DESCRIPTION, HOMEPAGE, LICENSE, SLOT, and KEYWORDS are non-empty
> >> (with some exceptions for virtuals). I don't see why we need to
> >> distinguish the "empty value" and "not assigned" cases.
>
> > i think we should clarify and say that when an eclass provides
> > these, the ebuild need not. completely missing DESCRIPTION/HOMEPAGE
> > should be a warning (and maybe KEYWORDS), and LICENSE should be an
> > error. there are plenty of examples of SRC_URI not being set and
> > that's fine (live ebuilds, ebuilds that only install out of
> > $FILESDIR, virtuals, etc...).
>
> I think we have to distinguish between PMS and tree policy here.
> The package manager should be able to handle any empty or missing
> variables (except for DESCRIPTION and SLOT). Otherwise we'd have to
> complicate the spec with additional case distinctions, e.g. for
> virtuals.

PMS should be able to handle empty DESCRIPTION (i.e. for hand-written
dirty test ebuilds). And an empty SLOT has its meaning.

--
Best regards,
Michał Górny
Attachments: signature.asc (0.31 KB)


vapier at gentoo

Jul 25, 2012, 11:32 AM

Post #9 of 10 (250 views)
Permalink
Re: Don't require assignment of empty variables in ebuilds? [In reply to]

On Wednesday 25 July 2012 12:38:05 Ulrich Mueller wrote:
> >>>>> On Wed, 25 Jul 2012, Mike Frysinger wrote:
> >> Our current policy [1] requires that ebuilds must assign the seven
> >> variables DESCRIPTION, HOMEPAGE, SRC_URI, LICENSE, SLOT, KEYWORDS,
> >> and IUSE, even if their value is empty.
> >>
> >> Could we drop this requirement? Repoman already enforces that
> >> DESCRIPTION, HOMEPAGE, LICENSE, SLOT, and KEYWORDS are non-empty
> >> (with some exceptions for virtuals). I don't see why we need to
> >> distinguish the "empty value" and "not assigned" cases.
> >
> > i think we should clarify and say that when an eclass provides
> > these, the ebuild need not. completely missing DESCRIPTION/HOMEPAGE
> > should be a warning (and maybe KEYWORDS), and LICENSE should be an
> > error. there are plenty of examples of SRC_URI not being set and
> > that's fine (live ebuilds, ebuilds that only install out of
> > $FILESDIR, virtuals, etc...).
>
> I think we have to distinguish between PMS and tree policy here.

who said anything about PMS ? ;) this thread was all about tree policy.

> The package manager should be able to handle any empty or missing
> variables (except for DESCRIPTION and SLOT). Otherwise we'd have to
> complicate the spec with additional case distinctions, e.g. for
> virtuals.

SLOT is about the only variable i could see possibly being required by PMS to
be set somewhere (whether eclass or ebuild doesn't matter). all the others we
could (and should) do away with from PMS requirement list considering our PMs
handle it fine.
-mike
Attachments: signature.asc (0.82 KB)


zmedico at gentoo

Aug 8, 2012, 7:04 PM

Post #10 of 10 (218 views)
Permalink
Re: Don't require assignment of empty variables in ebuilds? [In reply to]

On 07/25/2012 09:38 AM, Ulrich Mueller wrote:

> On the other hand, tree policy (as enforced by repoman) wouldn't
> really change. In the cases you've mentioned above, it already
> displays errors or warnings. Repoman also doesn't distinguish between
> empty and unset variables. The single exception to this is IUSE, which
> is required to be present in an ebuild even if it's empty. Maybe we
> should drop this requirement, too.

IUSE.undefined is removed in Portage git:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=f7ec7a4db6543e1fd3a13c341a37ccb667956978
--
Thanks,
Zac

Gentoo dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.