Hello,

The CR:
  http://cr.opensolaris.org/~migi/14665_v1/

Fixes the problem:
  http://defect.opensolaris.org/bz/show_bug.cgi?id=14665

Here is explanation what kind of problem is fixed by this webrev, with a little background:

The default location for the startpage tarballs is at:
 pfexec gconftool-2 -g '/apps/packagemanager/preferences/startpage_url'
 Let's say it's:
http://url

The current script is takig the locale from the command:
 awk -F"=" '$1=="LANG" {print $2}' "/etc/default/init"

In my case it is "en_IE.UTF-8". Later on this script is splitting this locale to two parts:
 1: en_IE
 2: en

The second part is important for us. Under the URL provided by gconftool-2 command there should be a startpage tarball named:
http://url/startpage-en.tar.gz

Because en is not supported locale (we don't have separate en locale for PM), then it's name is defulting to the "C", so as the result the tarball is downloaded from the page:
http://url/startpage-C.tar.gz

Later this locale is unpacked and the script was looking for the folder named "C" to copy to the /var/pkg/gui_cache/startpagebase/. If there was an C folder, it was overriden.

This worked if all the users were using the same locale as the default system one. The change is to support different user level locales of the startpage, so what this change is introducing.

If the locale (any locale) contains more then one folder, let's say the file:
http://url/startpage-C.tar.gz

Contains locale for C, de, fr. All of those locale directories will be copied to the /var/pkg/gui_cache/startpagebase/, where before the change only the "C" would be copied.

This allow us to create such scenarios:
1. Under http://url/ put the following files:
  startpage-C.tar.gz (containing C, fr and de)
In this case, whatever locale is set up, all locales are pulled out and installed

2. Under http://url/ put the following files:
  startpage-C.tar.gz (containing C only)
  startpage-fr.tar.gz (containing fr only)
  startpage-de.tar.gz (containing de only)
This is exactly the same scenario as we have now, so if the system wide locale is set up to C, then only C is pulled, the same applies to fr and de.

3. Under http://url/ put the following files:
  startpage-C.tar.gz (containing C, fr and de)
  startpage-fr.tar.gz (containing fr only)
  startpage-de.tar.gz (containing de only)
This will pull all the supported languages if the system wide is set as the non supported or default one, or it will pull per locale startpage if the locale was specified by the admin.

So basically this gives us more control over how and what we want to be downloaded as the startpage base and fixes the problem when only one system-wide locale was pulled. If we choose not to, then we will put one locale per tarball and everything will be exactly as it is now.

--
best
Michal

_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to