1 |
Restore the ability to install sbin-tools into sbindir since it works |
2 |
fine with pure distutils. The issue is python-exec/eclass-specific and |
3 |
therefore all the relevant workarounds belong in the ebuild. |
4 |
--- |
5 |
pym/portage/tests/__init__.py | 4 +--- |
6 |
setup.py | 23 +++++++++++++++++++---- |
7 |
2 files changed, 20 insertions(+), 7 deletions(-) |
8 |
|
9 |
diff --git a/pym/portage/tests/__init__.py b/pym/portage/tests/__init__.py |
10 |
index afa57e3..708dd59 100644 |
11 |
--- a/pym/portage/tests/__init__.py |
12 |
+++ b/pym/portage/tests/__init__.py |
13 |
@@ -197,9 +197,7 @@ class TestCase(unittest.TestCase): |
14 |
self.cnf_path = cnf_path |
15 |
self.cnf_etc_path = cnf_etc_path |
16 |
self.bindir = cnf_bindir |
17 |
- # sbin scripts are installed by setup.py to the bindir |
18 |
- # they are relocated to /usr/sbin dir by the ebuild later |
19 |
- self.sbindir = self.bindir |
20 |
+ self.sbindir = cnf_sbindir |
21 |
|
22 |
def defaultTestResult(self): |
23 |
return TextTestResult() |
24 |
diff --git a/setup.py b/setup.py |
25 |
index dba8539..8231c0a 100755 |
26 |
--- a/setup.py |
27 |
+++ b/setup.py |
28 |
@@ -30,10 +30,12 @@ import sys |
29 |
|
30 |
x_scripts = { |
31 |
'bin': [ |
32 |
- 'bin/archive-conf', 'bin/dispatch-conf', 'bin/ebuild', 'bin/egencache', |
33 |
- 'bin/emaint', 'bin/emerge', 'bin/emerge-webrsync', 'bin/emirrordist', |
34 |
- 'bin/env-update', 'bin/etc-update', 'bin/fixpackages', 'bin/portageq', |
35 |
- 'bin/quickpkg', 'bin/regenworld', 'bin/repoman', |
36 |
+ 'bin/ebuild', 'bin/egencache', 'bin/emerge', 'bin/emerge-webrsync', |
37 |
+ 'bin/emirrordist', 'bin/portageq', 'bin/quickpkg', 'bin/repoman' |
38 |
+ ], |
39 |
+ 'sbin': [ |
40 |
+ 'bin/archive-conf', 'bin/dispatch-conf', 'bin/emaint', 'bin/env-update', |
41 |
+ 'bin/etc-update', 'bin/fixpackages', 'bin/regenworld' |
42 |
], |
43 |
} |
44 |
|
45 |
@@ -224,6 +226,10 @@ class x_build_scripts_bin(x_build_scripts_custom): |
46 |
dir_name = 'bin' |
47 |
|
48 |
|
49 |
+class x_build_scripts_sbin(x_build_scripts_custom): |
50 |
+ dir_name = 'sbin' |
51 |
+ |
52 |
+ |
53 |
class x_build_scripts_portagebin(x_build_scripts_custom): |
54 |
dir_name = 'portage' |
55 |
|
56 |
@@ -238,6 +244,7 @@ class x_build_scripts(build_scripts): |
57 |
def run(self): |
58 |
self.run_command('build_scripts_bin') |
59 |
self.run_command('build_scripts_portagebin') |
60 |
+ self.run_command('build_scripts_sbin') |
61 |
|
62 |
|
63 |
class x_clean(clean): |
64 |
@@ -473,6 +480,11 @@ class x_install_scripts_bin(x_install_scripts_custom): |
65 |
var_name = 'bindir' |
66 |
|
67 |
|
68 |
+class x_install_scripts_sbin(x_install_scripts_custom): |
69 |
+ dir_name = 'sbin' |
70 |
+ var_name = 'sbindir' |
71 |
+ |
72 |
+ |
73 |
class x_install_scripts_portagebin(x_install_scripts_custom): |
74 |
dir_name = 'portage' |
75 |
var_name = 'portage_bindir' |
76 |
@@ -488,6 +500,7 @@ class x_install_scripts(install_scripts): |
77 |
def run(self): |
78 |
self.run_command('install_scripts_bin') |
79 |
self.run_command('install_scripts_portagebin') |
80 |
+ self.run_command('install_scripts_sbin') |
81 |
|
82 |
|
83 |
class x_sdist(sdist): |
84 |
@@ -624,6 +637,7 @@ setup( |
85 |
'build_scripts': x_build_scripts, |
86 |
'build_scripts_bin': x_build_scripts_bin, |
87 |
'build_scripts_portagebin': x_build_scripts_portagebin, |
88 |
+ 'build_scripts_sbin': x_build_scripts_sbin, |
89 |
'build_tests': build_tests, |
90 |
'clean': x_clean, |
91 |
'docbook': docbook, |
92 |
@@ -636,6 +650,7 @@ setup( |
93 |
'install_scripts': x_install_scripts, |
94 |
'install_scripts_bin': x_install_scripts_bin, |
95 |
'install_scripts_portagebin': x_install_scripts_portagebin, |
96 |
+ 'install_scripts_sbin': x_install_scripts_sbin, |
97 |
'sdist': x_sdist, |
98 |
'test': test, |
99 |
}, |
100 |
-- |
101 |
2.1.3 |