diff options
-rw-r--r-- | meta/lib/oe/package_manager/deb/__init__.py | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/meta/lib/oe/package_manager/deb/__init__.py b/meta/lib/oe/package_manager/deb/__init__.py index 9f112ae25b..86ddb130ad 100644 --- a/meta/lib/oe/package_manager/deb/__init__.py +++ b/meta/lib/oe/package_manager/deb/__init__.py | |||
@@ -53,6 +53,7 @@ class DpkgIndexer(Indexer): | |||
53 | 53 | ||
54 | index_cmds = [] | 54 | index_cmds = [] |
55 | deb_dirs_found = False | 55 | deb_dirs_found = False |
56 | index_sign_files = set() | ||
56 | for arch in arch_list: | 57 | for arch in arch_list: |
57 | arch_dir = os.path.join(self.deploy_dir, arch) | 58 | arch_dir = os.path.join(self.deploy_dir, arch) |
58 | if not os.path.isdir(arch_dir): | 59 | if not os.path.isdir(arch_dir): |
@@ -62,7 +63,10 @@ class DpkgIndexer(Indexer): | |||
62 | 63 | ||
63 | cmd += "%s -fcn Packages > Packages.gz;" % gzip | 64 | cmd += "%s -fcn Packages > Packages.gz;" % gzip |
64 | 65 | ||
65 | with open(os.path.join(arch_dir, "Release"), "w+") as release: | 66 | release_file = os.path.join(arch_dir, "Release") |
67 | index_sign_files.add(release_file) | ||
68 | |||
69 | with open(release_file, "w+") as release: | ||
66 | release.write("Label: %s\n" % arch) | 70 | release.write("Label: %s\n" % arch) |
67 | 71 | ||
68 | cmd += "PSEUDO_UNLOAD=1 %s release . >> Release" % apt_ftparchive | 72 | cmd += "PSEUDO_UNLOAD=1 %s release . >> Release" % apt_ftparchive |
@@ -76,8 +80,17 @@ class DpkgIndexer(Indexer): | |||
76 | return | 80 | return |
77 | 81 | ||
78 | oe.utils.multiprocess_launch(create_index, index_cmds, self.d) | 82 | oe.utils.multiprocess_launch(create_index, index_cmds, self.d) |
79 | if self.d.getVar('PACKAGE_FEED_SIGN') == '1': | 83 | if self.d.getVar('PACKAGE_FEED_SIGN', True) == '1': |
80 | raise NotImplementedError('Package feed signing not implementd for dpkg') | 84 | signer = get_signer(self.d, self.d.getVar('PACKAGE_FEED_GPG_BACKEND', True)) |
85 | else: | ||
86 | signer = None | ||
87 | if signer: | ||
88 | for f in index_sign_files: | ||
89 | signer.detach_sign(f, | ||
90 | self.d.getVar('PACKAGE_FEED_GPG_NAME', True), | ||
91 | self.d.getVar('PACKAGE_FEED_GPG_PASSPHRASE_FILE', True), | ||
92 | output_suffix="gpg", | ||
93 | use_sha256=True) | ||
81 | 94 | ||
82 | class PMPkgsList(PkgsList): | 95 | class PMPkgsList(PkgsList): |
83 | 96 | ||