[rhel7/master] Make sure post script directory exists (#1080396)

Brian C. Lane bcl at redhat.com
Wed Dec 3 15:53:15 UTC 2014


On Tue, Dec 02, 2014 at 09:57:04PM -0500, Colin Walters wrote:
> On Tue, Dec 2, 2014, at 07:06 PM, Brian C. Lane wrote:
> > In some cases the full path for the post script may not exist (eg.
> > liveimg without a /tmp) so make sure it is there before writing the
> > script to it.
> 
> I don't quite understand...the're making a tarball that doesn't have a /tmp directory?  If so, that seems like a fix-the-content thing.

Right, but in that case you don't figure that out until you've created
your root and run your install. I agree that's the right way to fix
things. But we should also make sure the path exists.

>  
> > Related: rhbz#1080396
> > ---
> >  pyanaconda/kickstart.py | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
> > index 4122c02..ec21881 100644
> > --- a/pyanaconda/kickstart.py
> > +++ b/pyanaconda/kickstart.py
> > @@ -95,6 +95,9 @@ class AnacondaKSScript(KSScript):
> >          else:
> >              scriptRoot = "/"
> >  
> > +        if not os.path.exists(scriptRoot + "/tmp"):
> > +            os.makedirs(scriptRoot + "/tmp")
> 
> iutil.mkdirChain ?

Yes, that's better, thanks for catching that.

-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)


More information about the anaconda-patches mailing list