diff options
author | Tom Marshall <tdm@cyngn.com> | 2014-12-16 09:58:47 -0800 |
---|---|---|
committer | Adnan Begovic <adnan@cyngn.com> | 2015-10-06 18:05:33 -0700 |
commit | 2545b264be21c70b2c9be0c3d29e47e8bea08ac3 (patch) | |
tree | ae91ae8278cd5f4238462c68c75df47c27fd8ece /tools/releasetools/edify_generator.py | |
parent | 317522d5aeaa6b74a807627da25665223f9920ac (diff) | |
download | build-2545b264be21c70b2c9be0c3d29e47e8bea08ac3.zip build-2545b264be21c70b2c9be0c3d29e47e8bea08ac3.tar.gz build-2545b264be21c70b2c9be0c3d29e47e8bea08ac3.tar.bz2 |
build: Only set capabilities if provided
* Allows OUT/install to be compatibile with K recoveries.
Change-Id: I308ee5759da1e3c8e749e9408793f0720fb83cee
Diffstat (limited to 'tools/releasetools/edify_generator.py')
-rw-r--r-- | tools/releasetools/edify_generator.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/releasetools/edify_generator.py b/tools/releasetools/edify_generator.py index 4f25d2d..5d24a6b 100644 --- a/tools/releasetools/edify_generator.py +++ b/tools/releasetools/edify_generator.py @@ -339,10 +339,10 @@ class EdifyGenerator(object): if not self.info.get("use_set_metadata", False): self.script.append('set_perm(%d, %d, 0%o, "%s");' % (uid, gid, mode, fn)) else: - if capabilities is None: - capabilities = "0x0" - cmd = 'set_metadata("%s", "uid", %d, "gid", %d, "mode", 0%o, ' \ - '"capabilities", %s' % (fn, uid, gid, mode, capabilities) + cmd = 'set_metadata("%s", "uid", %d, "gid", %d, "mode", 0%o' \ + % (fn, uid, gid, mode) + if capabilities is not None: + cmd += ', "capabilities", %s' % ( capabilities ) if selabel is not None: cmd += ', "selabel", "%s"' % selabel cmd += ');' @@ -355,11 +355,11 @@ class EdifyGenerator(object): self.script.append('set_perm_recursive(%d, %d, 0%o, 0%o, "%s");' % (uid, gid, dmode, fmode, fn)) else: - if capabilities is None: - capabilities = "0x0" cmd = 'set_metadata_recursive("%s", "uid", %d, "gid", %d, ' \ - '"dmode", 0%o, "fmode", 0%o, "capabilities", %s' \ - % (fn, uid, gid, dmode, fmode, capabilities) + '"dmode", 0%o, "fmode", 0%o' \ + % (fn, uid, gid, dmode, fmode) + if capabilities is not None: + cmd += ', "capabilities", "%s"' % ( capabilities ) if selabel is not None: cmd += ', "selabel", "%s"' % selabel cmd += ');' |