Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 170359 - Deletion of moznopango USE flag
Summary: Deletion of moznopango USE flag
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-11 03:43 UTC by Arfrever Frehtes Taifersar Arahesis (RETIRED)
Modified: 2008-08-23 13:52 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Deletion of moznopango USE flag (moznopango.patch,12.61 KB, patch)
2007-03-11 03:45 UTC, Arfrever Frehtes Taifersar Arahesis (RETIRED)
Details | Diff
Deletion of moznopango USE flag in use.local.desc (moznopango2.patch,2.83 KB, patch)
2007-03-11 03:53 UTC, Arfrever Frehtes Taifersar Arahesis (RETIRED)
Details | Diff
Deletion of moznopango USE flag (moznopango.patch,19.35 KB, patch)
2007-03-11 15:53 UTC, Arfrever Frehtes Taifersar Arahesis (RETIRED)
Details | Diff
Seamonkey: set MOZ_DISABLE_PANGO based on pango USE flag (seamonkey-20070311-pango.patch,1.31 KB, patch)
2007-03-11 17:19 UTC, Arthur Hagen
Details | Diff
moznopango.patch (moznopango.patch,15.50 KB, patch)
2008-04-20 15:42 UTC, Arfrever Frehtes Taifersar Arahesis (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2007-03-11 03:43:19 UTC
Ebuilds should install 2 versions of the script running mozilla-launcher, one with Pango enabled (/usr/bin/${name}) and another with Pango disabled (/usr/bin/${name}-nopango). Menus should contain 2 appropriate entries to allow users to simply switch between enabled and disabled Pango without reemerging given package.
Comment 1 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2007-03-11 03:45:22 UTC
Created attachment 112884 [details, diff]
Deletion of moznopango USE flag
Comment 2 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2007-03-11 03:53:50 UTC
Created attachment 112886 [details, diff]
Deletion of moznopango USE flag in use.local.desc

(I accidentally forgot about this.)
Comment 3 Arthur Hagen 2007-03-11 04:21:42 UTC
Forgive me if I misunderstand, but shouldn't the default be to NOT install pango unless the global "pango" USE flag is set for a package?  Why should the mozilla browsers be treated differently and offer both a pango and non-pango version even if a user has explicitly specified "-pango"?
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2007-03-11 07:43:25 UTC
No; this will plain not work beyond 'user clicks on a menu icon'; stuff like mozilla-launcher cannot guess which one you want, other apps cannot guess either. USE=pango doesn't make sense, FF still requires pango to be built (truetype fonts support etc.).

USE=moznopango does exactly what the description says - disable pango during runtime. 
Comment 5 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2007-03-11 15:53:00 UTC
Created attachment 112954 [details, diff]
Deletion of moznopango USE flag

Newer patch with some fixes.
Comment 6 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2007-03-11 16:17:59 UTC
(In reply to comment #4)
> No; this will plain not work beyond 'user clicks on a menu icon';
You even didn't check. It plain works.

In reply to comment #4)
> stuff like mozilla-launcher cannot guess which one you want
Currently each of 4 affected packages installs one script (e.g. /usr/bin/firefox) which can differ in dependence of this flag only in existence of one line:
export MOZ_DISABLE_PANGO=1

This script invokes mozilla-launcher, not the other way around. Currently users with USE="-moznopango" can even run `MOZ_DISABLE_PANGO=1 firefox` in terminal which disables Pango during runtime. So there's no reason to not have 2 entries in menu.
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2007-03-11 16:33:55 UTC
(In reply to comment #6)
> (In reply to comment #4)
> > No; this will plain not work beyond 'user clicks on a menu icon';
> You even didn't check. It plain works.

No, you've just completely misunderstood my point. Once you've set up an application to launch /usr/bin/firefox, then obviously it won't use /usr/bin/firefox-nopango and the other way round.

> This script invokes mozilla-launcher, not the other way around. Currently users
> with USE="-moznopango" can even run `MOZ_DISABLE_PANGO=1 firefox` in terminal
> which disables Pango during runtime. So there's no reason to not have 2 entries
> in menu.

I for one don't want such junk in menus, it doesn't make sense. Either you want pango or not, so go decide before you install something (or change the one line in the script after you've changed your mind if you can't be bothered to re-emerge it).
Comment 8 Arthur Hagen 2007-03-11 17:19:07 UTC
Created attachment 112966 [details, diff]
Seamonkey: set MOZ_DISABLE_PANGO based on pango USE flag

Perhaps the proper place for this environment variable is /etc/env.d/?
Created simple test patch for seamonkey, which sets this depending on whether pango USE flag is set or not.
Comment 9 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2007-03-11 17:46:57 UTC
(In reply to comment #8)
MOZ_DISABLE_PANGO=0 _disables_ Pango :)
Comment 10 Arthur Hagen 2007-03-11 18:13:02 UTC
(In reply to comment #9)
> (In reply to comment #8)
> MOZ_DISABLE_PANGO=0 _disables_ Pango :)
> 

How.. intuitive.  :-)

How about:

+ 	if use pango; then
+ 		dosed "s|MOZ_DISABLE_PANGO=1|#MOZ_DISABLE_PANGO=1|" /etc/env.d/10${PN}
+ 	fi

Saves a few bytes of global environment data space too...
Comment 11 Jakub Moc (RETIRED) gentoo-dev 2007-03-12 00:55:32 UTC
(In reply to comment #8)
> Perhaps the proper place for this environment variable is /etc/env.d/?

Hmmm, this looks like much better idea indeed... :)
Comment 12 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2007-03-12 02:01:33 UTC
(In reply to comment #7)
> Once you've set up an application to launch /usr/bin/firefox, then obviously > it won't use /usr/bin/firefox-nopango and the other way round.
99% of people run such applications as Firefox directly using a menu entry or a similar link (e.g. on desktop).
(moznopango USE flag was added only 4 months ago so people may still be used to having Pango enabled.)

(In reply to comment #7)
> I for one don't want such junk in menus, it doesn't make sense. Either you want
> pango or not, so go decide before you install something
(And in reply to comment #8)
> Perhaps the proper place for this environment variable is /etc/env.d/?

There might be 2 (or more) people using the same computer, one who wants Pango and another one who doesn't. Enforcing this by a setting in /etc/env.d isn't good idea.
Comment 13 Arthur Hagen 2007-03-12 05:41:10 UTC
(In reply to comment #12)
> 
> There might be 2 (or more) people using the same computer, one who wants Pango
> and another one who doesn't. Enforcing this by a setting in /etc/env.d isn't
> good idea.

/etc/env.d/ is for the system default, and isn't enforced in any way.  Users can override anything there in their .profile or .login.

An example, VERY similar to this:
/etc/env.d/50gtk2 contains "GTK_USE_XFT=1" if "freetype" was set in USE flags when gtk2 was emerged.  That doesn't mean that users can't override this, if freetype doesn't provide the language-specific features they need.

(Similar for /etc/env.d/70less - all users on a system don't *have to* use "-R -M --shift 5" just because it's system default.)

Another plus by doing it in an exported environment variable is that it will affect other apps that use mozilla engines too, like yelp.  Most likely, people will want pango in either all rendering engines or none, and if they want individual choices for specific apps, they can use a wrapper for the exceptions.

The only problem I see is if someone does "USE=-pango emerge firefox" and "USE=pango emerge seamonkey".  If the browsers have different env files for this, -pango will always win, as the variable disabling pango only needs to be set once.  If the browsers use the same env file, though, the user should get a choice when configprotect detects a change.  Which most likely is what the user want anyhow...  So perhaps a new /etc/env.d/NNmozilla-engines common for all mozilla-derived engines is the best choice?

I don't think a menu choice is the way to go.  For one thing, it won't take immediate global effect, like menu choices *should* do, and it is cluttering up for everyone for something that most people will have in one setting only.
I would also expect that those who need pango will be able to set the pango USE flag, so the default can be disabled (for compatibility with things like mathlib).
Comment 14 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2007-03-12 08:00:28 UTC
(In reply to comment #13)
> An example, VERY similar to this:
> /etc/env.d/50gtk2 contains "GTK_USE_XFT=1" if "freetype" was set in USE flags
> when gtk2 was emerged.

GTK+ 2 doesn't have IUSE="freetype". /etc/env.d/50gtk2 always contains "GDK_USE_XFT=1".

(In reply to comment #13)
> I don't think a menu choice is the way to go.  For one thing, it won't take
> immediate global effect, like menu choices *should* do

In my case it takes immediate global effect.
Comment 15 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2007-03-18 17:04:56 UTC
(In reply to comment #8,comment #10 and comment #13)

No package is worth reemerging caused by an USE flag state change in order to change one variable in one configuration file.

What do you think about:
 1. No "pango" / "moznopango" USE flags.
 2. www-client/mozilla-launcher installs:
     /etc/env.d/70mozilla which defaultly contains:
          # The run-time usage of Pango library by Mozilla based programs.
          MOZILLA_PANGONESS=1
 3. www-client/mozilla-launcher has big einfo message telling user about /etc/env.d/70mozilla.
 4. Mozilla based packages install:
     /usr/bin/${name}
     /usr/bin/${name}-pango
     /usr/bin/${name}-nopango
 5. Mozilla based packages install:
     <.../>/${name}.desktop pointing to /usr/bin/${name}-pango
     <.../>/${name}-nopango.desktop pointing to /usr/bin/${name}-nopango
 6. /usr/bin/${name} contains:
     #!/bin/sh
     
     if [ ${MOZILLA_PANGONESS} == 1 ] || [ ${MOZILLA_PANGONESS} == "true" ] ; then
          exec /usr/bin/${name}-pango
     else
          exec /usr/bin/${name}-nopango
     fi
Comment 16 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2007-03-19 12:11:40 UTC
(In reply to comment #15 and some other comments)

/etc/env.d is in CONFIG_PROTECT_MASK. /etc/conf.d is better.

(In reply to comment #15)
>  2. www-client/mozilla-launcher installs:
>      /etc/env.d/70mozilla (...)

/etc/conf.d/mozilla instead of /etc/env.d/70mozilla.

>  6. /usr/bin/${name} contains:
>      #!/bin/sh
> 
>      if [ ${MOZILLA_PANGONESS} == 1 ] || [ ${MOZILLA_PANGONESS} == "true" ] ;
> then
>           exec /usr/bin/${name}-pango
>      else
>           exec /usr/bin/${name}-nopango
>      fi

 6. /usr/bin/${name} contains:
     #!/bin/sh

     source /etc/conf.d/mozilla
     if [ ${MOZILLA_PANGONESS} == 1 ] || [ ${MOZILLA_PANGONESS} == "true" ] ; then
          exec /usr/bin/${name}-pango
     else
          exec /usr/bin/${name}-nopango
     fi
Comment 17 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2007-03-29 13:46:19 UTC
Mozilla Gentoo Team,
Could you decide anything?
Comment 18 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2008-04-20 15:42:15 UTC
Created attachment 150409 [details, diff]
moznopango.patch

Updated version of original patch.
Can be easily changed to implement suggestions from Comment #15 if needed.
Comment 19 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2008-08-23 13:52:11 UTC
"moznopango" USE flag is absent in some newer ebuilds.