diff options
Diffstat (limited to 'meta/lib/oe/package_manager/ipk/rootfs.py')
-rw-r--r-- | meta/lib/oe/package_manager/ipk/rootfs.py | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/meta/lib/oe/package_manager/ipk/rootfs.py b/meta/lib/oe/package_manager/ipk/rootfs.py index 26dbee6f6a..10a831994e 100644 --- a/meta/lib/oe/package_manager/ipk/rootfs.py +++ b/meta/lib/oe/package_manager/ipk/rootfs.py | |||
@@ -145,51 +145,14 @@ class PkgRootfs(DpkgOpkgRootfs): | |||
145 | self.pm.recover_packaging_data() | 145 | self.pm.recover_packaging_data() |
146 | 146 | ||
147 | bb.utils.remove(self.d.getVar('MULTILIB_TEMP_ROOTFS'), True) | 147 | bb.utils.remove(self.d.getVar('MULTILIB_TEMP_ROOTFS'), True) |
148 | |||
149 | def _prelink_file(self, root_dir, filename): | ||
150 | bb.note('prelink %s in %s' % (filename, root_dir)) | ||
151 | prelink_cfg = oe.path.join(root_dir, | ||
152 | self.d.expand('${sysconfdir}/prelink.conf')) | ||
153 | if not os.path.exists(prelink_cfg): | ||
154 | shutil.copy(self.d.expand('${STAGING_DIR_NATIVE}${sysconfdir_native}/prelink.conf'), | ||
155 | prelink_cfg) | ||
156 | |||
157 | cmd_prelink = self.d.expand('${STAGING_DIR_NATIVE}${sbindir_native}/prelink') | ||
158 | self._exec_shell_cmd([cmd_prelink, | ||
159 | '--root', | ||
160 | root_dir, | ||
161 | '-amR', | ||
162 | '-N', | ||
163 | '-c', | ||
164 | self.d.expand('${sysconfdir}/prelink.conf')]) | ||
165 | |||
166 | ''' | 148 | ''' |
167 | Compare two files with the same key twice to see if they are equal. | 149 | Compare two files with the same key twice to see if they are equal. |
168 | If they are not equal, it means they are duplicated and come from | 150 | If they are not equal, it means they are duplicated and come from |
169 | different packages. | 151 | different packages. |
170 | 1st: Comapre them directly; | ||
171 | 2nd: While incremental image creation is enabled, one of the | ||
172 | files could be probaly prelinked in the previous image | ||
173 | creation and the file has been changed, so we need to | ||
174 | prelink the other one and compare them. | ||
175 | ''' | 152 | ''' |
176 | def _file_equal(self, key, f1, f2): | 153 | def _file_equal(self, key, f1, f2): |
177 | |||
178 | # Both of them are not prelinked | ||
179 | if filecmp.cmp(f1, f2): | 154 | if filecmp.cmp(f1, f2): |
180 | return True | 155 | return True |
181 | |||
182 | if bb.data.inherits_class('image-prelink', self.d): | ||
183 | if self.image_rootfs not in f1: | ||
184 | self._prelink_file(f1.replace(key, ''), f1) | ||
185 | |||
186 | if self.image_rootfs not in f2: | ||
187 | self._prelink_file(f2.replace(key, ''), f2) | ||
188 | |||
189 | # Both of them are prelinked | ||
190 | if filecmp.cmp(f1, f2): | ||
191 | return True | ||
192 | |||
193 | # Not equal | 156 | # Not equal |
194 | return False | 157 | return False |
195 | 158 | ||