Gentoo Archives: gentoo-commits

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