[elbe-devel] [PATCH 4/6] src-cdrom: add size limit in XML
bage at linutronix.de
bage at linutronix.de
Fri Aug 30 12:58:28 CEST 2019
From: Bastian Germann <bage at linutronix.de>
Add a size element to split the src-cdrom into several iso files.
Use this element with a lower priority than the --cdrom-size parameter.
Add such an element to the example with existing src-cdrom section.
Signed-off-by: Bastian Germann <bage at linutronix.de>
---
elbepack/elbeproject.py | 4 ++++
examples/x86_64-docker.xml | 1 +
schema/dbsfed.xsd | 13 +++++++++++--
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/elbepack/elbeproject.py b/elbepack/elbeproject.py
index 2b900203..b5a844ab 100644
--- a/elbepack/elbeproject.py
+++ b/elbepack/elbeproject.py
@@ -23,6 +23,7 @@ from elbepack.rfs import BuildEnv
from elbepack.rpcaptcache import get_rpcaptcache
from elbepack.efilesystem import TargetFs
from elbepack.efilesystem import extract_target
+from elbepack.filesystem import size_to_int
from elbepack.dump import elbe_report
from elbepack.dump import dump_debootstrappkgs, dump_initvmpkgs, dump_fullpkgs
@@ -465,6 +466,9 @@ class ElbeProject (object):
self.builddir,
self.log)
if build_sources:
+ if not cdrom_size and self.xml.has("src-cdrom/size"):
+ cdrom_size = size_to_int(self.xml.text("src-cdrom/size"))
+
elog.h1("Source CD %s" % sysrootstr)
try:
self.repo_images += mk_source_cdrom(env.rfs,
diff --git a/examples/x86_64-docker.xml b/examples/x86_64-docker.xml
index 669bc3b0..c4cbbd61 100644
--- a/examples/x86_64-docker.xml
+++ b/examples/x86_64-docker.xml
@@ -37,6 +37,7 @@
</pkg-list>
</target>
<src-cdrom>
+ <size>50M</size>
<src-opts>
<publisher>TUX</publisher>
</src-opts>
diff --git a/schema/dbsfed.xsd b/schema/dbsfed.xsd
index 745abd5f..87fd9d08 100644
--- a/schema/dbsfed.xsd
+++ b/schema/dbsfed.xsd
@@ -2526,10 +2526,19 @@
</documentation>
</annotation>
<all>
+ <element name="size" type="rfs:memory" minOccurs="0" maxOccurs="1">
+ <annotation>
+ <documentation>
+ The size limit for each source cdrom ISO image.
+ The files are distributed on several cdroms as needed.
+ Omitting this element means no size limit.
+ </documentation>
+ </annotation>
+ </element>
<element name="src-opts" type="rfs:iso-opts" minOccurs="0" maxOccurs="1">
- <annotation>
+ <annotation>
<documentation>
- Give options for the source cdrom ISO image.
+ Options for the source cdrom ISO images.
</documentation>
</annotation>
</element>
--
2.20.1
More information about the elbe-devel
mailing list