mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
aa-mergeprof: don't ask for includes that are already there
Acked-by: Steve Beattie <steve@nxnw.org>
This commit is contained in:
parent
4f9183b23e
commit
4f4eded593
1 changed files with 12 additions and 2 deletions
|
@ -239,7 +239,12 @@ class Merge(object):
|
|||
|
||||
#Add the file-wide includes from the other profile to the user profile
|
||||
done = False
|
||||
options = list(map(lambda inc: '#include <%s>' %inc, sorted(other.filelist[other.filename]['include'].keys())))
|
||||
|
||||
options = []
|
||||
for inc in other.filelist[other.filename]['include'].keys():
|
||||
if not inc in self.user.filelist[self.user.filename]['include'].keys():
|
||||
options.append('#include <%s>' %inc)
|
||||
|
||||
default_option = 1
|
||||
|
||||
q = aaui.PromptQuestion()
|
||||
|
@ -267,7 +272,12 @@ class Merge(object):
|
|||
for hat in sorted(other.aa[profile].keys()):
|
||||
#Add the includes from the other profile to the user profile
|
||||
done = False
|
||||
options = list(map(lambda inc: '#include <%s>' %inc, sorted(other.aa[profile][hat]['include'].keys())))
|
||||
|
||||
options = []
|
||||
for inc in other.aa[profile][hat]['include'].keys():
|
||||
if not inc in self.user.aa[profile][hat]['include'].keys():
|
||||
options.append('#include <%s>' %inc)
|
||||
|
||||
default_option = 1
|
||||
|
||||
q = aaui.PromptQuestion()
|
||||
|
|
Loading…
Add table
Reference in a new issue