Libzypp/ZMD/YaST/update/yast

< Libzypp‎ | ZMD‎ | YaST‎ | update
Şuraya atla: kullan, ara

Adding the update catalog(s) to YaST

The online update can be done with just YaST and libzypp.

In this scenario, the udpate catalog (URL) information retrieved by suse-register has to be transferred to YaST.

One possibility is to have suse-register write the URLs to a text file (one URL per line or XML file with the sources description) and have YaST read this file and add additional sources.

Things to consider = the file must be in a temporary directory, not /tmp.

=

= besides the URLs, additional information (user visible name, alias, ...) might be needed for the source.

=

(NOTE currently Pkg::SourceCreate is able to use only URL) = the sources must be synced with ZMD so one can also pull updates via rug

=

= when the source is later added (or deleted) via rug, yast will not know about that

=

The service can be added by inst_suse_register.ycp client or by suse-register itself (by calling another ycp client with just SourceCreate calls)

After adding the source, the patch status has to be computed. This is done by calling

Pkg::PkgEstablish();

within YCP.

Then some function (in the UI ?, in pkg-bindings function ?, in zypp ?) has to decide which one of the item.status().isNeeded() patches have to be installed. There is also an isIncomplete() status query, which is true for installed and needed patches. This shouldn't happen normally (the solver will not allow an installed resolvable to become broken) but can be triggered if packages where manually installed.

The default behaviour for this function is probably: (pseudo-code !!)

foreach (item of the pool) {
if (item.status().isNeeded()) {                   // uninstalled
if (item.isKind (Patch)) {
if (item.asKind(Patch).category == optional)   // dont auto-install optional patches
continue;
}

item.status().transact()                      // schedule for installation
}
}

It might also be a good idea to check for plain package updates at this point. (For each installed package, check if there is an uninstalled package available with the same name but a higher edition.) This way, we could support plain package repositories without the need for patches. Might be interesting for OpenSUSE or OEMs.

Then

Pkg::PkgSolve()

must be called to drag in requirements of the to-be-installed patches.

Then a normal commit() should be called.

back ...

Last edit in Trac '03/31/06 14:07:15' by 'kkaempf'


Last edit in Trac '03/31/06 14:07:15' by 'kkaempf'


Last edit in Trac '03/31/06 14:07:15' by 'kkaempf'


Last edit in Trac '03/31/06 14:07:15' by 'kkaempf'