summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Oberritter <obi@opendreambox.org>2014-09-10 19:54:25 +0200
committerAndreas Oberritter <obi@opendreambox.org>2015-02-23 17:15:52 +0100
commite7db2c7136a041f584c18ca178aa2556d7e1159e (patch)
tree578579e4ec90b912edc9a3a5b885d84d9a9afd22
parentf780a10f8f7d1a169980abfe3120b4a03700f0f7 (diff)
downloadopenembedded-core-contrib-e7db2c7136a041f584c18ca178aa2556d7e1159e.tar.gz
openembedded-core-contrib-e7db2c7136a041f584c18ca178aa2556d7e1159e.tar.bz2
openembedded-core-contrib-e7db2c7136a041f584c18ca178aa2556d7e1159e.zip
{insane,package{,_deb,_ipk}}.bbclass: support 'Breaks' control field by introducing RBREAKS
Required by Debian Policy section 7.3. Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
-rw-r--r--meta/classes/insane.bbclass4
-rw-r--r--meta/classes/package.bbclass4
-rw-r--r--meta/classes/package_deb.bbclass4
-rw-r--r--meta/classes/package_ipk.bbclass4
4 files changed, 14 insertions, 2 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index a784aff3a9..0f0bec2b4a 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -767,6 +767,8 @@ def package_qa_check_deps(pkg, pkgdest, skip, d):
sane = False
if not check_valid_deps('RCONFLICTS'):
sane = False
+ if not check_valid_deps('RBREAKS'):
+ sane = False
return sane
@@ -946,7 +948,7 @@ python () {
issues = []
if (d.getVar('PACKAGES', True) or "").split():
- for var in 'RDEPENDS', 'RRECOMMENDS', 'RSUGGESTS', 'RCONFLICTS', 'RPROVIDES', 'RREPLACES', 'FILES', 'pkg_preinst', 'pkg_postinst', 'pkg_prerm', 'pkg_postrm', 'ALLOW_EMPTY':
+ for var in 'RDEPENDS', 'RRECOMMENDS', 'RSUGGESTS', 'RCONFLICTS', 'RPROVIDES', 'RREPLACES', 'RBREAKS', 'FILES', 'pkg_preinst', 'pkg_postinst', 'pkg_prerm', 'pkg_postrm', 'ALLOW_EMPTY':
if d.getVar(var):
issues.append(var)
for i in issues:
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 363cf61308..6ddf9435b8 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1194,6 +1194,7 @@ python emit_pkgdata() {
write_if_exists(sf, pkg, 'RSUGGESTS')
write_if_exists(sf, pkg, 'RREPLACES')
write_if_exists(sf, pkg, 'RCONFLICTS')
+ write_if_exists(sf, pkg, 'RBREAKS')
write_if_exists(sf, pkg, 'SECTION')
write_if_exists(sf, pkg, 'PKG')
write_if_exists(sf, pkg, 'ALLOW_EMPTY')
@@ -1800,7 +1801,7 @@ python package_depchains() {
# Since bitbake can't determine which variables are accessed during package
# iteration, we need to list them here:
-PACKAGEVARS = "FILES RDEPENDS RRECOMMENDS SUMMARY DESCRIPTION RSUGGESTS RPROVIDES RCONFLICTS PKG ALLOW_EMPTY pkg_postinst pkg_postrm INITSCRIPT_NAME INITSCRIPT_PARAMS DEBIAN_NOAUTONAME ALTERNATIVE PKGE PKGV PKGR USERADD_PARAM GROUPADD_PARAM CONFFILES SYSTEMD_SERVICE"
+PACKAGEVARS = "FILES RDEPENDS RRECOMMENDS SUMMARY DESCRIPTION RSUGGESTS RPROVIDES RCONFLICTS RBREAKS PKG ALLOW_EMPTY pkg_postinst pkg_postrm INITSCRIPT_NAME INITSCRIPT_PARAMS DEBIAN_NOAUTONAME ALTERNATIVE PKGE PKGV PKGR USERADD_PARAM GROUPADD_PARAM CONFFILES SYSTEMD_SERVICE"
def gen_packagevar(d):
ret = []
@@ -1980,4 +1981,5 @@ def mapping_rename_hook(d):
runtime_mapping_rename("RPROVIDES", pkg, d)
runtime_mapping_rename("RREPLACES", pkg, d)
runtime_mapping_rename("RCONFLICTS", pkg, d)
+ runtime_mapping_rename("RBREAKS", pkg, d)
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index 980c81d8aa..d3c10ba3a9 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -396,6 +396,8 @@ python do_package_deb () {
debian_cmp_remap(rreplaces)
rconflicts = bb.utils.explode_dep_versions2(localdata.getVar("RCONFLICTS", True) or "")
debian_cmp_remap(rconflicts)
+ rbreaks = bb.utils.explode_dep_versions2(localdata.getVar("RBREAKS", True) or "")
+ debian_cmp_remap(rbreaks)
if rdepends:
ctrlfile.write("Depends: %s\n" % unicode(bb.utils.join_deps(rdepends)))
if rsuggests:
@@ -408,6 +410,8 @@ python do_package_deb () {
ctrlfile.write("Replaces: %s\n" % unicode(bb.utils.join_deps(rreplaces)))
if rconflicts:
ctrlfile.write("Conflicts: %s\n" % unicode(bb.utils.join_deps(rconflicts)))
+ if rbreaks:
+ ctrlfile.write("Breaks: %s\n" % unicode(bb.utils.join_deps(rbreaks)))
ctrlfile.close()
for script in ["preinst", "postinst", "prerm", "postrm"]:
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
index d0db9454d1..07b4c0e738 100644
--- a/meta/classes/package_ipk.bbclass
+++ b/meta/classes/package_ipk.bbclass
@@ -358,6 +358,8 @@ python do_package_ipk () {
debian_cmp_remap(rreplaces)
rconflicts = bb.utils.explode_dep_versions2(localdata.getVar("RCONFLICTS", True) or "")
debian_cmp_remap(rconflicts)
+ rbreaks = bb.utils.explode_dep_versions2(localdata.getVar("RBREAKS", True) or "")
+ debian_cmp_remap(rbreaks)
if rdepends:
ctrlfile.write("Depends: %s\n" % bb.utils.join_deps(rdepends))
@@ -371,6 +373,8 @@ python do_package_ipk () {
ctrlfile.write("Replaces: %s\n" % bb.utils.join_deps(rreplaces))
if rconflicts:
ctrlfile.write("Conflicts: %s\n" % bb.utils.join_deps(rconflicts))
+ if rbreaks:
+ ctrlfile.write("Breaks: %s\n" % bb.utils.join_deps(rbreaks))
src_uri = localdata.getVar("SRC_URI", True) or "None"
if src_uri:
src_uri = re.sub("\s+", " ", src_uri)