On Wed, Oct 15, 2014 at 11:12:51PM +0200, Christian Boltz wrote:
> Hello,
> 
> Am Mittwoch, 15. Oktober 2014 schrieb Christian Boltz:
> > Remaining known issues I noticed while testing:
> > - aa-mergeprof always asks for includes, even if they are already
> > there 
> 
> The attached patch fixes this ;-)
> 
Acked-by: Steve Beattie <[email protected]>

(Though a couple of added blank lines have extraneous trailing spaces
in them. Can you fix before committing, unless they were artifacts
of your email client?)

> --- aa-mergeprof__MERGED+fixes        2014-10-15 22:23:51.029502379 +0200
> +++ aa-mergeprof      2014-10-15 23:09:33.267213910 +0200
> @@ -258,7 +258,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)
> + 

^ trailing space

>          default_option = 1
>  
>          q = aaui.PromptQuestion()
> @@ -288,7 +293,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)
> +                

^ 12 trailing spaces

>              default_option = 1
>  
>              q = aaui.PromptQuestion()

Thanks!

-- 
Steve Beattie
<[email protected]>
http://NxNW.org/~steve/

Attachment: signature.asc
Description: Digital signature

-- 
AppArmor mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/apparmor

Reply via email to