]> code.ossystems Code Review - openembedded-core.git/commitdiff
classes/package_xxx.class: Use PKGE/PKGV/PKGR.
authorLianhao Lu <lianhao.lu@intel.com>
Thu, 19 May 2011 02:17:43 +0000 (10:17 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 27 May 2011 16:07:57 +0000 (17:07 +0100)
Use PKGE/PKGV/PKGR to build various package feed in tasks of pacakge_write_xxx.

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
meta/classes/package_deb.bbclass
meta/classes/package_ipk.bbclass
meta/classes/package_rpm.bbclass
meta/classes/package_tar.bbclass

index 000d9ee8dc85d2b176cec2ec2c2cbdd3481fd4c8..fb502cbc99261658ad90004fb8970b50a3d725c1 100644 (file)
@@ -272,7 +272,7 @@ python do_package_deb () {
         except ValueError:
             pass
         if not g and bb.data.getVar('ALLOW_EMPTY', localdata) != "1":
-            bb.note("Not creating empty archive for %s-%s-%s" % (pkg, bb.data.getVar('PV', localdata, True), bb.data.getVar('PR', localdata, True)))
+            bb.note("Not creating empty archive for %s-%s-%s" % (pkg, bb.data.getVar('PKGV', localdata, True), bb.data.getVar('PKGR', localdata, True)))
             bb.utils.unlockfile(lf)
             continue
 
@@ -288,11 +288,11 @@ python do_package_deb () {
             raise bb.build.FuncFailed("unable to open control file for writing.")
 
         fields = []
-        pe = bb.data.getVar('PE', d, True)
+        pe = bb.data.getVar('PKGE', d, True)
         if pe and int(pe) > 0:
-            fields.append(["Version: %s:%s-%s\n", ['PE', 'PV', 'PR']])
+            fields.append(["Version: %s:%s-%s\n", ['PKGE', 'PKGV', 'PKGR']])
         else:
-            fields.append(["Version: %s-%s\n", ['PV', 'PR']])
+            fields.append(["Version: %s-%s\n", ['PKGV', 'PKGR']])
         fields.append(["Description: %s\n", ['DESCRIPTION']])
         fields.append(["Section: %s\n", ['SECTION']])
         fields.append(["Priority: %s\n", ['PRIORITY']])
index a3dfc733421bcd34c884be4016797e4d36b46c8d..43170280c9b8e3d27545269f0b44f79ab6be1104 100644 (file)
@@ -241,7 +241,7 @@ python do_package_ipk () {
                except ValueError:
                        pass
                if not g and bb.data.getVar('ALLOW_EMPTY', localdata) != "1":
-                       bb.note("Not creating empty archive for %s-%s-%s" % (pkg, bb.data.getVar('PV', localdata, 1), bb.data.getVar('PR', localdata, 1)))
+                       bb.note("Not creating empty archive for %s-%s-%s" % (pkg, bb.data.getVar('PKGV', localdata, 1), bb.data.getVar('PKGR', localdata, 1)))
                        bb.utils.unlockfile(lf)
                        continue
 
@@ -254,11 +254,11 @@ python do_package_ipk () {
                        raise bb.build.FuncFailed("unable to open control file for writing.")
 
                fields = []
-               pe = bb.data.getVar('PE', d, 1)
+               pe = bb.data.getVar('PKGE', d, 1)
                if pe and int(pe) > 0:
-                       fields.append(["Version: %s:%s-%s\n", ['PE', 'PV', 'PR']])
+                       fields.append(["Version: %s:%s-%s\n", ['PKGE', 'PKGV', 'PKGR']])
                else:
-                       fields.append(["Version: %s-%s\n", ['PV', 'PR']])
+                       fields.append(["Version: %s-%s\n", ['PKGV', 'PKGR']])
                fields.append(["Description: %s\n", ['DESCRIPTION']])
                fields.append(["Section: %s\n", ['SECTION']])
                fields.append(["Priority: %s\n", ['PRIORITY']])
index 1d8c68633067ab8a7f2f59498a65a450297c5e7f..3df66cc16a08ad8360a5302c799ce6c8551eb290 100644 (file)
@@ -330,7 +330,7 @@ python write_specfile () {
                                if dep and ver:
                                        if '-' in ver:
                                                subd = oe.packagedata.read_subpkgdata_dict(dep, d)
-                                               pv = subd['PV']
+                                               pv = subd['PKGV']
                                                reppv = pv.replace('-', '+')
                                                ver = ver.replace(pv, reppv)
                                newdeps_dict[dep] = ver
@@ -383,9 +383,9 @@ python write_specfile () {
        # Construct the SPEC file...
        srcname    = bb.data.getVar('PN', d, True)
        srcsummary = (bb.data.getVar('SUMMARY', d, True) or bb.data.getVar('DESCRIPTION', d, True) or ".")
-       srcversion = bb.data.getVar('PV', d, True).replace('-', '+')
-       srcrelease = bb.data.getVar('PR', d, True)
-       srcepoch   = (bb.data.getVar('PE', d, True) or "")
+       srcversion = bb.data.getVar('PKGV', d, True).replace('-', '+')
+       srcrelease = bb.data.getVar('PKGR', d, True)
+       srcepoch   = (bb.data.getVar('PKGE', d, True) or "")
        srclicense = bb.data.getVar('LICENSE', d, True)
        srcsection = bb.data.getVar('SECTION', d, True)
        srcmaintainer  = bb.data.getVar('MAINTAINER', d, True)
@@ -438,9 +438,9 @@ python write_specfile () {
                splitname    = pkgname
 
                splitsummary = (bb.data.getVar('SUMMARY', localdata, True) or bb.data.getVar('DESCRIPTION', localdata, True) or ".")
-               splitversion = (bb.data.getVar('PV', localdata, True) or "").replace('-', '+')
-               splitrelease = (bb.data.getVar('PR', localdata, True) or "")
-               splitepoch   = (bb.data.getVar('PE', localdata, True) or "")
+               splitversion = (bb.data.getVar('PKGV', localdata, True) or "").replace('-', '+')
+               splitrelease = (bb.data.getVar('PKGR', localdata, True) or "")
+               splitepoch   = (bb.data.getVar('PKGE', localdata, True) or "")
                splitlicense = (bb.data.getVar('LICENSE', localdata, True) or "")
                splitsection = (bb.data.getVar('SECTION', localdata, True) or "")
                splitdescription = (bb.data.getVar('DESCRIPTION', localdata, True) or ".")
index e546eb7fd828556467c3b0a5837ea62137c64396..a806e4514bec154dfb3a5336c8bcab07c84d6633 100644 (file)
@@ -3,7 +3,7 @@ inherit package
 IMAGE_PKGTYPE ?= "tar"
 
 python package_tar_fn () {
-       fn = os.path.join(bb.data.getVar('DEPLOY_DIR_TAR', d), "%s-%s-%s.tar.gz" % (bb.data.getVar('PKG', d), bb.data.getVar('PV', d), bb.data.getVar('PR', d)))
+       fn = os.path.join(bb.data.getVar('DEPLOY_DIR_TAR', d), "%s-%s-%s.tar.gz" % (bb.data.getVar('PKG', d), bb.data.getVar('PKGV', d), bb.data.getVar('PKGR', d)))
        fn = bb.data.expand(fn, d)
        bb.data.setVar('PKGFN', fn, d)
 }
@@ -83,7 +83,7 @@ python do_package_tar () {
                os.chdir(root)
                from glob import glob
                if not glob('*'):
-                       bb.note("Not creating empty archive for %s-%s-%s" % (pkg, bb.data.getVar('PV', localdata, 1), bb.data.getVar('PR', localdata, 1)))
+                       bb.note("Not creating empty archive for %s-%s-%s" % (pkg, bb.data.getVar('PKGV', localdata, 1), bb.data.getVar('PKGR', localdata, 1)))
                        continue
                ret = os.system("tar -czf %s %s" % (tarfn, '.'))
                if ret != 0: