View previous topic :: View next topic |
Author |
Message |
tkzv Tux's lil' helper
Joined: 22 Aug 2014 Posts: 83
|
Posted: Wed Jan 04, 2017 11:21 pm Post subject: How do I build new Thunderbird without libcanberra? |
|
|
I do not use sound notifications. I even remove beepers out of my desktop computers. Sudden sounds give me heartache, literally.
I do not need sound notifications in Thunderbird, but version 45.6.0 (mozconfig-v6.45.eclass, to be precise) demands media-libs/libcanberra. How do I avoid building it? |
|
Back to top |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 8936
|
Posted: Wed Jan 04, 2017 11:39 pm Post subject: |
|
|
If it's a hard dependency, you'll have to patch it out of the code. |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2034 Location: United Kingdom
|
Posted: Thu Jan 05, 2017 2:08 am Post subject: |
|
|
An alternative would perhaps be to use Thunderbird's about:config (Edit > Preferences > Advanced > Config Editor), enter 'sound' in the Search box, and disable all the sounds (true -> false). _________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.
Fitzcarraldo's blog |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21631
|
Posted: Thu Jan 05, 2017 2:54 am Post subject: |
|
|
As I understand the discussion in the bug about adding this, it is a weird soft dependency. Thunderbird has used this for a long time, but always hidden behind a dlopen, so users who did not install media-libs/libcanberra would have no sound because the dlopen failed; users who installed it would have sound. The dependency was added to force users to install it because Thunderbird did not provide adequate notification to users about why they lacked sound, leaving sound-seeking users to debug the issue on their own. I also do not want sound, so I added media-libs/libcanberra to /etc/portage/profile/package.provided, which tells the dependency resolver to pretend that it is installed, even when it is not. This let me build mail-client/thunderbird without bypassing its other dependency checks. So far, I have not noticed any problems arising from the continued absence of media-libs/libcanberra. I expect this will change if I ever install a package that actually needs media-libs/libcanberra, since Portage will not try to install it for that package, and I will get a failure when the package fails to find the supporting library.
If you prefer not to override the dependency resolver, your only other choices are to patch the ebuild (actually, the eclass, since it is not in the main ebulid) or to convince the maintainer to make the dependency conditional on a USE-flag. |
|
Back to top |
|
|
tkzv Tux's lil' helper
Joined: 22 Aug 2014 Posts: 83
|
Posted: Thu Jan 05, 2017 3:02 am Post subject: |
|
|
Hu wrote: | I added media-libs/libcanberra to /etc/portage/profile/package.provided, which tells the dependency resolver to pretend that it is installed, even when it is not. | Thanks.
Hu wrote: | convince the maintainer to make the dependency conditional on a USE-flag. | I'll try that too. What would be the correct way? To add the conditional dependency to RDEPEND in Thunderbird ebuild and remove it from eclass? |
|
Back to top |
|
|
saturnalia0 Tux's lil' helper
Joined: 13 Oct 2016 Posts: 136
|
Posted: Thu Jan 05, 2017 9:50 am Post subject: |
|
|
It's worth noting the most recent version of Firefox (www-client/firefox-45.6.0) suffers from the same issue. It pulls in:
Code: |
x11-themes/sound-theme-freedesktop-0.8::gentoo
media-libs/libcanberra-0.30-r5::gentoo
|
|
|
Back to top |
|
|
cboldt Veteran
Joined: 24 Aug 2005 Posts: 1046
|
Posted: Thu Jan 05, 2017 10:41 am Post subject: |
|
|
Poking around eclass for the first time, and I have a few question ... mostly idle curiosity (if there is such a thing)
I notice eclass files are structured roughly the same as ebuild files, and are brought to effect by an "inherit" entry in the ebuild.
So, questions are ... Does a "local" version of an eclass have priority over the same eclass in the portage tree? That is, I have defined some ebuilds under appropriate branches of /usr/local/portage, and these have priority over ebuilds in the same branches under /usr/portage. Would that same behavior hold for branches off /usr/local/portage/eclass? I think so, as I see parallel eclass branches under /var/lib/layman/mozilla/eclass.
The other question is to understand the meaning of this RDEPEND entry in mozconfig-v6.45.eclass ...
Code: | media-libs/libcanberra:*[pulseaudio?] |
This isn't structured in the usual way of a "if USE pulsaudio, then depend on libcanberra" entry. I see a pulseaudio USE flag in the eclass. On my systems, both firefox and thunderbird are built with USE=-pulseaudio, but libcanberra was still forced in. Sound works, but the systems are not using pulseaudio. |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21631
|
Posted: Fri Jan 06, 2017 2:21 am Post subject: |
|
|
tkzv wrote: | Hu wrote: | convince the maintainer to make the dependency conditional on a USE-flag. | I'll try that too. What would be the correct way? To add the conditional dependency to RDEPEND in Thunderbird ebuild and remove it from eclass? | An eclass can specify a dependency as conditional or mandatory. In my opinion, the simplest way to make this USE-driven would be to leave the dependency in the eclass, but make it conditional on the relevant USE flag.
saturnalia0 wrote: | It's worth noting the most recent version of Firefox (www-client/firefox-45.6.0) suffers from the same issue. It pulls in: | This is one of the unfortunate aspects of putting the dependency in the eclass. Both Firefox and Thunderbird inherit eclass /usr/portage/eclass/mozconfig-v6.45.eclass, so both of them get this hard dependency. I do not know whether Firefox has the same weird soft dependency on media-libs/libcanberra as Thunderbird.
cboldt wrote: | The other question is to understand the meaning of this RDEPEND entry in mozconfig-v6.45.eclass ...
Code: | media-libs/libcanberra:*[pulseaudio?] |
This isn't structured in the usual way of a "if USE pulsaudio, then depend on libcanberra" entry. I see a pulseaudio USE flag in the eclass. On my systems, both firefox and thunderbird are built with USE=-pulseaudio, but libcanberra was still forced in. Sound works, but the systems are not using pulseaudio. | Per man 5 ebuild, this is a shorthand syntax. The equivalent long form, which you alluded to, is pulseaudio? ( media-libs/libcanberra[pulseaudio] ) !pulseaudio? ( media-libs/libcanberra ). The shorthand is desirable since it avoids writing the name of the USE flag three times and the name of the package twice. It tells Portage that the named package is always a dependency, but that the specified USE flag is only required to be true on the dependency if the USE flag is true on the consumer. |
|
Back to top |
|
|
cboldt Veteran
Joined: 24 Aug 2005 Posts: 1046
|
Posted: Fri Jan 06, 2017 12:52 pm Post subject: |
|
|
Thanks, that makes sense in that it corresponds to how the systems built here.
Appreciate the pointer to `man 5 ebuild` too. I hadn't thought about the situations with conflicting dependencies, which the dependency syntax facilitates accounting for. |
|
Back to top |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 8936
|
Posted: Fri Jan 06, 2017 1:30 pm Post subject: |
|
|
Hu wrote: | This is one of the unfortunate aspects of putting the dependency in the eclass. Both Firefox and Thunderbird inherit eclass /usr/portage/eclass/mozconfig-v6.45.eclass, so both of them get this hard dependency. I do not know whether Firefox has the same weird soft dependency on media-libs/libcanberra as Thunderbird. |
Even if the dependency is in an eclass it can very well be made conditional on package version or category of the inheriting ebuild. It could even be made conditional on the existance of e.g. the pulseaudio use flag in said ebuild. So right now we can only assume that it is a) a soft dependency for all the Mozilla products or b) a bogus dependency for at least one of them. |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21631
|
Posted: Sat Jan 07, 2017 6:40 pm Post subject: |
|
|
asturm wrote: | So right now we can only assume that it is a) a soft dependency for all the Mozilla products or b) a bogus dependency for at least one of them. | Agreed. My point was that, since it was added in the eclass, it automatically affected all Mozilla products across multiple versions, whether or not it is appropriate for all the affected ebuilds. I have seen Firefox 45 play audio on a system that has no media-libs/libcanberra installed, so either that Firefox has some alternate mechanism for playing audio (making the dependency questionable) or Firefox 45 simply does not use media-libs/libcanberra at all (making the dependency completely bogus). |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6098 Location: Dallas area
|
Posted: Tue Jan 10, 2017 9:57 am Post subject: |
|
|
I don't use alsa, nor obvious pulseaudio, I use oss4 and firefox (45.6) works perfectly fine. Sounds work perfectly fine.
I did modify the eclass to remove libcanberra so that it would build. (thanks Hu for the hint on packages.provided)
The comment that it should have been put with and triggered by the pulseaudio flag is appropriate SINCE libcanberra is requiring pulseaudio as a use for it. IMO _________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
|