Short circuit root test for building Debian packages

Origin: vendor
Forwarded: not-needed
Last-Update: 2020-04-13

  * Patch install.Installer class not to error out when subclassed as
    DebianInstaller from dh-python
This commit is contained in:
Scott Kitterman 2021-12-07 20:08:04 -05:00 committed by Lu zhiping
parent baf66ab414
commit 490603f643
1 changed files with 2 additions and 1 deletions

View File

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