[blivet][master] drop useless entries from formatByDefault exceptlist
Adam Williamson
awilliam at redhat.com
Fri Jan 23 09:23:43 UTC 2015
On Fri, 2015-01-23 at 10:01 +0100, Vratislav Podzimek wrote:
> On Thu, 2015-01-22 at 13:15 -0800, Adam Williamson wrote:
> > These will never match, as the 'exceptlist' is only used to
> > except devices whose mountpoint starts with one of the
> > 'formatlist' entries, and / is not in 'formatlist'.
> > ---
> > blivet/__init__.py | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/blivet/__init__.py b/blivet/__init__.py
> > index 88809fb..691e45c 100644
> > --- a/blivet/__init__.py
> > +++ b/blivet/__init__.py
> > @@ -1369,7 +1369,7 @@ class Blivet(object):
> > def formatByDefault(self, device):
> > """Return whether the device should be reformatted by
> > default."""
> > formatlist = ['/boot', '/var', '/tmp', '/usr']
> > - exceptlist = ['/home', '/usr/local', '/opt', '/var/www']
> > + exceptlist = ['/usr/local', '/var/www']
> >
> > if not device.format.linuxNative:
> > return False
>
> Looks good to me. We may need some bigger change here to keep /home
> and /opt as exceptions, but that's something for a future work (in
> case it's needed).
Nothing is needed, because there's no 'startswith' match for / . It's
only matched exactly. The code as it stands is already be fine with
/home , /opt , or anything else that doesn't 'startswith' /boot , /var
, /tmp , or /usr . (Unless I'm missing something.)
--
Adam Williamson
Fedora QA Community Monkey
IRC: adamw | Twitter: AdamW_Fedora | XMPP: adamw AT happyassassin . net
http://www.happyassassin.net
More information about the anaconda-patches
mailing list