Re: [PATCH] 473260 - unmount swap files on upgrades

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

 



> > +        # path is something stupid like instPath+"swap", which is totally
> > +        # useless.  But we don't have instPath anywhere else so trim off
> > +        # the end of path.
> > +        swapFile = path[:path.rfind("/")] + device.device
> 
> I'm not quite following what this line does.  Is it doing a dirname on
> path and then adding device.device to it?  I guess I don't understand
> why this is necessary, or why we can't use realpath() to normalize it
> before sending it to swapoff.

path is "/mnt/sysimage/swap".  device.device is "/var/swap".  We need to
combine the two to make "/mnt/sysimage/var/swap".  dirname would
definitely be smarter here.  Can you tell it was way at the end of the
day when I was writing this?

> > +
> > +        iutil.execWithRedirect("swapoff", [swapFile],
> > +                               stdout="/dev/tty5", stderr="/dev/tty5",
> > +                               searchPath=1)
> >  
> 
> Do we care about swapoff failing and notifying the caller?

We probably should, yes, but we do a pretty bad job of catching
exceptions from other places where umount can fail so I didn't consider
it to be too important.  Easy enough to fix.

- Chris

_______________________________________________
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