Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 107756 - anacron breaks if emerged subsequently & /var/spool/anacron is empty
Summary: anacron breaks if emerged subsequently & /var/spool/anacron is empty
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Cron Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-30 23:43 UTC by kfm
Modified: 2005-10-01 13:19 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kfm 2005-09-30 23:43:41 UTC
I noticed this upon emerging anacron without realising that I had emerged it
already some time ago. Upon the first merge, things are setup as expected. But
if one then merges it again then it removes the /var/spool/anacron directory
during the clean stage (because it's empty and thus, considered a valid
candidate for removal). This breaks anacron of course.

Naturally, this won't happen if /var/spool/anacron is populated between
invocations - as it probably would have been in my case had I made any use of
the program before any subsequent merge operations.

My suggestion is to change line #35 of "anacron-2.3-r2.ebuild" so that it makes
use of the keepdir function instead of dodir:

  keepdir /var/spool/anacron

I would be grateful if this this fix could be applied at the herd's earliest
convenience. Thanks.
Comment 1 kfm 2005-09-30 23:49:16 UTC
Furthermore, if there is still a genuine requirement to clean up this directory
after a removal then I suppose one could use the pkg_postrm() function to nuke
the directory although I wouldn't be in favour of such a technique myself.
Comment 2 Aaron Walker (RETIRED) gentoo-dev 2005-10-01 10:56:48 UTC
(In reply to comment #1)
> Furthermore, if there is still a genuine requirement to clean up this directory
> after a removal then I suppose one could use the pkg_postrm() function to nuke
> the directory although I wouldn't be in favour of such a technique myself.

The ebuild wasn't trying to clean up anything; that's just what happens when
dodir is used where keepdir should be used.

In cvs.
Comment 3 kfm 2005-10-01 13:19:19 UTC
I know - that's why I filed it as a bug, after all. I was just thinking out
aloud (the spool data can probably be considered cruft upon removal of this
packet). Thanks.