diff options
Diffstat (limited to 'meta/lib/oe/package_manager.py')
| -rw-r--r-- | meta/lib/oe/package_manager.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py index b701b8c51b..25c38a5642 100644 --- a/meta/lib/oe/package_manager.py +++ b/meta/lib/oe/package_manager.py | |||
| @@ -153,11 +153,16 @@ class OpkgIndexer(Indexer): | |||
| 153 | "MULTILIB_ARCHS"] | 153 | "MULTILIB_ARCHS"] |
| 154 | 154 | ||
| 155 | opkg_index_cmd = bb.utils.which(os.getenv('PATH'), "opkg-make-index") | 155 | opkg_index_cmd = bb.utils.which(os.getenv('PATH'), "opkg-make-index") |
| 156 | if self.d.getVar('PACKAGE_FEED_SIGN', True) == '1': | ||
| 157 | signer = get_signer(self.d, self.d.getVar('PACKAGE_FEED_GPG_BACKEND', True)) | ||
| 158 | else: | ||
| 159 | signer = None | ||
| 156 | 160 | ||
| 157 | if not os.path.exists(os.path.join(self.deploy_dir, "Packages")): | 161 | if not os.path.exists(os.path.join(self.deploy_dir, "Packages")): |
| 158 | open(os.path.join(self.deploy_dir, "Packages"), "w").close() | 162 | open(os.path.join(self.deploy_dir, "Packages"), "w").close() |
| 159 | 163 | ||
| 160 | index_cmds = [] | 164 | index_cmds = [] |
| 165 | index_sign_files = [] | ||
| 161 | for arch_var in arch_vars: | 166 | for arch_var in arch_vars: |
| 162 | archs = self.d.getVar(arch_var, True) | 167 | archs = self.d.getVar(arch_var, True) |
| 163 | if archs is None: | 168 | if archs is None: |
| @@ -176,6 +181,8 @@ class OpkgIndexer(Indexer): | |||
| 176 | index_cmds.append('%s -r %s -p %s -m %s' % | 181 | index_cmds.append('%s -r %s -p %s -m %s' % |
| 177 | (opkg_index_cmd, pkgs_file, pkgs_file, pkgs_dir)) | 182 | (opkg_index_cmd, pkgs_file, pkgs_file, pkgs_dir)) |
| 178 | 183 | ||
| 184 | index_sign_files.append(pkgs_file) | ||
| 185 | |||
| 179 | if len(index_cmds) == 0: | 186 | if len(index_cmds) == 0: |
| 180 | bb.note("There are no packages in %s!" % self.deploy_dir) | 187 | bb.note("There are no packages in %s!" % self.deploy_dir) |
| 181 | return | 188 | return |
| @@ -183,9 +190,12 @@ class OpkgIndexer(Indexer): | |||
| 183 | result = oe.utils.multiprocess_exec(index_cmds, create_index) | 190 | result = oe.utils.multiprocess_exec(index_cmds, create_index) |
| 184 | if result: | 191 | if result: |
| 185 | bb.fatal('%s' % ('\n'.join(result))) | 192 | bb.fatal('%s' % ('\n'.join(result))) |
| 186 | if self.d.getVar('PACKAGE_FEED_SIGN', True) == '1': | ||
| 187 | raise NotImplementedError('Package feed signing not implementd for ipk') | ||
| 188 | 193 | ||
| 194 | if signer: | ||
| 195 | for f in index_sign_files: | ||
| 196 | signer.detach_sign(f, | ||
| 197 | self.d.getVar('PACKAGE_FEED_GPG_NAME', True), | ||
| 198 | self.d.getVar('PACKAGE_FEED_GPG_PASSPHRASE_FILE', True)) | ||
| 189 | 199 | ||
| 190 | 200 | ||
| 191 | class DpkgIndexer(Indexer): | 201 | class DpkgIndexer(Indexer): |
