Package: flit / 3.0.0-1

debian_installer_allowed_root.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Description: Short circuit root test for building Debian packages
   * Patch install.Installer class not to error out when subclassed as
     DebianInstaller from dh-python
Author: Scott Kitterman <scott@kitterman.com>
Origin: vendor
Forwarded: not-needed
Last-Update: 2020-04-13

--- flit-2.3.0.orig/flit/install.py
+++ flit-2.3.0/flit/install.py
@@ -108,7 +108,8 @@ class Installer(object):
 
         if (hasattr(os, 'getuid') and (os.getuid() == 0) and
                 (not os.environ.get('FLIT_ROOT_INSTALL'))):
-            raise RootInstallError
+            if type(self).__name__ != 'DebianInstaller':
+                raise RootInstallError
 
         if user is None:
             self.user = self._auto_user(python)