Merge lp:~intrigeri/apparmor/utils-keep-shebang into lp:apparmor/2.12
Proposed by
intrigeri
Status: | Rejected |
---|---|
Rejected by: | Steve Beattie |
Proposed branch: | lp:~intrigeri/apparmor/utils-keep-shebang |
Merge into: | lp:apparmor/2.12 |
Diff against target: |
12 lines (+1/-1) 1 file modified
utils/python-tools-setup.py (+1/-1) |
To merge this branch: | bzr merge lp:~intrigeri/apparmor/utils-keep-shebang |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Steve Beattie | Disapprove | ||
Review via email: mp+332636@code.launchpad.net |
Description of the change
This patch by Adam Conrad <email address hidden> was added to the Ubuntu packaging in the "Patches backported from upstream fix submissions" section, so I assume it was meant to be merged upstream at some point?
I'm not sure I understand what's the rationale behind this change, the patch doesn't really tell.
And If we want this upstream, I guess we'll want to drop the "if False" thing.
So at this stage, this MR is more a request for info from the Ubuntu folks than a real "please apply upstream".
To post a comment you must log in.
What this patch is doing is disabling the shbang rewriting (converting '#!/usr/bin/env python' in the scripts to the python in the PYTHON variable) that occurs during the make install phase.
However, as of http:// bazaar. launchpad. net/~apparmor- dev/apparmor/ master/ revision/ 3555 , all of the python utilities are hardcoded to use python3, so the snippet in question is redundant. So really what should happen is a patch like the following:
Index: b/utils/ python- tools-setup. py ======= ======= ======= ======= ======= ======= ======= ======= ==== python- tools-setup. py python- tools-setup. py
self. mkpath( prefix + os.path. dirname( scripts[ 0])) path.basename( s)).readlines( ) 'PYTHON' ] "".join( lines)) file(os. path.basename( s), f) file(os. path.basename( s), f)
=======
--- a/utils/
+++ b/utils/
@@ -41,14 +41,7 @@ class Install(_install, object):
for s in scripts:
f = prefix + s
- # If we have a defined python version, use it instead of the system
- # default
- if 'PYTHON' in os.environ:
- lines = open(os.
- lines[0] = '#! /usr/bin/env %s\n' % os.environ[
- open(f, 'w').write(
- else:
- self.copy_
+ self.copy_
configs = ['easyprof/ easyprof. conf']
self. mkpath( prefix + "/etc/apparmor")
and dropping Adam's patch.
I'll submit the above to the list.
Thanks!