public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Alexandre Rostovtsev <tetromino@gentoo.org>
To: Gentoo Dev <gentoo-dev@lists.gentoo.org>,
	Gentoo PMS <gentoo-pms@lists.gentoo.org>
Subject: [gentoo-dev] RFC: deprecate /usr/share/doc/$PF
Date: Sun, 18 Dec 2011 16:49:38 -0500	[thread overview]
Message-ID: <CAL0O3aMcqPqDdDgbSodGfjigkd7v4dU=NrPv_CgYcyycnt1k4g@mail.gmail.com> (raw)

At the moment, Gentoo documentation is supposed to be installed in
/usr/share/doc/$PF. Given the existence of slots, this directory
scheme makes little sense; versioning documentation directories with
$PF seems nearly as silly as would be e.g. appending $PVR to the
filenames of installed man pages. Moreover, /usr/share/doc/$PF results
in a number of problems:

* Since $PF changes on every revision bump and minor version change,
one cannot bookmark a documentation file for a frequently updated
package without using custom portage hooks or scripts that create
stable symlinks to docs.
* Since $PF changes on every revision bump and minor version change,
it's unnecessarily inconvenient to see which documentation files were
added or removed when upgrading a package.
* The package's documentation may be designed primarily for tools and
viewers which expect to load documentation files from a different
location.

I propose the following changes, and will write them up in GLEP form
if the feedback is positive.

1. If a package's documentation is designed to be accessed by a
specific documentation viewer tool, then the package should install
the documentation in a location where that tool will look for it (e.g.
devhelp expects to find GNOME API documentation in
/usr/share/gtk-doc/html, and khelpcenter expects to find KDE handbooks
in /usr/share/doc/HTML). This already happens in practice, but some
devs had expressed opposition to this (e.g. bug #312363) because it
had not been formalized as policy.

2. In EAPI-5 and higher, other documentation should be installed under
/usr/share/doc:
   a. if SLOT = "0": in /usr/share/doc/$CATEGORY/$PN by default, xor
(at the package maintainer's discretion) in
/usr/share/doc/$CATEGORY/$PN-0.
   b. if SLOT != "0": in /usr/share/doc/$CATEGORY/$PN-$SLOT.

3. In EAPI-5 and higher, dodoc/newdoc/dohtml will install documentation in:
   a. If SLOT = "0": /usr/share/doc/$CATEGORY/$PN/<docinto path>
(/usr/share/doc/$CATEGORY/$PN/html for dohtml);
   b. If SLOT != "0": /usr/share/doc/$CATEGORY/$PN-$SLOT/<docinto
path> (/usr/share/doc/$CATEGORY/$PN-$SLOT/html for dohtml).
   Corresponding changes will also have to be made to docompress, and
to the eclasses that currently use /usr/share/doc/${PF} as docdir.

4. In EAPI-0,1,2,3,4, ebuilds may, at the maintainer's discretion,
install documentation in the old /usr/share/doc/$PF location xor in
the new EAPI-5 location.

Answers to anticipated questions:

Q1: Why let docs designed to be viewed with special viewers be
installed outside /usr/share/doc?
A1: To match upstream expectations and to minimize maintenance burden.
This burden can be significant; for example, if documentation for
package A contains explicit links to documentation pages for package
B, then if the documentation pages are not installed where upstream
expects them, those links would have to be adjusted, probably via a
fragile script with untested corner cases.

Q2: Why /usr/share/doc/$CATEGORY/$PN-$SLOT instead of /usr/share/doc/$PN-$SLOT?
A2: To prevent file collisions between packages in different
categories but with identical package and slot names.

Q3: Why $PN-$SLOT instead of $PN:$SLOT?
A3: So that the directory names are compatible with bash's tab-completion.

Q4: Why install slot 0 docs in $CATEGORY/$PN by default instead of
$CATEGORY/$PN-0?
A4: Purely for aesthetics. A vast number of packages in the main tree
are only slot 0 and are unlikely to ever become slotted in the future,
so installing their docs in /usr/share/doc/$CATEGORY/$PN is logical,
pleasing to the eye, and results in shorter directory names.

Q5: Then why allow package maintainers to alternatively use $CATEGORY/$PN-0?
A5: Why not? It will not hurt anything, will not cause file
collisions, and some maintainers of a multislotted package, one of
which is 0, might prefer to install that slot's docs in
$CATEGORY/$PN-0 to prevent a potential impression that docs in
$CATEGORY/$PN apply to all of that package's slots.

Q6: Why can't the dodoc/dohtml path be changed before EAPI-5?
A6: Because the path where dodoc and dohtml install files is part of
the PMS. Portage can't just change it on its own. A possible
workaround for current EAPIs is adding new-style dodoc/dohtml
analogues to an eclass.

Q7: Why allow package maintainers to start using the new naming scheme
in earlier EAPIs?
A7: Because /usr/share/doc/$PF really is quite inconvenient for users
wanting to browse API documentation, and package maintainers may wish
to alleviate the users' pain before the EAPI-5 becomes finalized and
support for it is added to the eclasses that the ebuild needs.

-Alexandre.



             reply	other threads:[~2011-12-18 21:50 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-18 21:49 Alexandre Rostovtsev [this message]
2011-12-18 22:02 ` [gentoo-dev] RFC: deprecate /usr/share/doc/$PF Michał Górny
2011-12-18 23:07   ` Pacho Ramos
2011-12-19  8:31     ` Michał Górny
2011-12-19 10:47       ` Pacho Ramos
2011-12-19  2:26   ` Alexandre Rostovtsev
2011-12-19  2:41     ` Jeroen Roovers
2011-12-19  5:31       ` Alexandre Rostovtsev
2011-12-19 11:48         ` Jeroen Roovers
2011-12-18 22:07 ` Chí-Thanh Christopher Nguyễn
2011-12-19  0:56   ` Alexandre Rostovtsev
2011-12-19  0:08 ` Ulrich Mueller
2011-12-19  1:52   ` Alexandre Rostovtsev
2011-12-19  4:23     ` Ulrich Mueller
2011-12-19  4:48       ` Dale
2011-12-19 13:29         ` [gentoo-dev] " Duncan
2011-12-19  6:41       ` [gentoo-dev] " Alexandre Rostovtsev
2011-12-19  8:23         ` Ulrich Mueller
2011-12-19 13:51           ` [gentoo-dev] " Duncan
2011-12-19  9:02         ` [gentoo-dev] " Michał Górny
2011-12-19  9:03           ` Ciaran McCreesh
2011-12-19  8:35       ` Michał Górny
2011-12-19 10:08       ` Stelian Ionescu
2011-12-21  1:44     ` Maciej Mrozowski
2011-12-21  3:40       ` Mike Frysinger
2011-12-27 17:29         ` Maciej Mrozowski
2012-01-18 11:12           ` Mike Frysinger
2011-12-27 17:39 ` Andreas K. Huettel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAL0O3aMcqPqDdDgbSodGfjigkd7v4dU=NrPv_CgYcyycnt1k4g@mail.gmail.com' \
    --to=tetromino@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    --cc=gentoo-pms@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox