Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 606826 - gnome-base/gnome-settings-daemon: wrong udev rule location
Summary: gnome-base/gnome-settings-daemon: wrong udev rule location
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-22 16:34 UTC by Alexander Tsoy
Modified: 2017-03-21 00:25 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Tsoy 2017-01-22 16:34:42 UTC
If called from EAPI 6 ebuilds, gnome2_src_install() ignores any arguments. So the following fix for udevrulesdir doesn't work:

src_install() {
    gnome2_src_install udevrulesdir="$(get_udevdir)"/rules.d #509484
}


$ qlist gnome-settings-daemon | grep rules.d
/usr/lib/udev/rules.d/61-gnome-settings-daemon-rfkill.rules
Comment 1 Pacho Ramos gentoo-dev 2017-02-05 08:33:54 UTC
I don't see any other way to pass that variable :/

Hence, I guess the only solution would be to move from "default" to "emake DESTDIR="${D}" "$@" install && einstalldocs" to mimic as much as possible default_src_install :|
Comment 2 Pacho Ramos gentoo-dev 2017-02-11 12:28:59 UTC
[master 5ccbbd4] gnome2.eclass: we cannot rely on default phases involving emake because they don't allow to pass extra variables, bug #606826
 1 file changed, 8 insertions(+), 9 deletions(-)
Comment 3 Mart Raudsepp gentoo-dev 2017-02-11 18:26:51 UTC
Changes like this need team review. Like I have no idea why the changes in gnome2_src_compile - there's no "$@" so it makes no difference, besides losing whatever default src_compile implementation might do. In this case the change fails to || die for emake compared to the current default implementation.

Additionally the whole claim of not being able to pass extra variables is false. There is EXTRA_EMAKE variable for that. Please revert the unreviewed eclass change and fix it in the ebuild, or pass the arguments on via EXTRA_EMAKE. However for the latter, this also then should be reviewed on the mailing list or at least within the team. I don't know if it's something we should be using, I just found it exists in the current implementation in portage, so gentoo-dev review would be useful about EXTRA_EMAKE.

gnome2.eclass change are something that currently affects 257 packages in 534 ebuilds (many of which are marked stable), not just gnome-settings-daemon here, changes have to be reviewed thoroughly.
Comment 4 Mart Raudsepp gentoo-dev 2017-02-11 18:52:03 UTC
That said, the src_install changes might be fine as-is too, just need to properly review and decide.. but the src_compile change seems wrong to me (albeit no huge issue causing). However it is still broken for everyone anyway - the change changes where things are installed for gnome-settings-daemon and maybe some other things that pass arguments to gnome2_src_configure, as there is no revbump, etc. This is why changes like this to eclasses are nowadays tried to be done together with new EAPI support additions.

So it seems better to revert eclass and fix things in ebuild revbumps with EXTRA_EMAKE if that's appropriate.
EXTRA_EMAKE="udevrulesdir=$(get_udevdir)/rules.d" gnome2_src_install
in the ebuild works fine for me, but I'm still trying to find out from people if that's OK to make use of.

Meanwhile I've reverted the eclass change, pending fixing in ebuilds (with revbumps so people actually get the fix) after finding out about EXTRA_EMAKE or changing eclass in a reviewed manner.
Comment 5 Pacho Ramos gentoo-dev 2017-02-11 19:24:32 UTC
(In reply to Mart Raudsepp from comment #3)
> Changes like this need team review. Like I have no idea why the changes in
> gnome2_src_compile - there's no "$@" so it makes no difference, besides
> losing whatever default src_compile implementation might do. In this case
> the change fails to || die for emake compared to the current default
> implementation.
> 
default_src_compile does emake


> Additionally the whole claim of not being able to pass extra variables is
> false. There is EXTRA_EMAKE variable for that. Please revert the unreviewed
> eclass change and fix it in the ebuild, or pass the arguments on via
> EXTRA_EMAKE. However for the latter, this also then should be reviewed on
> the mailing list or at least within the team. I don't know if it's something
> we should be using, I just found it exists in the current implementation in
> portage, so gentoo-dev review would be useful about EXTRA_EMAKE.

EXTRA_EMAKE is not allowed -> bug 437342, an old thread from 2004 in ML and some other bug reports related with packages using that variable

> 
> gnome2.eclass change are something that currently affects 257 packages in
> 534 ebuilds (many of which are marked stable), not just
> gnome-settings-daemon here, changes have to be reviewed thoroughly.

Now that packages will again be broken hiddenly because you reverting a change that was as close as possible as default_src_compile and default_src_install, congrats

(In reply to Mart Raudsepp from comment #4)
> 
> Meanwhile I've reverted the eclass change, pending fixing in ebuilds (with
> revbumps so people actually get the fix) after finding out about EXTRA_EMAKE
> or changing eclass in a reviewed manner.

it's obvious to me that we two cannot work on the same team
Comment 6 Mart Raudsepp gentoo-dev 2017-02-11 20:06:28 UTC
(In reply to Pacho Ramos from comment #5)
> default_src_compile does emake

No. It does:

if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then
        emake || die "emake failed"
fi

> Now that packages will again be broken hiddenly because you reverting a
> change that was as close as possible as default_src_compile and
> default_src_install, congrats

They are still broken for everyone as people don't randomly rebuild packages that use some eclass after an eclass change.
It would be useful to go through gentoo-dev review due to the global effect here, or at least request improvements here for a future EAPI.

> (In reply to Mart Raudsepp from comment #4)
> > Meanwhile I've reverted the eclass change, pending fixing in ebuilds (with
> > revbumps so people actually get the fix) after finding out about EXTRA_EMAKE
> > or changing eclass in a reviewed manner.
> 
> it's obvious to me that we two cannot work on the same team

eclass changes require review before committing them. The team lead said so the last time this was violated (and worked constructively to fix the issues that time instead of reverting, in the spirit of cooperating and teamwork). Period.
I am not going anywhere.
Comment 7 Pacho Ramos gentoo-dev 2017-02-11 20:18:04 UTC
Don't worry, I wasn't expecting you to go anywhere, this is the way gnome/gstreamer teams are working for ages
Comment 8 Mart Raudsepp gentoo-dev 2017-03-21 00:25:24 UTC
commit 998608a7330d83ceabcff572589338a790e09d20
Author: Mart Raudsepp <leio@gentoo.org>
Date:   Tue Mar 21 01:49:19 2017 +0200

    gnome-base/gnome-settings-daemon: bump to 3.22.2, fix udev rule location
    
    Gentoo-bug: 606826
    
    Package-Manager: Portage-2.3.4, Repoman-2.3.1

 gnome-base/gnome-settings-daemon/Manifest                                  |   1 +
 gnome-base/gnome-settings-daemon/files/3.22.2-udevrulesdir-configure.patch |  48 ++++++++++++++++++++++++++++++++++++++++++
 gnome-base/gnome-settings-daemon/gnome-settings-daemon-3.22.2.ebuild       | 147 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 196 insertions(+)