diff options
author | Rene Wagner <rw@handhelds.org> | 2006-08-14 18:33:52 +0200 |
---|---|---|
committer | Rene Wagner <rw@handhelds.org> | 2006-08-14 18:33:52 +0200 |
commit | 7151d8fc84e933979f9c2d02163bd6a64b6b44c9 (patch) | |
tree | 9b7dc47cf33bcb73d2d07ab2968a06cdbec96358 | |
parent | 175e373cfa096d9236017389d6bd5cf45a24019f (diff) |
kernel packages: fix upgrade path
Signed-off-by: Rene Wagner <rw@handhelds.org>
6 files changed, 54 insertions, 7 deletions
diff --git a/org.handhelds.familiar/classes/kernel.bbclass b/org.handhelds.familiar/classes/kernel.bbclass index 009f185..b8dfc2f 100644 --- a/org.handhelds.familiar/classes/kernel.bbclass +++ b/org.handhelds.familiar/classes/kernel.bbclass @@ -158,8 +158,11 @@ PACKAGES = "kernel kernel-image kernel-dev" FILES = "" FILES_kernel-image = "/boot/${KERNEL_IMAGETYPE}*" FILES_kernel-dev = "/boot/System.map* /boot/config*" -RDEPENDS_kernel = "kernel-image-${KERNEL_VERSION}" -PKG_kernel-image = "kernel-image-${KERNEL_VERSION}" +RDEPENDS_kernel = "kernel-image-${KERNEL_MAJOR_VERSION}" +PKG_kernel-image = "kernel-image-${KERNEL_MAJOR_VERSION}" +RPROVIDES_kernel-image = "kernel-image-${KERNEL_VERSION}" +RCONFLICTS_kernel-image = "kernel-image-${KERNEL_VERSION}" +RREPLACES_kernel-image = "kernel-image-${KERNEL_VERSION}" ALLOW_EMPTY_kernel = "1" ALLOW_EMPTY_kernel-image = "1" @@ -343,7 +346,7 @@ python populate_packages_prepend () { postinst = bb.data.getVar('pkg_postinst_modules', d, 1) postrm = bb.data.getVar('pkg_postrm_modules', d, 1) - do_split_packages(d, root='/lib/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='update-modules kernel-image-%s' % bb.data.getVar("KERNEL_VERSION", d, 1)) + do_split_packages(d, root='/lib/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='update-modules kernel-image-%s' % bb.data.getVar("KERNEL_MAJOR_VERSION", d, 1)) import re, os metapkg = "kernel-modules" @@ -369,6 +372,7 @@ python populate_packages_prepend () { kv = bb.data.getVar("KERNEL_MAJOR_VERSION", d, 1) packages = bb.data.getVar("PACKAGES", d, 1) module_re = re.compile("^kernel-module-") + repl_vers = bb.data.getVar("PARALLEL_INSTALL_REPLACE_VERSIONS", d, 1) for p in packages.split(): if not module_re.match(p): continue @@ -381,4 +385,40 @@ 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) + if repl_vers: + p = "kernel-image" + repl_pkgs = [] + for v in repl_vers.split(): + repl_pkgs.append("%s-%s" % (p, 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) } diff --git a/org.handhelds.familiar/packages/linux/handhelds-pxa-2.6_2.6.15-hh2.bb b/org.handhelds.familiar/packages/linux/handhelds-pxa-2.6_2.6.15-hh2.bb index 77c99be..41e99ed 100644 --- a/org.handhelds.familiar/packages/linux/handhelds-pxa-2.6_2.6.15-hh2.bb +++ b/org.handhelds.familiar/packages/linux/handhelds-pxa-2.6_2.6.15-hh2.bb @@ -2,7 +2,7 @@ SECTION = "kernel" DESCRIPTION = "handhelds.org Linux kernel for PXA based devices." MAINTAINER = "Greg Gilbert <greg@treke.net>" LICENSE = "GPL" -PR = "r1" +PR = "r2" COMPATIBLE_HOST = "arm.*-linux" diff --git a/org.handhelds.familiar/packages/linux/handhelds-pxa_2.4.19-rmk6-pxa1-hh41.1.bb b/org.handhelds.familiar/packages/linux/handhelds-pxa_2.4.19-rmk6-pxa1-hh41.1.bb index f278af0..914089a 100644 --- a/org.handhelds.familiar/packages/linux/handhelds-pxa_2.4.19-rmk6-pxa1-hh41.1.bb +++ b/org.handhelds.familiar/packages/linux/handhelds-pxa_2.4.19-rmk6-pxa1-hh41.1.bb @@ -2,12 +2,14 @@ SECTION = "kernel" DESCRIPTION = "handhelds.org Linux kernel for PXA25x based devices." MAINTAINER = "Phil Blundell <pb@handhelds.org>" LICENSE = "GPL" -PR = "r2" +PR = "r3" KERNEL_CCSUFFIX = "-3.3.4" COMPATIBLE_HOST = "arm.*-linux" +PARALLEL_INSTALL_REPLACE_VERSIONS = "2.4.19-rmk6-pxa1-hh37" + SRC_URI = "${HANDHELDS_CVS};module=linux/kernel;tag=${@'K' + bb.data.getVar('PV',d,1).replace('.', '-')} \ file://defconfig-${PACKAGE_ARCH} \ file://ipaq-hal.init \ diff --git a/org.handhelds.familiar/packages/linux/handhelds-sa_2.4.19-rmk6-pxa1-hh37.4.bb b/org.handhelds.familiar/packages/linux/handhelds-sa_2.4.19-rmk6-pxa1-hh37.4.bb index df160cd..c47c472 100644 --- a/org.handhelds.familiar/packages/linux/handhelds-sa_2.4.19-rmk6-pxa1-hh37.4.bb +++ b/org.handhelds.familiar/packages/linux/handhelds-sa_2.4.19-rmk6-pxa1-hh37.4.bb @@ -2,11 +2,13 @@ SECTION = "kernel" DESCRIPTION = "handhelds.org Linux kernel for StrongArm processor based devices." MAINTAINER = "Rene Wagner <rw@handhelds.org>" LICENSE = "GPL" -PR = "r6" +PR = "r7" KERNEL_CCSUFFIX = "-3.3.4" COMPATIBLE_HOST = "arm.*-linux" +PARALLEL_INSTALL_REPLACE_VERSIONS = "2.4.19-rmk6-pxa1-hh37" + FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/handhelds-sa-${PV}" SRC_URI = "${HANDHELDS_CVS};module=linux/kernel;tag=${@'K' + bb.data.getVar('PV',d,1).replace('.', '-')} \ file://defconfig-${PACKAGE_ARCH} \ diff --git a/org.handhelds.familiar/packages/linux/linux-h6300-omap1_2.6.16.16.bb b/org.handhelds.familiar/packages/linux/linux-h6300-omap1_2.6.16.16.bb index e270cd8..1de325f 100644 --- a/org.handhelds.familiar/packages/linux/linux-h6300-omap1_2.6.16.16.bb +++ b/org.handhelds.familiar/packages/linux/linux-h6300-omap1_2.6.16.16.bb @@ -2,6 +2,7 @@ DESCRIPTION = "Linux kernel for HP iPAQ h6300 series OMAP1510 based phones." MAINTAINER = "Mika Laitio <lamikr@cc.jyu.fi>" SECTION = "kernel" LICENSE = "GPL" +PR = "r1" SRC_URI = "http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.16.tar.bz2 \ http://www.muru.com/linux/omap/patches/patch-2.6.16-omap2.bz2;patch=1 \ diff --git a/org.handhelds.familiar/packages/linux/opensimpad_2.4.27-vrs1-pxa1-jpm1.bb b/org.handhelds.familiar/packages/linux/opensimpad_2.4.27-vrs1-pxa1-jpm1.bb index fff45f2..58cec8a 100644 --- a/org.handhelds.familiar/packages/linux/opensimpad_2.4.27-vrs1-pxa1-jpm1.bb +++ b/org.handhelds.familiar/packages/linux/opensimpad_2.4.27-vrs1-pxa1-jpm1.bb @@ -7,7 +7,9 @@ VRSV = "${@bb.data.getVar('PV',d,True).split('-')[1]}" PXAV = "${@bb.data.getVar('PV',d,True).split('-')[2]}" JPMV = "${@bb.data.getVar('PV',d,True).split('-')[3]}" USBV= "usb20040610" -PR = "r4" +PR = "r5" + +PARALLEL_INSTALL_REPLACE_VERSIONS = "2.4.25-vrs2-pxa1-jpm1" FILESPATH = "${FILE_DIRNAME}/opensimpad-${PV}:${FILE_DIRNAME}/opensimpad:${FILE_DIRNAME}/files:${FILE_DIRNAME}" |