entropy.client: deny treeupdates as user due to Portage /var/db/pkg perms
This commit is contained in:
@@ -174,8 +174,9 @@ class RepositoryMixin:
|
||||
)
|
||||
|
||||
if (repoid not in etpConst['client_treeupdatescalled']) and \
|
||||
(self.entropyTools.is_user_in_entropy_group()) and \
|
||||
(self.entropyTools.is_root()) and \
|
||||
(not repoid.endswith(etpConst['packagesext'])):
|
||||
# only as root due to Portage
|
||||
updated = False
|
||||
try:
|
||||
updated = conn.clientUpdatePackagesData(self.clientDbconn)
|
||||
|
||||
@@ -1027,7 +1027,8 @@ class Repository:
|
||||
if self.fetchSecurity:
|
||||
self.do_update_security_advisories()
|
||||
# do treeupdates
|
||||
if isinstance(self.Entropy.clientDbconn,LocalRepository):
|
||||
if isinstance(self.Entropy.clientDbconn, LocalRepository) and \
|
||||
self.entropyTools.is_root(): # only as root due to Portage
|
||||
for repo in self.reponames:
|
||||
dbc = self.Entropy.open_repository(repo)
|
||||
dbc.clientUpdatePackagesData(self.Entropy.clientDbconn)
|
||||
|
||||
Reference in New Issue
Block a user