Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 358073 - app-portage/gentoolkit improvement for revdep-rebuild
Summary: app-portage/gentoolkit improvement for revdep-rebuild
Status: IN_PROGRESS
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-09 14:20 UTC by Agostino Sarubbo
Modified: 2022-07-10 23:32 UTC (History)
2 users (show)

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


Attachments
Patch to use /tmp if /var/cache dir is gone (revdep-rebuild-cachedir-gone.patch,643 bytes, patch)
2011-04-24 18:29 UTC, James Broadhead
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2011-03-09 14:20:36 UTC
I noticed that if i remove (or is not present) /var/cache/revdep-rebuild when i launch revdep-rebuild it fails.

Example:

devil ago # rm -fr /var/cache/revdep-rebuild/
devil ago # revdep-rebuild 
 * Configuring search environment for revdep-rebuild
 * Unable to find a satisfactory location for temporary files (/var/cache/revdep-rebuild)

Is a good idea edit revdep-rebuild and add a "check phase" of that dir and create a if it is not present?
Comment 1 James Broadhead 2011-04-24 18:29:44 UTC
Created attachment 271029 [details, diff]
Patch to use /tmp if /var/cache dir is gone

Patch to fix -- will default to /tmp if the /var/cache/revdep-rebuild dir is deleted for some reason.
Comment 2 James Broadhead 2011-04-24 19:55:43 UTC
Patched version of revdep-rebuild now available in my overlay. 

jamesbroadhead.googlecode.com/hg/portage-overlay
Comment 3 Agostino Sarubbo gentoo-dev 2012-10-11 18:37:44 UTC
any progress here?
Comment 4 Brian Dolbec gentoo-dev 2013-02-02 22:58:44 UTC
Paul, I found this in the python version of revdep.  It just errors if the cache dir doesn't exist.


 in cache.py's  save_cache():

# TODO: Don't blindly make the cache directory, see Bug 203414
#	if not os.path.exists(temp_path):
#		os.makedirs(temp_path)


So, what specifically do we need to do if anything.
Comment 5 Paul Varner (RETIRED) gentoo-dev 2013-02-03 16:19:43 UTC
For the python version, it is not a fatal error, it just does not save the information.  

What we need to do is the following:

1. Verify that /var/cache is not a symlink (if it is, we error and point to instructions on how to bind mount: http://dev.gentoo.org/~fuzzyray/revdep-rebuild-symlink.txt)
2. If is not a symlink, we can create it and make sure that is is owned by root with read/write/execute (0700) permissions only.
Comment 6 Brian Dolbec gentoo-dev 2022-07-10 23:32:33 UTC
current code does a makedirs if it doesn't exist.

Will see about checking symlink condition