summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe
diff options
context:
space:
mode:
authorFredrik Gustafsson <fredrik.gustafsson@axis.com>2020-07-24 16:42:32 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-07-27 19:58:10 +0100
commit9129dfe523488b61c711dde5cd46328d39e4c368 (patch)
treee61f9a51af6f727691ab74f8a1ceafd2986e8cb7 /meta/lib/oe
parent59397b3a01d03f4063c3665a1d7e7e6e7dfb853d (diff)
downloadpoky-9129dfe523488b61c711dde5cd46328d39e4c368.tar.gz
deb: Move deb manifest to its own subdir
This is a part of a refactor that will split the package manager code so that it's possible to use other package managers in other layers. (From OE-Core rev: f8ee8bc737a982001b9fd0ad441495a52f12e9b4) Signed-off-by: Fredrik Gustafsson <fredrigu@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe')
-rw-r--r--meta/lib/oe/manifest.py21
-rw-r--r--meta/lib/oe/package_manager/deb/__init__.py3
-rw-r--r--meta/lib/oe/package_manager/deb/manifest.py26
-rw-r--r--meta/lib/oe/rootfs.py1
4 files changed, 31 insertions, 20 deletions
diff --git a/meta/lib/oe/manifest.py b/meta/lib/oe/manifest.py
index f87c150d33..47bd622412 100644
--- a/meta/lib/oe/manifest.py
+++ b/meta/lib/oe/manifest.py
@@ -187,32 +187,13 @@ class Manifest(object, metaclass=ABCMeta):
187 187
188 return installed_pkgs 188 return installed_pkgs
189 189
190class DpkgManifest(Manifest):
191 def create_initial(self):
192 with open(self.initial_manifest, "w+") as manifest:
193 manifest.write(self.initial_manifest_file_header)
194
195 for var in self.var_maps[self.manifest_type]:
196 pkg_list = self.d.getVar(var)
197
198 if pkg_list is None:
199 continue
200
201 for pkg in pkg_list.split():
202 manifest.write("%s,%s\n" %
203 (self.var_maps[self.manifest_type][var], pkg))
204
205 def create_final(self):
206 pass
207
208 def create_full(self, pm):
209 pass
210 190
211 191
212def create_manifest(d, final_manifest=False, manifest_dir=None, 192def create_manifest(d, final_manifest=False, manifest_dir=None,
213 manifest_type=Manifest.MANIFEST_TYPE_IMAGE): 193 manifest_type=Manifest.MANIFEST_TYPE_IMAGE):
214 from oe.package_manager.rpm.manifest import RpmManifest 194 from oe.package_manager.rpm.manifest import RpmManifest
215 from oe.package_manager.ipk.manifest import OpkgManifest 195 from oe.package_manager.ipk.manifest import OpkgManifest
196 from oe.package_manager.deb.manifest import DpkgManifest
216 manifest_map = {'rpm': RpmManifest, 197 manifest_map = {'rpm': RpmManifest,
217 'ipk': OpkgManifest, 198 'ipk': OpkgManifest,
218 'deb': DpkgManifest} 199 'deb': DpkgManifest}
diff --git a/meta/lib/oe/package_manager/deb/__init__.py b/meta/lib/oe/package_manager/deb/__init__.py
new file mode 100644
index 0000000000..a2094304c9
--- /dev/null
+++ b/meta/lib/oe/package_manager/deb/__init__.py
@@ -0,0 +1,3 @@
1#
2# SPDX-License-Identifier: GPL-2.0-only
3#
diff --git a/meta/lib/oe/package_manager/deb/manifest.py b/meta/lib/oe/package_manager/deb/manifest.py
new file mode 100644
index 0000000000..0b12036644
--- /dev/null
+++ b/meta/lib/oe/package_manager/deb/manifest.py
@@ -0,0 +1,26 @@
1#
2# SPDX-License-Identifier: GPL-2.0-only
3#
4
5from oe.manifest import Manifest
6
7class DpkgManifest(Manifest):
8 def create_initial(self):
9 with open(self.initial_manifest, "w+") as manifest:
10 manifest.write(self.initial_manifest_file_header)
11
12 for var in self.var_maps[self.manifest_type]:
13 pkg_list = self.d.getVar(var)
14
15 if pkg_list is None:
16 continue
17
18 for pkg in pkg_list.split():
19 manifest.write("%s,%s\n" %
20 (self.var_maps[self.manifest_type][var], pkg))
21
22 def create_final(self):
23 pass
24
25 def create_full(self, pm):
26 pass
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index 1ba0a71253..876e13079c 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -13,6 +13,7 @@ import subprocess
13import re 13import re
14from oe.package_manager.rpm.manifest import RpmManifest 14from oe.package_manager.rpm.manifest import RpmManifest
15from oe.package_manager.ipk.manifest import OpkgManifest 15from oe.package_manager.ipk.manifest import OpkgManifest
16from oe.package_manager.deb.manifest import DpkgManifest
16 17
17class Rootfs(object, metaclass=ABCMeta): 18class Rootfs(object, metaclass=ABCMeta):
18 """ 19 """