98 def __elf_wrong_location_check(self, path): |
98 def __elf_wrong_location_check(self, path): |
99 result = None |
99 result = None |
100 |
100 |
101 ei = elf.get_info(path) |
101 ei = elf.get_info(path) |
102 bits = ei.get("bits") |
102 bits = ei.get("bits") |
103 frag = os.path.basename(os.path.dirname(path)) |
103 elems = os.path.dirname(path).split("/") |
104 |
104 |
105 if bits == 32 and frag in ["sparcv9", "amd64", "64"]: |
105 if ("amd64" in elems) or ("sparcv9" in elems) or ("64" in elems): |
|
106 path64 = True |
|
107 else: |
|
108 path64 = False |
|
109 |
|
110 if bits == 32 and path64: |
106 result = _("32-bit object '%s' in 64-bit path") |
111 result = _("32-bit object '%s' in 64-bit path") |
107 elif bits == 64 and frag not in ["sparcv9", "amd64", "64"]: |
112 elif bits == 64 and not path64: |
108 result = _("64-bit object '%s' in 32-bit path") |
113 result = _("64-bit object '%s' in 32-bit path") |
109 |
|
110 return result |
114 return result |
111 |
115 |
112 def file_action(self, action, manifest, engine, pkglint_id="001"): |
116 def file_action(self, action, manifest, engine, pkglint_id="001"): |
113 """Checks for existence in the proto area.""" |
117 """Checks for existence in the proto area.""" |
114 |
118 |