summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaul Wold <Saul.Wold@intel.com>2010-08-16 14:22:09 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-17 23:12:33 +0100
commitd7bc9b8ecec524294cc9143fd0b349249b329891 (patch)
tree43bfd78584c40b8614e6434d01230cde230a7046
parent26350bbd22bb91d20a9c31ee37d5fd76d9de4f3c (diff)
downloadopenembedded-core-d7bc9b8ecec524294cc9143fd0b349249b329891.tar.gz
openembedded-core-d7bc9b8ecec524294cc9143fd0b349249b329891.tar.bz2
openembedded-core-d7bc9b8ecec524294cc9143fd0b349249b329891.tar.xz
openembedded-core-d7bc9b8ecec524294cc9143fd0b349249b329891.zip
DistroData: Cleanup Version numbers and add DistroData Parser
Signed-off-by: Saul Wold <Saul.Wold@intel.com>
-rw-r--r--meta/classes/distrodata.bbclass158
-rw-r--r--meta/conf/distro/include/private/distro_base_utils_1.inc6
-rw-r--r--meta/conf/distro/include/private/distro_fix.inc4
-rw-r--r--meta/conf/distro/include/private/distro_misc.inc12
-rw-r--r--meta/conf/distro/include/private/distro_x11_core.inc5
5 files changed, 171 insertions, 14 deletions
diff --git a/meta/classes/distrodata.bbclass b/meta/classes/distrodata.bbclass
new file mode 100644
index 000000000..86a614a01
--- /dev/null
+++ b/meta/classes/distrodata.bbclass
@@ -0,0 +1,158 @@
+
+require conf/distro/include/distro_tracking_fields.inc
+
+addtask distrodata_np
+do_distrodata_np[nostamp] = "1"
+python do_distrodata_np() {
+
+ localdata = bb.data.createCopy(d)
+ pn = bb.data.getVar("PN", d, True)
+ bb.note("Package Name: %s" % pn)
+
+ if pn.find("-native") != -1:
+ pnstripped = pn.split("-native")
+ bb.note("Native Split: %s" % pnstripped)
+ bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + bb.data.getVar('OVERRIDES', d, True), localdata)
+ bb.data.update_data(localdata)
+
+ if pn.find("-cross") != -1:
+ pnstripped = pn.split("-cross")
+ bb.note("cross Split: %s" % pnstripped)
+ bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + bb.data.getVar('OVERRIDES', d, True), localdata)
+ bb.data.update_data(localdata)
+
+ if pn.find("-initial") != -1:
+ pnstripped = pn.split("-initial")
+ bb.note("initial Split: %s" % pnstripped)
+ bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + bb.data.getVar('OVERRIDES', d, True), localdata)
+ bb.data.update_data(localdata)
+
+ """generate package information from .bb file"""
+ pname = bb.data.getVar('PN', localdata, True)
+ pcurver = bb.data.getVar('PV', localdata, True)
+ pdesc = bb.data.getVar('DESCRIPTION', localdata, True)
+ pgrp = bb.data.getVar('SECTION', localdata, True)
+ plicense = bb.data.getVar('LICENSE', localdata, True).replace(',','_')
+ if bb.data.getVar('LIC_FILES_CHKSUM', localdata, True):
+ pchksum="1"
+ else:
+ pchksum="0"
+
+ if bb.data.getVar('RECIPE_STATUS', localdata, True):
+ hasrstatus="1"
+ else:
+ hasrstatus="0"
+
+ rstatus = bb.data.getVar('RECIPE_STATUS', localdata, True)
+
+ pupver = bb.data.getVar('RECIPE_LATEST_VERSION', localdata, True)
+ if pcurver == pupver:
+ vermatch="1"
+ else:
+ vermatch="0"
+
+ noupdate_reason = bb.data.getVar('RECIPE_NO_UPDATE_REASON', localdata, True)
+ if noupdate_reason is None:
+ noupdate="0"
+ else:
+ noupdate="1"
+
+ ris = bb.data.getVar('RECIPE_INTEL_SECTION', localdata, True)
+ maintainer = bb.data.getVar('RECIPE_MAINTAINER', localdata, True)
+ rttr = bb.data.getVar('RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES', localdata, True)
+ rlrd = bb.data.getVar('RECIPE_LATEST_RELEASE_DATE', localdata, True)
+ dc = bb.data.getVar('DEPENDENCY_CHECK', localdata, True)
+ rc = bb.data.getVar('RECIPE_COMMENTS', localdata, True)
+
+ bb.note("DISTRO: %s,%s,%s,%s,%s,%s,%s,%s, %s, %s, %s\n" % \
+ (pname, maintainer, plicense, pchksum, hasrstatus, vermatch, pcurver, pupver, noupdate, noupdate_reason, rstatus))
+}
+
+addtask distrodata
+do_distrodata[nostamp] = "1"
+python do_distrodata() {
+ """initialize log files."""
+ logpath = bb.data.getVar('LOG_DIR', d, 1)
+ bb.utils.mkdirhier(logpath)
+ logfile = os.path.join(logpath, "distrodata.%s.csv" % bb.data.getVar('DATETIME', d, 1))
+ if not os.path.exists(logfile):
+ slogfile = os.path.join(logpath, "distrodata.csv")
+ if os.path.exists(slogfile):
+ os.remove(slogfile)
+ os.system("touch %s" % logfile)
+ os.symlink(logfile, slogfile)
+
+ localdata = bb.data.createCopy(d)
+ pn = bb.data.getVar("PN", d, True)
+ bb.note("Package Name: %s" % pn)
+
+ if pn.find("-native") != -1:
+ pnstripped = pn.split("-native")
+ bb.note("Native Split: %s" % pnstripped)
+ bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + bb.data.getVar('OVERRIDES', d, True), localdata)
+ bb.data.update_data(localdata)
+
+ if pn.find("-cross") != -1:
+ pnstripped = pn.split("-cross")
+ bb.note("cross Split: %s" % pnstripped)
+ bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + bb.data.getVar('OVERRIDES', d, True), localdata)
+ bb.data.update_data(localdata)
+
+ if pn.find("-initial") != -1:
+ pnstripped = pn.split("-initial")
+ bb.note("initial Split: %s" % pnstripped)
+ bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + bb.data.getVar('OVERRIDES', d, True), localdata)
+ bb.data.update_data(localdata)
+
+ """generate package information from .bb file"""
+ pname = bb.data.getVar('PN', localdata, True)
+ pcurver = bb.data.getVar('PV', localdata, True)
+ pdesc = bb.data.getVar('DESCRIPTION', localdata, True)
+ pgrp = bb.data.getVar('SECTION', localdata, True)
+ plicense = bb.data.getVar('LICENSE', localdata, True).replace(',','_')
+ if bb.data.getVar('LIC_FILES_CHKSUM', localdata, True):
+ pchksum="1"
+ else:
+ pchksum="0"
+
+ if bb.data.getVar('RECIPE_STATUS', localdata, True):
+ hasrstatus="1"
+ else:
+ hasrstatus="0"
+
+ rstatus = bb.data.getVar('RECIPE_STATUS', localdata, True)
+
+ pupver = bb.data.getVar('RECIPE_LATEST_VERSION', localdata, True)
+ if pcurver == pupver:
+ vermatch="1"
+ else:
+ vermatch="0"
+
+ noupdate_reason = bb.data.getVar('RECIPE_NO_UPDATE_REASON', localdata, True)
+ if noupdate_reason is None:
+ noupdate="0"
+ else:
+ noupdate="1"
+
+ ris = bb.data.getVar('RECIPE_INTEL_SECTION', localdata, True)
+ maintainer = bb.data.getVar('RECIPE_MAINTAINER', localdata, True)
+ rttr = bb.data.getVar('RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES', localdata, True)
+ rlrd = bb.data.getVar('RECIPE_LATEST_RELEASE_DATE', localdata, True)
+ dc = bb.data.getVar('DEPENDENCY_CHECK', localdata, True)
+ rc = bb.data.getVar('RECIPE_COMMENTS', localdata, True)
+
+ lf = bb.utils.lockfile(logfile + ".lock")
+ f = open(logfile, "a")
+ f.write("%s,%s,%s,%s,%s,%s,%s,%s, %s, %s, %s\n" % \
+ (pname, maintainer, plicense, pchksum, hasrstatus, vermatch, pcurver, pupver, noupdate, noupdate_reason, rstatus))
+ f.close()
+ bb.utils.unlockfile(lf)
+}
+
+addtask distrodataall after do_distrodata
+do_distrodataall[recrdeptask] = "do_distrodata"
+do_distrodataall[nostamp] = "1"
+do_distrodataall() {
+ :
+}
+
diff --git a/meta/conf/distro/include/private/distro_base_utils_1.inc b/meta/conf/distro/include/private/distro_base_utils_1.inc
index e3a24188a..d9facb9ba 100644
--- a/meta/conf/distro/include/private/distro_base_utils_1.inc
+++ b/meta/conf/distro/include/private/distro_base_utils_1.inc
@@ -1,6 +1,6 @@
RECIPE_STATUS_pn-dbus-wait = "green"
DEPENDENCY_CHECK_pn-dbus-wait = "not done"
-RECIPE_LATEST_VERSION_pn-dbus-wait = "0.0+svnr426"
+RECIPE_LATEST_VERSION_pn-dbus-wait = "402"
RECIPE_INTEL_SECTION_pn-dbus-wait = "base utils"
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-dbus-wait = "n/a"
RECIPE_LATEST_RELEASE_DATE_pn-dbus-wait = "08/2008"
@@ -21,7 +21,7 @@ RECIPE_MAINTAINER_pn-e2fsprogs = "Kevin Tian <kevin.tian@intel.com>"
RECIPE_STATUS_pn-initramfs-boot = "green"
DEPENDENCY_CHECK_pn-initramfs-boot = "not done"
-RECIPE_LATEST_VERSION_pn-initramfs-boot = "1.0" # dummy for local files
+RECIPE_LATEST_VERSION_pn-initramfs-boot = "1.0"
RECIPE_PATCH_pn-initramfs-boot+init-boot = "local"
RECIPE_INTEL_SECTION_pn-initramfs-boot = "base utils"
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-initramfs-boot = "n/a"
@@ -371,7 +371,7 @@ RECIPE_LATEST_VERSION_pn-net-tools = "1.60-23"
RECIPE_STATUS_pn-shadow = "green"
DEPENDENCY_CHECK_pn-shadow = "not done"
RECIPE_MAINTAINER_pn-shadow = "Kevin Tian <kevin.tian@intel.com>"
-RECIPE_LATEST_VERSION_pn-shadow = "4.1.4.2"
+RECIPE_LATEST_VERSION_pn-shadow = "4.1.4.2-1"
RECIPE_INTEL_SECTION_pn-shadow = "base utils"
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-shadow = "2 months"
RECIPE_LATEST_RELEASE_DATE_pn-shadow = "07/2009"
diff --git a/meta/conf/distro/include/private/distro_fix.inc b/meta/conf/distro/include/private/distro_fix.inc
index 6d6c0c44f..5c0256741 100644
--- a/meta/conf/distro/include/private/distro_fix.inc
+++ b/meta/conf/distro/include/private/distro_fix.inc
@@ -71,7 +71,7 @@ RECIPE_STATUS_pn-libomxil ?= "red" # not audited
RECIPE_LATEST_VERSION_pn-libomxil ?= "0.9.2.1"
RECIPE_STATUS_pn-libpcre ?= "red" # not audited
-RECIPE_LATEST_VERSION_pn-libpcre ?= "8.1"
+RECIPE_LATEST_VERSION_pn-libpcre ?= "8.10"
RECIPE_STATUS_pn-powertop ?= "red" # not audited
RECIPE_LATEST_VERSION_pn-powertop ?= "1.11"
@@ -170,7 +170,7 @@ RECIPE_STATUS_pn-pm-utils ?= "red" # not audited
RECIPE_LATEST_VERSION_pn-pm-utils ?= "1.3.0"
RECIPE_STATUS_pn-devicekit-power ?= "red" # not audited
-RECIPE_LATEST_VERSION_pn-devicekit-power ?= "14"
+RECIPE_LATEST_VERSION_pn-devicekit-power ?= "014"
RECIPE_STATUS_pn-libsamplerate0 ?= "red" # not audited
RECIPE_LATEST_VERSION_pn-libsamplerate0 ?= "0.1.7"
diff --git a/meta/conf/distro/include/private/distro_misc.inc b/meta/conf/distro/include/private/distro_misc.inc
index 43a9a8c8a..dd1e09fea 100644
--- a/meta/conf/distro/include/private/distro_misc.inc
+++ b/meta/conf/distro/include/private/distro_misc.inc
@@ -6,28 +6,28 @@ RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-libical="8 months"
RECIPE_MAINTAINER_pn-libical = "Dongxiao Xu <dongxiao.xu@intel.com>"
RECIPE_STATUS_pn-task-base="green"
-RECIPE_LATEST_VERSION_pn-task-base="1"
+RECIPE_LATEST_VERSION_pn-task-base="1.0"
RECIPE_NO_OF_PATCHES_pn-task-base="0"
RECIPE_LATEST_RELEASE_DATE_pn-task-base="n/a"
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-task-base="n/a"
RECIPE_MAINTAINER_pn-task-base = "Dongxiao Xu <dongxiao.xu@intel.com>"
RECIPE_STATUS_pn-task-poky-boot="green"
-RECIPE_LATEST_VERSION_pn-task-poky-boot="1"
+RECIPE_LATEST_VERSION_pn-task-poky-boot="1.0"
RECIPE_NO_OF_PATCHES_pn-task-poky-boot="0"
RECIPE_LATEST_RELEASE_DATE_pn-task-poky-boot="n/a"
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-task-poky-boot="n/a"
RECIPE_MAINTAINER_pn-task-poky-boot = "Dongxiao Xu <dongxiao.xu@intel.com>"
RECIPE_STATUS_pn-task-poky-nfs="green"
-RECIPE_LATEST_VERSION_pn-task-poky-nfs="1"
+RECIPE_LATEST_VERSION_pn-task-poky-nfs="1.0"
RECIPE_NO_OF_PATCHES_pn-task-poky-nfs="0"
RECIPE_LATEST_RELEASE_DATE_pn-task-poky-nfs="n/a"
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-task-poky-nfs="n/a"
RECIPE_MAINTAINER_pn-task-poky-nfs = "Dongxiao Xu <dongxiao.xu@intel.com>"
RECIPE_STATUS_pn-task-poky-tools="green"
-RECIPE_LATEST_VERSION_pn-task-poky-tools="1"
+RECIPE_LATEST_VERSION_pn-task-poky-tools="1.0"
RECIPE_NO_OF_PATCHES_pn-task-poky-tools="0"
RECIPE_LATEST_RELEASE_DATE_pn-task-poky-tools="n/a"
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-task-poky-tools="n/a"
@@ -41,14 +41,14 @@ RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-gst-meta-base="n/a"
RECIPE_MAINTAINER_pn-gst-meta-base = "Dongxiao Xu <dongxiao.xu@intel.com>"
RECIPE_STATUS_pn-task-poky-apps-x11-pimlico="green"
-RECIPE_LATEST_VERSION_pn-task-poky-apps-x11-pimlico="1"
+RECIPE_LATEST_VERSION_pn-task-poky-apps-x11-pimlico="1.0"
RECIPE_NO_OF_PATCHES_pn-task-poky-apps-x11-pimlico="0"
RECIPE_LATEST_RELEASE_DATE_pn-task-poky-apps-x11-pimlico="n/a"
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-task-poky-apps-x11-pimlico="n/a"
RECIPE_MAINTAINER_pn-task-poky-apps-x11-pimlico = "Dongxiao Xu <dongxiao.xu@intel.com>"
RECIPE_STATUS_pn-task-poky-x11-sato="green"
-RECIPE_LATEST_VERSION_pn-task-poky-x11-sato="1"
+RECIPE_LATEST_VERSION_pn-task-poky-x11-sato="1.0"
RECIPE_NO_OF_PATCHES_pn-task-poky-x11-sato="0"
RECIPE_LATEST_RELEASE_DATE_pn-task-poky-x11-sato="n/a"
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-task-poky-x11-sato="n/a"
diff --git a/meta/conf/distro/include/private/distro_x11_core.inc b/meta/conf/distro/include/private/distro_x11_core.inc
index e01f0065a..60efbad26 100644
--- a/meta/conf/distro/include/private/distro_x11_core.inc
+++ b/meta/conf/distro/include/private/distro_x11_core.inc
@@ -99,16 +99,15 @@ RECIPE_INTEL_SECTION_pn-xf86-video-vmware="graphic core"
RECIPE_MAINTAINER_pn-xf86-video-vmware="Yu Ke <ke.yu@intel.com>"
RECIPE_STATUS_pn-cairo="green" # no update needed
-RECIPE_LATEST_VERSION_pn-cairo="1.9.10"
+RECIPE_LATEST_VERSION_pn-cairo="1.9.10" # OK
RECIPE_NO_OF_PATCHES_pn-cairo="1"
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-cairo="1 monthes"
RECIPE_LATEST_RELEASE_DATE_pn-cairo="2010/02/20"
RECIPE_INTEL_SECTION_pn-cairo="graphic core"
RECIPE_MAINTAINER_pn-cairo="Yu Ke <ke.yu@intel.com>"
-RECIPE_NO_UPDATE_REASON-cairo="1.9.10 is not stable version"
RECIPE_STATUS_pn-xserver-nodm-init="green" # no update needed
-RECIPE_LATEST_VERSION_pn-xserver-nodm-init="1"
+RECIPE_LATEST_VERSION_pn-xserver-nodm-init="1.0"
RECIPE_NO_OF_PATCHES_pn-xserver-nodm-init="0"
#RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-xserver-nodm-init=""
#RECIPE_LATEST_RELEASE_DATE_pn-xserver-nodm-init=""