[blivet] Allow specifying which swaps should appear in fstab
David Lehman
dlehman at redhat.com
Mon Oct 7 15:39:45 UTC 2013
On Mon, 2013-10-07 at 17:21 +0200, Vratislav Podzimek wrote:
> On Mon, 2013-10-07 at 09:53 -0500, David Lehman wrote:
> > On Mon, 2013-10-07 at 10:19 +0200, Vratislav Podzimek wrote:
> > > On Fri, 2013-10-04 at 11:19 -0500, David Lehman wrote:
> > > > On Thu, 2013-10-03 at 16:04 +0200, Vratislav Podzimek wrote:
> > > > > Not all swaps should be used by the system in some cases.
> > > >
> > > > You didn't change the FSSet code to use the surrounding coding style.
> > > What do you mean by "surrounding coding style"? I've renamed the newly
> > > added methods to use camelCase instead of underscores. Is there anything
> > > else I should change? And shall I add the sphinx doc markup as Brian
> > > suggests?
> >
> > Oh -- I see now that you just forgot to use the new FSSet method names
> > in the corresponding Blivet wrapper methods, eg:
> >
> > + def addFstabSwap(self, device):
> > + """
> > + Add swap device to the list of swaps that should appear in the
> > fstab.
> > +
> > + """
> > +
> > + self.fsset.add_fstab_swap(device)
> >
> > self.fsset.add_fstab_swap no longer exists as a result of this same
> > patch.
> Yeah, you're right. Fixing locally.
>
> >
> > Sphinx docs would be nice. I have been writing/converting docstrings for
> > the rest of blivet.
> Good, I'll add them.
>
> Does the rest look good to you?
I just looked over it again.
Please do only filter the swaps if flags.installer_mode.
Also, you could define new_swaps as follows:
new_swaps = [dev for dev in storage.swaps if not dev.format.exists]
It would allow you to remove the old_swaps bit and otherwise simplify.
That's it, though -- looks good.
More information about the anaconda-patches
mailing list