* fix: mode - umask --> mode &~ umask
This commit is contained in:
@@ -123,6 +123,12 @@ class ArchiveTar(ArchiveBase):
|
|||||||
|
|
||||||
self.tar.extract(tarinfo)
|
self.tar.extract(tarinfo)
|
||||||
|
|
||||||
|
# tarfile.extract does not honor umask. It must be honored explicitly.
|
||||||
|
# see --no-same-permissions option of tar(1), which is the deafult
|
||||||
|
# behaviour.
|
||||||
|
if not os.path.islink(tarinfo.name):
|
||||||
|
os.chmod(tarinfo.name, tarinfo.mode & ~ctx.const.umask)
|
||||||
|
|
||||||
os.chdir(oldwd)
|
os.chdir(oldwd)
|
||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
|
|||||||
@@ -79,6 +79,9 @@ class Constants:
|
|||||||
self.__c.install_tar = "install.tar"
|
self.__c.install_tar = "install.tar"
|
||||||
self.__c.install_tar_lzma = "install.tar.lzma"
|
self.__c.install_tar_lzma = "install.tar.lzma"
|
||||||
|
|
||||||
|
#file/directory permissions
|
||||||
|
self.__c.umask = 0022
|
||||||
|
|
||||||
# functions in actions_file
|
# functions in actions_file
|
||||||
self.__c.setup_func = "setup"
|
self.__c.setup_func = "setup"
|
||||||
self.__c.build_func = "build"
|
self.__c.build_func = "build"
|
||||||
|
|||||||
Reference in New Issue
Block a user