How to make YaST2 "Software Management" fail to startup.

On OpenSuSE 12.2, I have LC_PAPER set to force LibreOffice to use the letter papersize instead of A4. I just discovered that this can cause the SuSE package managment tool to fail querying repositories on startup.


setenv LC_PAPER letter       # Or export LC_PAPER=letter, for you sh/bash folks
YaST2 &

If Software Management determines it needs to query a repository, it will fail startup with a dialog that says:


An error occurred during repository initialization.

and you will only have a list of the installed packages in the package manager, without those that “could be installed” listed as well.

OTOH, if Software Management doesn’t need to query a repository, it will come up fine with no error dialog. So if you haven’t started Software Management in a while, “try with LC_PAPER=letter” first because trying it without first will likely do a repository query which will execute properly and free the package manager from needing to query next time.

This is certainly very confusing behavior, regardless of whether it’s a feature or a bug. Question is, what can we do to help the poor hapless user that trips over this so that this case either works fine (preferred) or he at least gets a better error message that tells him 1) what caused the problem, and 2) what he needs to do to fix it.

And further, is there a better way to force LibreOffice to use the letter papersize than setting the LC_PAPER env var?

Thanks.

As a follow-on (for others’ web searching), if your package manager does happen to come up without querying a repository, and if you do try to install a package with the LC_PAPER set, you* may* get this error dialog:


terminate called after throwing an instance of 'std::runtime_error'
  what():  locale::facet::_S_create_c_locale name not valid
YaST got signal 6 at YCP file String.ycp:170
/sbin/yast2: line 427:  5509 Aborted                 $ybindir/y2base $module "$@" "$SELECTED_GUI" $Y2_GEOMETRY $Y2UI_ARGS

(process:5674): Gtk-WARNING **: Locale not supported by C library.
    Using the fallback 'C' locale.

which still says nothing about this environment variable specifically, but at least has some “hint” of the problem with the mention of locales.

Weird. Maybe you should file a bug report.

I don’t normally print from LibreOffice. However, as a check, I just opened LibreOfficeWriter. The “Files” menu button had an option for “printer settings”, and in the printer settings for a specific printer there was a “properties” button. Clicking that showed a setting for paper size (defaulting here to US Letter).

I don’t know whether that is useful, and I have not tested what it does.

On 2012-12-24 17:46, Dark Photon wrote:
> And further, is there a better way to force LibreOffice to use the
> letter papersize than setting the LC_PAPER env var?

Just define your preferred country in LO settings, without a document
opened. And use “/usr/lib64/libreoffice/program/spadmin” as root to
define the printer.


Cheers / Saludos,

Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))

On 2012-12-24 18:06, Dark Photon wrote:
> which still says nothing about this environment variable specifically,
> but at least has some “hint” of the problem with the mention of locales.

Are you using the last glibc update? it is broken, downgrade it.


Cheers / Saludos,

Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))

Thanks for the replies. A few follow-ups:

  1. LibreOffice’s Printer Settings Properties selection of papersize isn’t sticky, nor is that set by /usr/lib64/libreoffice/program/spadmin – even within a single run of the application. They both show A4.
  2. Have my country set in Locale settings – no difference
  3. Yast printer settings says the papersize for my printer is letter (which is correct), but other programs list the default papersize as A4 (spadmin, LibreOffice, etc.)
  4. Currently have GLIBC 2.15-22-6.4, and that’s the only version YaST Software Management shows as being available. I’m current on all updates. Is that the right version? If not, what is, and how would I go about downgrading it? I’ve read many times that changing the installed GLIBC without a full distro upgrade is a big no-no as (intuitively) everything depends on it.

that seems a bit strange

My default paper size is A4. LO print dialogue shows A4 and clicking print properties my printer shows A4.
Changing the default paper size to Letter in LO also changes all of the above to Letter without me having to do anything else.

Noticed robin_listas comment about the broken glibc update which I am using without problem (didn’t realise the update had been backed out of the repos).

On 2013-01-02 02:26, farcusnz wrote:
> Noticed robin_listas comment about the broken glibc update which I am
> using without problem (didn’t realise the update had been backed out of
> the repos).

I’m not using 12.2, so I don’t know which version is the broken one, nor
if the update has been removed, or if a new patch corrects it. I only
know that I read in the factory mail list a report about the problem
appearing, and that it also affected 12.2, about two weeks ago.


Cheers / Saludos,

Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))

The version I have (now had) was newer than that available in the update repo so it seems it was backed out.
I’m not sure what the problem would have been though as everything with the newer (now removed version) and now the older version work just fine for me.

On 2013-01-02 06:26, farcusnz wrote:

> The version I have (now had) was newer than that available in the
> update repo so it seems it was backed out.
> I’m not sure what the problem would have been though as everything with
> the newer (now removed version) and now the older version work just fine
> for me.

It had problems with locale setting, and “paper” is one of those.


Cheers / Saludos,

Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))