Debian Codegraph @

debian/patches/debian_installer_allowed_root.patch

raw
1 From: Scott Kitterman <[email protected]>
2 Date: Tue, 7 Dec 2021 20:08:04 -0500
3 Subject: Short circuit root test for building Debian packages
4
5 Origin: vendor
6 Forwarded: not-needed
7 Last-Update: 2020-04-13
8
9 * Patch install.Installer class not to error out when subclassed as
10 DebianInstaller from dh-python
11 ---
12 flit/install.py | 3 ++-
13 1 file changed, 2 insertions(+), 1 deletion(-)
14
15 diff --git a/flit/install.py b/flit/install.py
16 index 50917f1..1aa71c8 100644
17 --- a/flit/install.py
18 +++ b/flit/install.py
19 @@ -108,7 +108,8 @@ class Installer(object):
20
21 if (hasattr(os, 'getuid') and (os.getuid() == 0) and
22 (not os.environ.get('FLIT_ROOT_INSTALL'))):
23 - raise RootInstallError
24 + if type(self).__name__ != 'DebianInstaller':
25 + raise RootInstallError
26
27 if user is None:
28 self.user = self._auto_user(python)