Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 2553 - The /var/cache directory fhs specification
Summary: The /var/cache directory fhs specification
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Portage team
URL: http://www.pathname.com/fhs/2.2/fhs-5...
Whiteboard:
Keywords: InVCS
: 34035 50200 64140 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-05-07 17:07 UTC by squeeze
Modified: 2011-10-30 22:21 UTC (History)
6 users (show)

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 squeeze 2002-05-07 17:07:54 UTC
I hope I'm not confused or anything here but I spend some time looking into the
FHS specifications. If found one interesting part about /var/cache. It states:

...
The application must be able to regenerate or restore the data. Unlike
/var/spool, the cached files can be deleted without data loss.
...

I haven't found a tool that can regenerate the virtual file and it seems like
/var/db/pkg/virtual/ isn't used anymore (not on my system anyway 1.1a).
The world file can be regenerated but the tool doesn't exist in portage. The
"worldsync" tool will add ALL non system packages which may not be true for the
old world file.

Well any sane user shouldn't delete the edb directory but the FHS spec. says
it's ok to do so and the app should regenerate the deleted files.

Are my teories totaly wrong? Have I misunderstood how the edb files are working?
Is Gentoo not FHS compliant?
Comment 1 Sandy McArthur 2002-06-10 00:16:06 UTC
On a similar note if you delete /var/cache/edb you get errors like:

Calculating world dependencies \Traceback (most recent call last):
  File "/usr/bin/emerge", line 1278, in ?
    mydepgraph.syscreate(getworldlist())
  File "/usr/bin/emerge", line 481, in syscreate
    self.create(self.match(myline,mykey="update (likely old /var/db/pkg entry)"))
  File "/usr/bin/emerge", line 400, in create
    mydb=open(mydbkey,"r")
IOError: [Errno 2] No such file or directory:
'/var/cache/edb/dep/dep-man-pages-1.50.ebuild'

The workaround is to run `mkdir -p /var/cache/edb/dep`. It would be nice if
portage did that for you.
Comment 2 Daniel Robbins (RETIRED) gentoo-dev 2002-12-09 13:20:17 UTC
some stuff in /var/cache really belongs somewhere else.
Comment 3 SpanKY gentoo-dev 2003-11-21 11:25:32 UTC
*** Bug 34035 has been marked as a duplicate of this bug. ***
Comment 4 SpanKY gentoo-dev 2004-05-06 17:48:23 UTC
*** Bug 50200 has been marked as a duplicate of this bug. ***
Comment 5 Nicholas Jones (RETIRED) gentoo-dev 2004-05-16 03:55:01 UTC
All major FHS issues should be dealt with in portage-2.0.51

/var/cache/edb
can be deleted at will. It's actually cache data now.

/var/lib/portage
contains state data & world file
Comment 6 Brian Harring (RETIRED) gentoo-dev 2004-09-15 08:09:32 UTC
*** Bug 64140 has been marked as a duplicate of this bug. ***
Comment 7 Nicholas Jones (RETIRED) gentoo-dev 2004-10-22 08:47:54 UTC
Bug has been fixed and released in stable portages on or before 2.0.51-r2
Comment 8 John Nilsson 2005-03-28 12:24:38 UTC
As every bug on portage and FHS seems to be marked duplicate to this i'll comment here.

I've searched gentoo-dev and bugs.gentoo.org but I can't seem to find a solid debate regarding DISTDIR and PKGDIR with regards to the FHS.

Is there a conclusion somewhere that I've missed?

With regards to the ideas discussed in http://forums.gentoo.org/viewtopic-p-2218914.html maybe the default location of these should change.

DISTDIR
=======

/var/cache
----------
It could be regarded as cached data but I'm uncertain if downloadable fits within "Such data is locally generated as a result of time-consuming I/O or calculation."

/usr/src
-------- 
"Source code may be place placed in this subdirectory, only for reference purposes." This seems like an intuitive place to look for such data, but this only holds true for installed applications.


/usr/share
----------
This is the place to put data meant to be shared between hosts in a heterogenous network, which very much describes this data (this also describes the current portage tree it self, but something tells me this will change in the future).
However the FHS makes it clear that /usr  is read only data that must not be written to and should not vary over time, probably to address fragmentation issues so /var seems more sensible.


PKGDIR
======

This is certainly "locally generated as a result of time-consuming I/O or calculation." so /var/cache is clearly the right choice.