Bug 1195204 - `virt-builder` should create $HOME/.cache directory if it already doesn't exist
Summary: `virt-builder` should create $HOME/.cache directory if it already doesn't exist
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Pino Toscano
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-23 11:14 UTC by Kashyap Chamarthy
Modified: 2015-02-24 09:24 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-24 09:24:52 UTC
Embargoed:


Attachments (Terms of Use)

Description Kashyap Chamarthy 2015-02-23 11:14:20 UTC
Description of problem:

If $HOME/.cache directory does not exist, `virt-builder` will disable caching -- it fails to create $HOME/.cache/virt-builder directory as it assumes the parent directory $HOME/.cache/ already exists.

It is desirable to have `virt-builder` to create the $HOME/.cache (if it already doesn't exist) so that the downloaded operating system templates can be cached. 

So, it should do something like:

  mkdir -p $HOME/.cache/virt-builder
 

Version-Release number of selected component (if applicable):

  libguestfs-1.29.26-1.fc23

How reproducible: All the time

Comment 1 Richard W.M. Jones 2015-02-23 11:21:50 UTC
I have observed this too, especially for /root for some reason.

Comment 2 Kashyap Chamarthy 2015-02-24 09:23:14 UTC
Pino posted a patch upstream, that's also ACKed

  https://www.redhat.com/archives/libguestfs/2015-February/msg00188.html

Comment 3 Pino Toscano 2015-02-24 09:24:52 UTC
Fixed with
https://github.com/libguestfs/libguestfs/commit/652af7a33ac769b063cadddc41786dc69bbe2792
which is libguestfs >= 1.29.27.


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