[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [PATCH] 473260 - unmount swap files on upgrades
- From: Chris Lumens <clumens redhat com>
- To: anaconda-devel-list redhat com
- Subject: Re: [PATCH] 473260 - unmount swap files on upgrades
- Date: Fri, 5 Dec 2008 23:36:19 -0500
> > + # 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
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]