mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-23 10:37:27 +00: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
@ -239,7 +239,12 @@ class Merge(object):
|
|||||||
|
|
||||||
#Add the file-wide includes from the other profile to the user profile
|
#Add the file-wide includes from the other profile to the user profile
|
||||||
done = False
|
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
|
default_option = 1
|
||||||
|
|
||||||
q = aaui.PromptQuestion()
|
q = aaui.PromptQuestion()
|
||||||
@ -267,7 +272,12 @@ class Merge(object):
|
|||||||
for hat in sorted(other.aa[profile].keys()):
|
for hat in sorted(other.aa[profile].keys()):
|
||||||
#Add the includes from the other profile to the user profile
|
#Add the includes from the other profile to the user profile
|
||||||
done = False
|
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
|
default_option = 1
|
||||||
|
|
||||||
q = aaui.PromptQuestion()
|
q = aaui.PromptQuestion()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user