Re: [PATCH 05/10] Implement some of the various post-install tasks.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2012-05-02 at 15:52 -0400, Chris Lumens wrote:
> > diff --git a/pyanaconda/packaging/__init__.py b/pyanaconda/packaging/__init__.py
> > index e6026ca..07704da 100644
> > --- a/pyanaconda/packaging/__init__.py
> > +++ b/pyanaconda/packaging/__init__.py
> > @@ -458,22 +458,84 @@ class Payload(object):
> >          """ Install the payload. """
> >          raise NotImplementedError()
> >  
> > +    def _copyDriverDiskFiles(self):
> > +        import glob
> > +        import shutil
> > +
> > +        new_firmware = False
> > +
> > +        # Multiple driver disks may be loaded, so we need to glob for all
> > +        # the firmware files in the common DD firmware directory
> > +        for f in glob.glob(DD_FIRMWARE+"/*"):
> > +            try:
> > +                shutil.copyfile(f, "%s/lib/firmware/" % ROOT_PATH)
> > +            except IOError as e:
> > +                log.error("Could not copy firmware file %s: %s" % (f, e.strerror))
> > +            else:
> > +                new_firmware = True
> > +
> > +        #copy RPMS
> > +        for d in glob.glob(DD_RPMS):
> > +            shutil.copytree(d, ROOT_PATH + "/root/" + os.path.basename(d))
> > +
> > +        #copy modules and firmware into root's home directory
> > +        if os.path.exists(DD_ALL):
> > +            try:
> > +                shutil.copytree(DD_ALL, ROOT_PATH + "/root/DD")
> > +            except IOError as e:
> > +                pass
> 
> What IO errors do we see occurring both here and above?  And, if we
> expect that any will actually occur, does just passing or logging and
> continuing (basically silently) really make sense, or is this something
> the user actually needs to know about?

Good question. I copied this code verbatim from current backend.py. At
the very least we should log an error. IOError is just what
shutil.copytree raises any time is fails to copy something for any
reason IIRC.

> 
> - Chris
> 
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux