Bug 22792 - Font auto-installation fails on unkown language
Summary: Font auto-installation fails on unkown language
Status: RESOLVED NOTABUG
Alias: None
Product: PackageKit
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Richard Hughes
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-16 00:30 UTC by Dwayne Bailey
Modified: 2018-08-21 15:52 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dwayne Bailey 2009-07-16 00:30:04 UTC
Please see:
http://bugs.locamotion.org/show_bug.cgi?id=1049

Summarised again here:
Fedora's PackageKit-gtk-module seems to keep asking for missing fonts when the Virtaal translation tool is being used.  The dialog that is displayed is this:
http://bugs.locamotion.org/attachment.cgi?id=507

My first thoughts are that the language tag of ':lang=' is creating this issue.  Virtaal developers have not yet debugged this.

The Window says that Python requested the font.  Virtaal is written in Python which explains that but its surprising that it didn't detect the requesting application as Virtaal, certainly confusing to the user (maybe should be a different bug)

Guessing at problem:
Virtaal is sending an incorrect language tag.  This triggers PackageKit to try to install fonts for this language.

Possible Solution:
Mkae PackageKit more robust in that it only tries to install fonts for languages that follow a correct language tag convention.
Report an error for a tag that is broken.
Comment 1 Richard Hughes 2009-07-16 01:14:22 UTC
(In reply to comment #0
> Possible Solution:
> Mkae PackageKit more robust in that it only tries to install fonts for
> languages that follow a correct language tag convention.
> Report an error for a tag that is broken.

I've applied this to PackageKit:

commit ce49f887b895269900bb3fd0c409d8778deb287c
Author: Richard Hughes <richard@hughsie.com>
Date:   Thu Jul 16 09:08:40 2009 +0100

    gtk-module: check for zero length data from FcNameUnparse to mitigate fd#227

and applied this to gnome-packagekit:

commit 89c3d43663aef0c6f32cd7ec68aee2692e23dc25
Author: Richard Hughes <richard@hughsie.com>
Date:   Thu Jul 16 09:12:33 2009 +0100

    Check the language tags before trying to parse them. Fixes fd#22792

Thanks for reporting this bug.
Comment 2 Dwayne Bailey 2009-07-16 04:50:49 UTC
Wow that was quick!  Thanks :)
Comment 3 Dwayne Bailey 2009-07-17 05:01:27 UTC
I've done some more testing and found an instance that causes this issue. Just wanted to check that your changes catch this.

If I run our app with this commandline, rare to unlikely for a user:
LANGUAGE=../../../../../../../..//home/dwayne/dev/lm/trunk/virtaal/po/mo/af:af virtaal

Then it will trigger.  The request is only sent when we actually open a document, so until we open the document no Pk request is sent.  Once we open the document the request is sent.

It will fail also on LANGUAGES=..:af

If I remove the LANGUAGES environment variable or change it to more correct language names then the issue does not occur.
Comment 4 Richard Hughes 2018-08-21 15:52:57 UTC
We moved the upstream bugtracker to GitHub a long time ago. If this issue still affects you please re-create the issue here: https://github.com/hughsie/PackageKit/issues
 
Sorry for the impersonal message, and fingers crossed your issue no longer happens. Thanks.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.