summaryrefslogtreecommitdiff
path: root/org.handhelds.familiar/classes/module.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'org.handhelds.familiar/classes/module.bbclass')
-rw-r--r--org.handhelds.familiar/classes/module.bbclass24
1 files changed, 23 insertions, 1 deletions
diff --git a/org.handhelds.familiar/classes/module.bbclass b/org.handhelds.familiar/classes/module.bbclass
index 8a13f1f..531bdbc 100644
--- a/org.handhelds.familiar/classes/module.bbclass
+++ b/org.handhelds.familiar/classes/module.bbclass
@@ -3,11 +3,14 @@ DEPENDS += "virtual/kernel"
inherit module-base
+KERNEL_MAJOR_VERSION = "${@'.'.join(bb.data.getVar('KERNEL_VERSION', d, 1).split('.')[:2])}"
+
python populate_packages_prepend() {
v = bb.data.getVar("PARALLEL_INSTALL_MODULES", d, 1) or "0"
if v == "1":
- kv = bb.data.getVar("KERNEL_VERSION", d, 1)
+ kv = bb.data.getVar("KERNEL_MAJOR_VERSION", d, 1)
packages = bb.data.getVar("PACKAGES", d, 1)
+ repl_vers = bb.data.getVar("PARALLEL_INSTALL_REPLACE_VERSIONS", d, 1)
for p in packages.split():
pkg = bb.data.getVar("PKG_%s" % p, d, 1) or p
newpkg = "%s-%s" % (pkg, kv)
@@ -18,6 +21,25 @@ python populate_packages_prepend() {
else:
rprovides = pkg
bb.data.setVar("RPROVIDES_%s" % p, rprovides, d)
+
+ # kv was changed from KERNEL_VERSION to KERNEL_MAJOR_VERSION.
+ # now fix the upgrade path...
+ if repl_vers:
+ repl_pkgs = []
+ for v in repl_vers.split():
+ repl_pkgs.append("%s-%s" % (pkg, v))
+ for i in ["PROVIDES", "CONFLICTS", "REPLACES"]:
+ val = bb.data.getVar("R%s_%s" % (i, p), d, 1)
+ if val:
+ old = val.split()
+ add = []
+ for k in repl_pkgs:
+ if not k in old:
+ add.append(k)
+ val = "%s %s" % (val, " ".join(add))
+ else:
+ val = "%s" % " ".join(repl_pkgs)
+ bb.data.setVar("R%s_%s" % (i, p), val, d)
}
module_do_compile() {