1
0
mirror of https://github.com/altlinux/gpupdate.git synced 2025-03-21 18:50:38 +03:00

Added executable attribute to table for files

This commit is contained in:
Valentin Sokolov 2023-03-16 18:12:12 +04:00 committed by Evgeny Sinelnikov
parent c729b8a6d6
commit d54cd790b1
3 changed files with 14 additions and 9 deletions

View File

@ -30,6 +30,7 @@ def read_files(filesxml):
fil_obj.set_archive(props.get('archive', default=None))
fil_obj.set_hidden(props.get('hidden', default=None))
fil_obj.set_suppress(props.get('suppress', default=None))
fil_obj.set_executable(props.get('executable', default=None))
files.append(fil_obj)
return files
@ -54,3 +55,5 @@ class fileentry:
self.hidden = hidden
def set_suppress(self, suppress):
self.suppress = suppress
def set_executable(self, executable):
self.executable = executable

View File

@ -216,17 +216,17 @@ class file_entry(object):
'''
Object mapping representing FILES.XML
'''
def __init__(self, sid, scrobj, policy_name):
def __init__(self, sid, fileobj, policy_name):
self.sid = sid
self.policy_name = policy_name
self.action = scrobj.action
self.fromPath = scrobj.fromPath
self.targetPath = scrobj.targetPath
self.readOnly = scrobj.readOnly
self.archive = scrobj.archive
self.hidden = scrobj.hidden
self.suppress = scrobj.suppress
self.action = fileobj.action
self.fromPath = fileobj.fromPath
self.targetPath = fileobj.targetPath
self.readOnly = fileobj.readOnly
self.archive = fileobj.archive
self.hidden = fileobj.hidden
self.suppress = fileobj.suppress
self.executable = fileobj.executable
def update_fields(self):
'''
@ -241,6 +241,7 @@ class file_entry(object):
fields['archive'] = self.archive
fields['hidden'] = self.hidden
fields['suppress'] = self.suppress
fields['executable'] = self.executable
return fields

View File

@ -178,6 +178,7 @@ class sqlite_registry(registry):
, Column('archive', String)
, Column('hidden', String)
, Column('suppress', String)
, Column('executable', String)
, UniqueConstraint('sid', 'policy_name', 'targetPath', 'fromPath')
)
self.__ini = Table(