public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] keepdir /var/run/package/?
@ 2010-08-12 18:29 Eray Aslan
  2010-08-12 18:36 ` Michael Sterrett
  2010-08-12 18:37 ` "Paweł Hajdan, Jr."
  0 siblings, 2 replies; 15+ messages in thread
From: Eray Aslan @ 2010-08-12 18:29 UTC (permalink / raw
  To: gentoo-dev

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:

http://bugs.gentoo.org/show_bug.cgi?id=332397

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}"
 </body>
 </section>
 
+<section>
+<title>Invalid use of <c>keepdir</c>in src_install</title>
+<body>
+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.
+</body>
+</section>
+
 </chapter>
 
 </guide>

-- 
Eray



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2010-08-14 20:46 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-12 18:29 [gentoo-dev] keepdir /var/run/package/? Eray Aslan
2010-08-12 18:36 ` Michael Sterrett
2010-08-12 18:42   ` Eray Aslan
2010-08-12 18:48     ` Samuli Suominen
2010-08-12 19:02       ` Jeremy Olexa
2010-08-12 19:33       ` Eray Aslan
2010-08-12 19:40         ` Mike Frysinger
2010-08-13 16:17           ` Mike Frysinger
2010-08-13 16:19             ` Mike Frysinger
2010-08-13 17:04             ` Ulrich Mueller
2010-08-13 19:07               ` Mike Frysinger
2010-08-14 19:39                 ` Ulrich Mueller
2010-08-14 20:46                   ` Mike Frysinger
2010-08-13 16:20           ` Jeroen Roovers
2010-08-12 18:37 ` "Paweł Hajdan, Jr."

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox