On Thu, Jan 15, 2004 at 04:54:24PM -0500, in <[EMAIL PROTECTED]>, Jeremy 
Maitin-Shepard <[EMAIL PROTECTED]> wrote:
> Matthew Kennedy <[EMAIL PROTECTED]> writes:
> > IMHO we should go with the following as a default:
> 
> >     /usr/portage/packages -> /var/cache/packages
> >     /usr/portage -> /usr/share/portage
> 
> I agree packages should go to /var/cache/, but perhaps in a
> subdirectory in /var/cache/portage, such as
> /var/cache/portage/packages.
> 
> The portage ebuild tree also qualifies as cache data, however, since it
...snip...

My two yen:

'/usr/portage' is the wrong place for the Portage tree. The data is
certainly sharable, but certainly *not* static. Furthermore, FHS states
"Large software packages must not use a direct subdirectory under the
/usr hierarchy." The Portage tree should be moved, for FHS compliance,
for the reasons listed in the FHS rationale, and for the reasons discussed
elsewhere in this thread.

But to where?

The catch is this: if the machine in question is running on a network that
actually *shares* its sharable data (e.g. the /usr hierarchy), it makes
sense to put the the Portage tree somewhere under /usr. Except during sync
operations (which would be performed by the host serving the /usr tree),
the Portage tree remains generally unmodified, so it fits the requirement
of "...read-only data ... must not be written to." Even though many
files in the Portage tree are architecture-specific, _the_tree_itself_
is architecture- and host-independent.

Unfortunately, a Gentoo machine is a very dynamic environment. The Portage
tree changes drastically and often. On a machine which maintains its own
Portage tree, '/var' is absolutely the right place to look. FHS provides
two likely options: '/var/cache' (application cache data) and '/var/lib'
(variable state data). The DISTDIR, on the other hand, is much less
dynamic and could still find a home under '/usr'.

The latest version of FHS also provides another beautiful option:
'/srv'. The intent of this addition seems to be a "/home" tree for
"users" that are really services/daemons. Something to keep in mind when
we start upgrading to the new FHS.

I propose the following be adopted as "reasonable defaults" for Portage.
PORTDIR=/var/cache/portage         # change to /usr/share/portage on
                                   # a network which shares /usr
DISTDIR=/usr/src/distfiles
PKGDIR=/usr/share/package/portage  # Any suggestions on pkgdir and rpmdir?
RPMDIR=/usr/share/package/rpm      # These don't seem quite right
PORTAGE_TMPDIR=/var/tmp
PORT_LOGDIR=/var/log/portage

Also, move the contents of '/var/cache/edb' and '/var/db/pkg' to
'/var/lib/portage'. FHS specifically mentions '/var/db' as a BSDism
that should be moved to '/var/lib'; '/var/cache/edb' contains state
data, rather than cache data. This change should not be too difficult
to effect. Only 57 lines of code specifically mention '/var/cache/edb'
and 75 mention '/var/db'. To be painfully honest, there are a number of
Python constructs I do not yet understand, but I think I have a reasonable
grasp of how Portage actually works.

-- 
Batou: Hey, Major... You ever hear of "human rights"?
Kusanagi: I understand the concept, but I've never seen it in action.
  --Ghost in the Shell

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to