[zypp-devel] Init of ZYpp configuration and root
Hi We have to think about the sequence and layers of configuration to make it consistent this time. I list the requirements that come to my mind - the most important cfg option is the root where you are operating on. In former times this was a Target option, and I think it still is (????) - known repositories raw metadata path, binary cache path, system architecture, etc, needs to be easily configurable/overridable. A zypp.conf file (ini file) would be a nice way to do it. So we have to determine the workflow: - when to set the target root - when do we read values from the config file - do we append the root to every value or is every value absolute, etc Duncan -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
Dne neděle 01 červenec 2007 16:04 Duncan Mac-Vicar P. napsal(a): Hi!
Hi
We have to think about the sequence and layers of configuration to make it consistent this time.
I list the requirements that come to my mind
- the most important cfg option is the root where you are operating on. In former times this was a Target option, and I think it still is (????)
Yes, and IMO there is no way in changing it. There comes one case to my mind which requires the ability to operate on multiple targets (not simulatenously) - the installation to a directory.
- known repositories raw metadata path, binary cache path, system architecture, etc, needs to be easily configurable/overridable. A zypp.conf file (ini file) would be a nice way to do it.
Yes.
So we have to determine the workflow:
- when to set the target root
Suggestions: When initializing target.
- when do we read values from the config file
When initializing the ZYPP or before we need the first one? I don't think we want to supoprt scenario when one configuration value changes in time. OTOH, the possibility to move the download cache needs to be kept (installing huge packages from HTTP/FTP during 1st stage instalaltoin).
- do we append the root to every value or is every value absolute, etc
Don't understand this question. -- Regards, Jiri Srain YaST Team Leader --------------------------------------------------------------------- SUSE LINUX, s.r.o. e-mail: jsrain@suse.cz Lihovarska 1060/12 tel: +420 284 028 959 190 00 Praha 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz
On Sun, Jul 01, Duncan Mac-Vicar P. wrote:
Hi
We have to think about the sequence and layers of configuration to make it consistent this time.
I list the requirements that come to my mind
- the most important cfg option is the root where you are operating on. In former times this was a Target option, and I think it still is (????)
- known repositories raw metadata path, binary cache path, system architecture, etc, needs to be easily configurable/overridable. A zypp.conf file (ini file) would be a nice way to do it.
So we have to determine the workflow:
- when to set the target root - when do we read values from the config file
Let's create a class that grants access to all these config values. An Instance of this class is passed to ZYpp upon construction. ZYpp and it's subcomponents have to be adapted to take all config values from this context class, and use them to initialize their's subcomponents. That way e.g. ZYpp::targetInit would loose it's 'root' argument. Zypp will use the argument provided by the context class instead. That's probabely the most significant change, because zypper/pkg-bindings have to tell the root path quite early in their workflow (before accessing ZYpp). Then everything depends on the implementation of the context class only. A bare metal installation or some faked Test environment might use an implementation where most/all of the values are set by the application. Another kind of implementation might take the target root (default to /) and an optional config file, and initializes the config values lazy by parsing the configuration file. As long as the class behaves correctly, no one will mind where the values come from. (Un)fortunately all our code (libzypp,zypper,pkg-bindings,UI) refers to some global ZYpp singleton, that's construced on demand. I don't think we wan't to change this now. But we could pass an instance of this context class to the ZYppFactory, and ZYppFactory will use it to construct ZYpp. -- cu, Michael Andres +------------------------------------------------------------------+ Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4 +------------------------------------------------------------------+ Michael Andres YaST Development ma@novell.com SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0 +------------------------------------------------------------------+ -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
Dne pondělí 02 červenec 2007 14:58 Michael Andres napsal(a):
On Sun, Jul 01, Duncan Mac-Vicar P. wrote:
Hi
We have to think about the sequence and layers of configuration to make it consistent this time.
I list the requirements that come to my mind
- the most important cfg option is the root where you are operating on. In former times this was a Target option, and I think it still is (????)
- known repositories raw metadata path, binary cache path, system architecture, etc, needs to be easily configurable/overridable. A zypp.conf file (ini file) would be a nice way to do it.
So we have to determine the workflow:
- when to set the target root - when do we read values from the config file
Let's create a class that grants access to all these config values. An Instance of this class is passed to ZYpp upon construction.
ZYpp and it's subcomponents have to be adapted to take all config values from this context class, and use them to initialize their's subcomponents.
That way e.g. ZYpp::targetInit would loose it's 'root' argument. Zypp will use the argument provided by the context class instead. That's probabely the most significant change, because zypper/pkg-bindings have to tell the root path quite early in their workflow (before accessing ZYpp).
This cannot work for the installation, since you cannot access the root before the target system gets formatted and mounted and you need to use ZYPP for software selection. We need a way to change the target path while ZYPP is running. It is essential for the installation and we need it ASAP to start testing the installation. Jiri -- Regards, Jiri Srain YaST Team Leader --------------------------------------------------------------------- SUSE LINUX, s.r.o. e-mail: jsrain@suse.cz Lihovarska 1060/12 tel: +420 284 028 959 190 00 Praha 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz
* Jiri Srain
This cannot work for the installation, since you cannot access the root before the target system gets formatted and mounted and you need to use ZYPP for software selection.
We need a way to change the target path while ZYPP is running. It is essential for the installation and we need it ASAP to start testing the installation.
Do we need to change the target path ? Wouldn't it be sufficient to delay the start of the target until after the root partition is formatted and mounted ? Software selection should be possible without initialized target. Klaus -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
Dne úterý 03 červenec 2007 14:15 Klaus Kaempf napsal(a):
* Jiri Srain
[Jul 03. 2007 14:11]: This cannot work for the installation, since you cannot access the root before the target system gets formatted and mounted and you need to use ZYPP for software selection.
We need a way to change the target path while ZYPP is running. It is essential for the installation and we need it ASAP to start testing the installation.
Do we need to change the target path ?
If there should be valid what Michael wrote: --- snip --- That way e.g. ZYpp::targetInit would loose it's 'root' argument. Zypp will use the argument provided by the context class instead. That's probabely the most significant change, because zypper/pkg-bindings have to tell the root path quite early in their workflow (before accessing ZYpp). --- snap --- then we do (before accessing ZYpp).
Wouldn't it be sufficient to delay the start of the target until after the root partition is formatted and mounted ?
Software selection should be possible without initialized target.
Yes, if target can be initialized later, then it can work. Installation into directory will probably need some update as well (currently it initializes target and later moves it, but I don't see any reason why it could not work the same way as during normal installation). Jiri -- Regards, Jiri Srain YaST Team Leader --------------------------------------------------------------------- SUSE LINUX, s.r.o. e-mail: jsrain@suse.cz Lihovarska 1060/12 tel: +420 284 028 959 190 00 Praha 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz
On Tue, Jul 03, Jiri Srain wrote:
Dne pond??l?? 02 ??ervenec 2007 14:58 Michael Andres napsal(a):
On Sun, Jul 01, Duncan Mac-Vicar P. wrote:
Hi
We have to think about the sequence and layers of configuration to make it consistent this time.
I list the requirements that come to my mind
- the most important cfg option is the root where you are operating on. In former times this was a Target option, and I think it still is (????)
- known repositories raw metadata path, binary cache path, system architecture, etc, needs to be easily configurable/overridable. A zypp.conf file (ini file) would be a nice way to do it.
So we have to determine the workflow:
- when to set the target root - when do we read values from the config file
Let's create a class that grants access to all these config values. An Instance of this class is passed to ZYpp upon construction.
ZYpp and it's subcomponents have to be adapted to take all config values from this context class, and use them to initialize their's subcomponents.
That way e.g. ZYpp::targetInit would loose it's 'root' argument. Zypp will use the argument provided by the context class instead. That's probabely the most significant change, because zypper/pkg-bindings have to tell the root path quite early in their workflow (before accessing ZYpp).
This cannot work for the installation, since you cannot access the root before the target system gets formatted and mounted and you need to use ZYPP for software selection.
I don't want to access the target before targetInit. The idea was just to announce the 'root' you are going to use later. -- cu, Michael Andres +------------------------------------------------------------------+ Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4 +------------------------------------------------------------------+ Michael Andres YaST Development ma@novell.com SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0 +------------------------------------------------------------------+ -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
Dne úterý 03 červenec 2007 14:40 Michael Andres napsal(a):
On Tue, Jul 03, Jiri Srain wrote:
Dne pond??l?? 02 ??ervenec 2007 14:58 Michael Andres napsal(a):
On Sun, Jul 01, Duncan Mac-Vicar P. wrote:
Hi
We have to think about the sequence and layers of configuration to make it consistent this time.
I list the requirements that come to my mind
- the most important cfg option is the root where you are operating on. In former times this was a Target option, and I think it still is (????)
- known repositories raw metadata path, binary cache path, system architecture, etc, needs to be easily configurable/overridable. A zypp.conf file (ini file) would be a nice way to do it.
So we have to determine the workflow:
- when to set the target root - when do we read values from the config file
Let's create a class that grants access to all these config values. An Instance of this class is passed to ZYpp upon construction.
ZYpp and it's subcomponents have to be adapted to take all config values from this context class, and use them to initialize their's subcomponents.
That way e.g. ZYpp::targetInit would loose it's 'root' argument. Zypp will use the argument provided by the context class instead. That's probabely the most significant change, because zypper/pkg-bindings have to tell the root path quite early in their workflow (before accessing ZYpp).
This cannot work for the installation, since you cannot access the root before the target system gets formatted and mounted and you need to use ZYPP for software selection.
I don't want to access the target before targetInit. The idea was just to announce the 'root' you are going to use later.
This should work for standard installatoin, but not for instlalation into the directory, since the directory is specified in the same proposal as software. There we need to specify the root after ZYPP is already been used for other purposes. Jiri -- Regards, Jiri Srain YaST Team Leader --------------------------------------------------------------------- SUSE LINUX, s.r.o. e-mail: jsrain@suse.cz Lihovarska 1060/12 tel: +420 284 028 959 190 00 Praha 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz
participants (4)
-
Duncan Mac-Vicar P.
-
Jiri Srain
-
Klaus Kaempf
-
Michael Andres