Bug 771713 - RFE: Add a /var/lib/rpm-state directory
Summary: RFE: Add a /var/lib/rpm-state directory
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: filesystem
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ondrej Vasik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-04 18:18 UTC by Toshio Ernie Kuratomi
Modified: 2012-01-12 14:16 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-01-12 14:16:44 UTC
Type: ---


Attachments (Terms of Use)

Description Toshio Ernie Kuratomi 2012-01-04 18:18:33 UTC
Description of problem:

Sometimes it's possible to write rpm scriptlets that start operation in one scriptlet but finish operation in another.  One concrete usage is when updating a cache after a type of rpm is installed.  The program that is run to update the cache only needs to be run once so the rpm package can use %post and %postun to write out a file flagging that the cache-creating program needs to be run and then %posttrans can actually invoke the program if that file exists (and delete the file after running).

We need a place to store those files that pass state information from one rpm scriptlet to another.  The FPC has recently approved use of subdirectories of /var/lib/rpm-state for a couple guidelines for this purpose.  It would be nice to have one package that owns the /var/lib/rpm-state directory rather than multiple packages (each time a set of packages needs to save state).  Could it be added to the rpm package?

Comment 1 Panu Matilainen 2012-01-12 08:46:44 UTC
Adding a single directory to the rpm package is not a big deal, but it doesn't really ensure the directory will be there when needed. On initial install, rpm itself gets installed relatively late in the process and there could've been any number of these "stateful" scripts executed by then. From that POV, filesystem package would be a better choice for the directory.

Comment 2 Toshio Ernie Kuratomi 2012-01-12 12:32:42 UTC
Makes sense to me.  /me retargets to filesystem.

Comment 3 Ondrej Vasik 2012-01-12 14:16:44 UTC
Makes sense ... added to filesystem package in filesystem-2.4.46-1.fc17 . Closing RAWHIDE.


Note You need to log in before you can comment on or make changes to this bug.