|
Bugzilla – Full Text Bug Listing |
| Summary: | Add support for installing multiple languages to AutoYAST | ||
|---|---|---|---|
| Product: | [openSUSE] SUSE LINUX 10.0 | Reporter: | T. Ribbrock <argathin> |
| Component: | AutoYaST | Assignee: | Jiří Suchomel <jsuchome> |
| Status: | RESOLVED FIXED | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Enhancement | ||
| Priority: | P5 - None | CC: | jsuchome, ug |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | Other | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: | patch for general_dialogs.ycp | ||
|
Description
T. Ribbrock
2005-11-01 12:53:42 UTC
Uwe, I'm assigning this to me, but I want to hear your opinion if we want to have this in 10.1 (13:46:30) jsuchome: current content of country _auto clients is just the "Change" function (13:47:05) jsuchome: which others do you need? Summary + Write? More? (13:47:20) ug: Read() for cloning (13:47:30) ug: Export() for cloning too (13:48:16) ug: Import() of course to feed the profile stuff into the client (13:48:42) ug: during the installation (13:49:09) ug: so it's Import()+Write() for the installation process (13:49:23) ug: and Read()+Export() to make the module cloneable yast2-country in svn now supports common autoayast API; now autoyast has to use it Created attachment 56576 [details]
patch for general_dialogs.ycp
basic patch, enabling start of auto clients from country
Michael, Pkg::SetAdditionalLocales doesn't work for autoyast config mode. How could I use it to achieve that? OK, when it would be difficult to do new function in Pkg to suport such functionality (ma) and if it is ok fromautoyast side to add new packages during installation and not during config phase (ug), I'll do it this way:
- add a Pkg::SetAdditionalLocales call to "Write" function and remove it from UI part ("Change" function).
Well, one more question to Michael and/or Uwe: during autoinstallation (= "Write" call of language_auto), is it sufficient to call Pkg::SetAdditionalLocales (and relay on the fact that Pkg is already initialized and all packages will be commited+installed later in some common call) or do I need to run the whole PackageSystem::EnsureSourceInit (); PackageSystem::EnsureTargetInit (); Pkg::SetAdditionalLocales (selected_languages); Pkg::PkgSolve (true); PackageCallbacksInit::InitPackageCallbacks (); Pkg::PkgCommit (0); sequence? Uwe: is there any common way to install packages during autoinstallation (e.g. _after_ the Write functions of all clients are written)? Michael: is it ok to call whole sequence above even if everything is already intialized or if it would be initialized again later? > is there any common way to install packages during autoinstallation (e.g.
> _after_ the Write functions of all clients are written)?
no but why do you need that?
I'm not an expert of the interaction between the language and the software module but I'll explain here how I think it should work.
In the first stage (before the first reboot), autoyast will call Import() (and Write() if you need that) of the language_auto client. That's an exception to all other *_auto clients who will be called _after_ the first reboot - I know of that exception but I can live with that because the langage module _is_ a little bit different and so it's necessary. If I understand you right, then you don't like to see that exception? We can try to circumvent that step and to install the language dependent packages _after_ the first reboot but that'll make it way more complex and I already see problems that we get if we go that way.
So, after autoyast has fed the language_auto client via Import the language_auto client then sets the additional languages in the package manager so that it knows the selections and can install the additionaly needed packages.
Then the first reboot happens and the language_auto client will be called again (Import() and Write()), like all other *_auto clients are. Of course no language dependent packages needs to be installed now because they already are installed but maybe some sysconfig variables must be written.
Jiri, do you see it the same way? Do you see problem that I might have overlooked?
The only think I'm trying to do is doing the language configuration the standard way (at least as much as possible). I was asking when the other clients do install the packages? In which stage? I personally think that the packages whould be installed from the Write function, I do not have any requirement that it has to be called in 1st or 2nd stage. And I was specifically asking if there is any point during autoinstallation, where we can rely on that now there are some packages installed. Well, this is because the installation of packages from language module is done kind of specific way - the language module does not provide list of packages, but the Pkg interface does it. Ususally, langauge call a bunch of functions described in comment #7, but this might not be necessary. For example it does not have to call EnsureSourceInit, EnsureTargetInit if the source (resp. target) is already initialized. It doesn't have to call Pkg::PkgCommit, if some Commit call would be called sometimes later - that's why I'm asking if there is some time when such or similar functions are called. But maybe I'm trying to optimize it too much. Of course language client can call all the necessary functions (let's say in "Write") even if they would be called earliear/later. That's why I set this to NEEDINFO for Michael: I'm not sure if it wouldn't break anything if I put the whole block of these functions inside some other block of similar functions (e.g. the initialization was already done before language and solving is done after it). > I was asking when the other
> clients do install the packages? In which stage?
after the first reboot. All *_auto clients are called to tell autoyast which packages they need. Autoyast then installs them.
well, current AutoinstSoftware installs the packages required by language module (at line 343) - but using "additional_locales" value, which might not be set. If it is replaced by the list got from splitstring (Language::languages, ","), it should work. > well, current AutoinstSoftware installs the packages required by language
> module (at line 343)
I overlooked that. My idea is that those lines will be dropped, because it's done in your language_auto client which is called before.
Maybe I could add just a lone call of Pkg::SetAdditionalLocales to (new) "Packages" function of language_auto. AutoinstSoftware::Write should do the rest - it already does PkgSolve, but I'm not sure, where the packages got from solver are actually installed. Fixed in yast2-country-2.13.7. Pkg::SetAdditionalLocales is called at the end of Import function in case of Mode::autoinst |