Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 557432 - sys-auth/consolekit : make sys-power/pm-utils optional
Summary: sys-auth/consolekit : make sys-power/pm-utils optional
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Jason Zaman
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-13 09:25 UTC by Perfect Gentleman
Modified: 2016-02-05 08:09 UTC (History)
2 users (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 Perfect Gentleman 2015-08-13 09:25:57 UTC
please, make pm-utils optional, not required as lots of people dont't use suspend/hibernate

Reproducible: Always
Comment 1 Jason Zaman gentoo-dev 2015-08-14 13:34:39 UTC
Fixed in consolekit-1.0.0

commit 1a6fa659a609adbca78b9a65fa217e20b9abf6ea
Author: Jason Zaman <perfinion@gentoo.org>
Date:   Fri Aug 14 21:32:44 2015 +0800

    sys-auth/consolekit: Make pm-utils optional
    
    Added the pm-utils useflag which is default enabled.
    
    Gentoo-Bug: https://bugs.gentoo.org/557432
    
    Package-Manager: portage-2.2.20.1
Comment 2 Jason Zaman gentoo-dev 2015-08-14 14:03:46 UTC
Poly-C just reminded me that USE-flags should not control runtime-deps which are not linked to.
https://devmanual.gentoo.org/general-concepts/use-flags/

"The usage of a USE flag should not control runtime dependencies when the package does not link to it"

This should be a message in pkg_postinst() instead.
Comment 3 Jason Zaman gentoo-dev 2015-08-18 04:59:47 UTC
commit 46222e30a14af05b8bf384ece8b95710c4be54d9
Author: Jason Zaman <perfinion@gentoo.org>
Date:   Tue Aug 18 12:44:47 2015 +0800

    sys-auth/consolekit: remove pm-utils dep add postinst message
    
    It is an optional dep and cannot be contolled by a useflag.
    
    Gentoo-Bug: https://bugs.gentoo.org/557432
    
    Package-Manager: portage-2.2.20.1
Comment 4 Alexandre Rostovtsev (RETIRED) gentoo-dev 2015-08-18 05:29:30 UTC
If you want to remove pm-utils dependency, first patch consolekit so that the C and dbus API doesn't mislead clients into thinking that they can suspend.(In reply to Jason Zaman from comment #2)
> Poly-C just reminded me that USE-flags should not control runtime-deps which
> are not linked to.
> https://devmanual.gentoo.org/general-concepts/use-flags/
> 
> "The usage of a USE flag should not control runtime dependencies when the
> package does not link to it"

Which is a recommendation, not a hard law.

If the package takes a a long time to recompile (think of chromium, libreoffice, webkit-gtk), then yes, of course you must avoid frivolous recompilation. For example, it would be insane for libreoffice to have a USE flag whose only effect is to add a dependency on some optional fonts.

On the other hand, "meta" packages (think of plasma-meta, gnome-base/gnome, gst-plugins-meta) have an empty src_compile, and they all have USE flags that control runtime dependencies - since there is no penalty for the user to change the USE flags, why not add a bunch of flags?

See where your package is on the spectrum between libreoffice and *meta, see what are the needs of your users.
Comment 5 Alexandre Rostovtsev (RETIRED) gentoo-dev 2015-08-18 05:38:43 UTC
(In reply to Alexandre Rostovtsev from comment #4)
> If you want to remove pm-utils dependency, first patch consolekit so that
> the C and dbus API doesn't mislead clients into thinking that they can
> suspend.

I apologize, that sentence is entirely wrong and I accidentally forgot to delete it - it was in the initial version of my comment which I had written before reading ck-1.0's src/ck-sysdeps-linux.c :/
Comment 6 Jason Zaman gentoo-dev 2016-02-05 07:28:32 UTC
(In reply to Alexandre Rostovtsev from comment #4)
> Which is a recommendation, not a hard law.
>
> See where your package is on the spectrum between libreoffice and *meta, see
> what are the needs of your users.

Not having the useflag is causing problems for users (one of many examples is bug 571974#c24) and the package is pretty small (~30 seconds on my laptop) so I am going to add the flag back.
Comment 7 Jason Zaman gentoo-dev 2016-02-05 08:09:26 UTC
fixed in the tree

commit 2a4c8fec3e75d66af07a19fbfbc44e6cb6f98118
Author: Jason Zaman <perfinion@gentoo.org>
Date:   Fri Feb 5 15:39:48 2016

    sys-auth/consolekit: Add pm-utils dep
    
    Package-Manager: portage-2.2.26