]> pilppa.com Git - familiar-h63xx-build.git/commitdiff
kernel packages: fix upgrade path
authorRene Wagner <rw@handhelds.org>
Mon, 14 Aug 2006 16:33:52 +0000 (18:33 +0200)
committerRene Wagner <rw@handhelds.org>
Mon, 14 Aug 2006 16:33:52 +0000 (18:33 +0200)
Signed-off-by: Rene Wagner <rw@handhelds.org>
org.handhelds.familiar/classes/kernel.bbclass
org.handhelds.familiar/packages/linux/handhelds-pxa-2.6_2.6.15-hh2.bb
org.handhelds.familiar/packages/linux/handhelds-pxa_2.4.19-rmk6-pxa1-hh41.1.bb
org.handhelds.familiar/packages/linux/handhelds-sa_2.4.19-rmk6-pxa1-hh37.4.bb
org.handhelds.familiar/packages/linux/linux-h6300-omap1_2.6.16.16.bb
org.handhelds.familiar/packages/linux/opensimpad_2.4.27-vrs1-pxa1-jpm1.bb

index 009f185d0755561efbb38474f249d19da0d8f00c..b8dfc2fcf1367c12d2eb691338d2e597d56e170b 100644 (file)
@@ -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)
 }
index 77c99bed89187a85e0c0b861e9ad1532981e6a85..41e99edbb837702b4f5d28de67df25170e2af2ea 100644 (file)
@@ -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"
 
index f278af0185543a5058fb38a48b7a8a365e0f2307..914089a87b605b60493b7bae87edf5b3c31898c8 100644 (file)
@@ -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 \
index df160cd1ed09963263a4f6d2df9876a29d8267d2..c47c4726fc156c0a494723764bb6b2cb1589256f 100644 (file)
@@ -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} \
index e270cd87a2ba0e80d0de30f61331f0b9177b0563..1de325f533357c13c2d17c30fc098bccd88210ef 100644 (file)
@@ -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 \
index fff45f20e94967c8a018e9cf8df423a13656d2af..58cec8aec8cfbe19b9ba547653a63991157844b2 100644 (file)
@@ -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}"