1 |
commit: 38232c48f1e7d01007eda57154b976901329bfd2 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed May 2 07:55:23 2012 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 2 07:55:23 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/mgorny.git;a=commit;h=38232c48 |
7 |
|
8 |
sys-apps/systemd: systemd-analyze works only with py2.7, wrt bug #413755. |
9 |
|
10 |
(Portage version: 2.2.0_alpha101_p3/git/Linux x86_64, unsigned Manifest commit) |
11 |
|
12 |
--- |
13 |
sys-apps/systemd/systemd-9999.ebuild | 28 ++++++++++++++++++++++++---- |
14 |
1 files changed, 24 insertions(+), 4 deletions(-) |
15 |
|
16 |
diff --git a/sys-apps/systemd/systemd-9999.ebuild b/sys-apps/systemd/systemd-9999.ebuild |
17 |
index 442448e..56e0f28 100644 |
18 |
--- a/sys-apps/systemd/systemd-9999.ebuild |
19 |
+++ b/sys-apps/systemd/systemd-9999.ebuild |
20 |
@@ -65,6 +65,13 @@ pkg_setup() { |
21 |
enewgroup tty 5 # used by mount-setup for /dev/pts |
22 |
} |
23 |
|
24 |
+src_prepare() { |
25 |
+ # systemd-analyze is for python2.7 only nowadays. |
26 |
+ sed -i -e '1s/python/&2.7/' src/analyze/systemd-analyze |
27 |
+ |
28 |
+ autotools-utils_src_prepare |
29 |
+} |
30 |
+ |
31 |
src_configure() { |
32 |
local myeconfargs=( |
33 |
--with-distro=gentoo |
34 |
@@ -134,7 +141,17 @@ pkg_preinst() { |
35 |
} |
36 |
|
37 |
optfeature() { |
38 |
- elog " [\e[1m$(has_version ${1} && echo I || echo ' ')\e[0m] ${1} (${2})" |
39 |
+ local i desc=${1} text |
40 |
+ shift |
41 |
+ |
42 |
+ text=" [\e[1m$(has_version ${1} && echo I || echo ' ')\e[0m] ${1}" |
43 |
+ shift |
44 |
+ |
45 |
+ for i; do |
46 |
+ elog "${text}" |
47 |
+ text="& [\e[1m$(has_version ${1} && echo I || echo ' ')\e[0m] ${1}" |
48 |
+ done |
49 |
+ elog "${text} (${desc})" |
50 |
} |
51 |
|
52 |
pkg_postinst() { |
53 |
@@ -155,9 +172,12 @@ pkg_postinst() { |
54 |
|
55 |
elog "To get additional features, a number of optional runtime dependencies may" |
56 |
elog "be installed:" |
57 |
- optfeature 'dev-python/dbus-python' 'for systemd-analyze' |
58 |
- optfeature 'dev-python/pycairo[svg]' 'for systemd-analyze plotting ability' |
59 |
- optfeature 'sys-apps/systemd-ui' 'for GTK+ systemadm UI and gnome-ask-password-agent' |
60 |
+ optfeature 'for systemd-analyze' \ |
61 |
+ 'dev-lang/python:2.7' 'dev-python/dbus-python' |
62 |
+ optfeature 'for systemd-analyze plotting ability' \ |
63 |
+ 'dev-python/pycairo[svg]' |
64 |
+ optfeature 'for GTK+ systemadm UI and gnome-ask-password-agent' \ |
65 |
+ 'sys-apps/systemd-ui' |
66 |
elog |
67 |
|
68 |
ewarn "Please note this is a work-in-progress and many packages in Gentoo" |