Gentoo Logo
Gentoo Spaceship

Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-dev
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
To: gentoo-dev@g.o
From: Eray Aslan <eray.aslan@...>
Subject: keepdir /var/run/package/?
Date: Thu, 12 Aug 2010 21:29:27 +0300
It is perfectly legal to clear /var/run across reboots.  Below is a bug
from a user that ran into some trouble because an init script assumes that
/var/run/package/ exists for its PID file:

A quick grep through the tree shows 73 packages that keepdirs
/var/run/package/.  Perhaps not all of them are bugs but they are
certainly redundant.

A mass bug-filing is probably not the correct thing to do but perhaps we
should document somewhere (devmanual?) that keepdir'ing a temp location
should be avoided.  Suggestion:

--- a/ebuild-writing/common-mistakes/text.xml
+++ b/ebuild-writing/common-mistakes/text.xml
@@ -41,6 +41,18 @@ elog "They are listed in the INSTALL file in /usr/share/doc/${PF}"
+<title>Invalid use of <c>keepdir</c>in src_install</title>
+The <c>keepdir</c> function should only be used to prevent directory removal
+during uninstallation.  In particular, using <c>keepdir</c> for a temporary
+location - such as /var/run/package/ for a PID file - should be avoided.  In
+such a case, init script either should make sure that /var/run/package/ exists
+or the package should use /var/run directly.  Please note that /var/run can and
+will be cleaned across reboots.


Re: keepdir /var/run/package/?
-- Michael Sterrett
Re: keepdir /var/run/package/?
-- PaweĊ‚ Hajdan, Jr.
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Last rites: sys-apps/ivman
Next by thread:
Re: keepdir /var/run/package/?
Previous by date:
Re: status of releng project
Next by date:
Re: keepdir /var/run/package/?

Updated Jun 29, 2012

Summary: Archive of the gentoo-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.