GLEP:56
Title:USE flag descriptions in metadata
Version:1.4
Last-Modified:2008/09/02 20:37:40
Author:Doug Goldstein <cardoe at gentoo.org>
Status:Final
Type:Standards Track
Content-Type:text/x-rst
Created:03-Jun-2008
Post-History:05-June-2008, 13-Jun-2008

Contents

Abstract

This GLEP proposes to add per-package USE flag descriptions to each package's metadata.

Motivation

Gives Gentoo users the ability to better identify how USE flags affect their installations of a given package. For example, many global USE flags have very generic descriptions but no specifics on how it affects a certain package. Specifically speaking, an example would be net-print/cups and the 'jpeg' USE flag. Does this flag mean you won't be able to print jpeg files? You can print them directly? It's interface won't use jpeg files.

Specification

This GLEP proposes the addition of <use> XML tag that is only allowed to appear inside of a <pkgmetadata> XML tag.

Documentation for the Gentoo Developer Handbook [4] and the metadata.dtd can be found in Gentoo's Bugzilla [1] bug #199788.

The following are two concrete examples in tree, [2] and [3].

And the following is an embedded example and not from a real package:

<use>
        <flag name='acpi'>Enables HAL to attempt to read from
        /proc/acpi/event, if unavailable, HAL will read events from
        <pkg>sys-power/acpid</pkg>. If you need multiple acpi readers,
        ensure acpid is in your default runlevel
        (rc-update add acpid default) along with HAL. This will also
        enable HAL to read Toshiba and IBM acpi events which do not
        get sent via /proc/acpi/event</flag>
        <flag name='spell'>Enables spell checking capability using
        dictionaries found in <cat>app-dict</cat></flag>
</use>

Credits

Thanks to the following persons for their input on or related to this GLEP (even though they might not have known it): Diego Pettenò (flameeyes), Alec Warner (antarus), Joshua Nichols (nichoj), Steve Dibb (beandog), and Tiziano Müller (dev-zero)

References

[1]http://bugs.gentoo.org/show_bug.cgi?id=199788
[2]http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/hal/metadata.xml?view=markup
[3]http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-tv/mythtv/metadata.xml?view=markup
[4](1, 2, 3) http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml?part=2&chap=4
[5]http://devmanual.gentoo.org/ebuild-writing/file-format/index.html
[6]http://blog.flameeyes.eu/articles/2007/11/19/lets-actually-get-some-metadata
[7]http://blog.cardoe.com/archives/2007/11/19/use-flag-metadata/
[8]http://blog.cardoe.com/archives/2007/11/23/metadataxml-updates-examples/
[9]http://technicalpickles.com/posts/pidgin-idle-time

Backwards Compatibility

No changes are necessary to existing metadata.xml files. Information in the new tags is not mandatory. Tools that currently read metadata.xml files may break if written poorly, while well written tools should just ignore the additional elements. Tools which are capable of handling the new tags should prefer their data over use.desc and use.local.desc.

USE flags still must be defined in use.desc or use.local.desc. If the USE flag is not found in either use.desc or use.local.desc, the information contained within the new tags in metadata.xml must be ignored and QA tools should warn as they currently do.

Once this GLEP is approved, the Gentoo Infrastructure Team will work to remove the use.local.desc file from CVS and it will be auto-generated for rsync. This will ensure that backwards compatibility is not broken for users of non-CVS trees. At this time, QA tools will need to be updated to verify the contents of metadata.xml containing the necessary tags which would appear in use.local.desc.