Re: [PATCH 2/2] Enable setting up multiple layouts on the installed system

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

 



On Tue, 2012-05-22 at 13:01 -0400, Chris Lumens wrote:
> > diff --git a/pyanaconda/__init__.py b/pyanaconda/__init__.py
> > index fd1e676..e29c85c 100644
> > --- a/pyanaconda/__init__.py
> > +++ b/pyanaconda/__init__.py
> > @@ -279,6 +279,16 @@ class Anaconda(object):
> >          else:
> >              self.methodstr = methodstr
> >  
> > +    def writeLayouts(self, root):
> > +        conf_dir = os.path.join(root, "/etc/X11/xorg.conf.d")
> > +        conf_file = "01-anaconda-keyboard.conf"
> > +
> > +        if not os.path.isdir(conf_dir):
> > +            os.makedirs(conf_dir)
> > +
> > +        with open(os.path.join(conf_dir, conf_file), "w") as f:
> > +            f.write(self.ksdata.keyboard.xorg_conf)
> > +
> >      def write(self):
> >          self.writeXdriver()
> >          self.instLanguage.write()
> > @@ -293,3 +303,5 @@ class Anaconda(object):
> >          self.users.write()
> >          self.security.write()
> >          self.firewall.write()
> > +        self.writeLayouts(ROOT_PATH)
> > +
> 
> anaconda.write is on the way out.  In its place, what I'm doing is
> adding execute methods to the appropriate classes in kickstart and
> calling them from doInstall in install.py.
> 
> I'd say the writeLayouts code itself should probably not go into
> kickstart.py, though.  It should live somewhere else (perhaps just a
> generic keyboard.py?) and be called from kickstart.
What about renaming xklavier.py to keyboard.py and put such code there? 

> 
> Having done all that, you won't need to do anything in livecd.py or
> yuminstall.py.  In fact, no one should be doing anything in that file
> ever again.
+1 to this change, great!

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic

_______________________________________________
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