summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/package_deb.bbclass8
-rw-r--r--meta/classes/package_ipk.bbclass8
2 files changed, 12 insertions, 4 deletions
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index 907fbd9ebf..655c700c3f 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -141,13 +141,17 @@ python do_package_deb () {
141 raise bb.build.FuncFailed("unable to open control file for writing.") 141 raise bb.build.FuncFailed("unable to open control file for writing.")
142 142
143 fields = [] 143 fields = []
144 fields.append(["Version: %s-%s\n", ['PV', 'PR']]) 144 pe = bb.data.getVar('PE', d, 1)
145 if pe and int(pe) > 0:
146 fields.append(["Version: %s:%s-%s\n", ['PE', 'PV', 'PR']])
147 else:
148 fields.append(["Version: %s-%s\n", ['PV', 'PR']])
145 fields.append(["Description: %s\n", ['DESCRIPTION']]) 149 fields.append(["Description: %s\n", ['DESCRIPTION']])
146 fields.append(["Section: %s\n", ['SECTION']]) 150 fields.append(["Section: %s\n", ['SECTION']])
147 fields.append(["Priority: %s\n", ['PRIORITY']]) 151 fields.append(["Priority: %s\n", ['PRIORITY']])
148 fields.append(["Maintainer: %s\n", ['MAINTAINER']]) 152 fields.append(["Maintainer: %s\n", ['MAINTAINER']])
149 fields.append(["Architecture: %s\n", ['TARGET_ARCH']]) 153 fields.append(["Architecture: %s\n", ['TARGET_ARCH']])
150 fields.append(["OE: %s\n", ['P']]) 154 fields.append(["OE: %s\n", ['PN']])
151 fields.append(["Homepage: %s\n", ['HOMEPAGE']]) 155 fields.append(["Homepage: %s\n", ['HOMEPAGE']])
152 156
153# Package, Version, Maintainer, Description - mandatory 157# Package, Version, Maintainer, Description - mandatory
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
index 334148219b..0cdd941f41 100644
--- a/meta/classes/package_ipk.bbclass
+++ b/meta/classes/package_ipk.bbclass
@@ -141,13 +141,17 @@ python do_package_ipk () {
141 raise bb.build.FuncFailed("unable to open control file for writing.") 141 raise bb.build.FuncFailed("unable to open control file for writing.")
142 142
143 fields = [] 143 fields = []
144 fields.append(["Version: %s-%s\n", ['PV', 'PR']]) 144 pe = bb.data.getVar('PE', d, 1)
145 if pe and int(pe) > 0:
146 fields.append(["Version: %s:%s-%s\n", ['PE', 'PV', 'PR']])
147 else:
148 fields.append(["Version: %s-%s\n", ['PV', 'PR']])
145 fields.append(["Description: %s\n", ['DESCRIPTION']]) 149 fields.append(["Description: %s\n", ['DESCRIPTION']])
146 fields.append(["Section: %s\n", ['SECTION']]) 150 fields.append(["Section: %s\n", ['SECTION']])
147 fields.append(["Priority: %s\n", ['PRIORITY']]) 151 fields.append(["Priority: %s\n", ['PRIORITY']])
148 fields.append(["Maintainer: %s\n", ['MAINTAINER']]) 152 fields.append(["Maintainer: %s\n", ['MAINTAINER']])
149 fields.append(["Architecture: %s\n", ['PACKAGE_ARCH']]) 153 fields.append(["Architecture: %s\n", ['PACKAGE_ARCH']])
150 fields.append(["OE: %s\n", ['P']]) 154 fields.append(["OE: %s\n", ['PN']])
151 fields.append(["Homepage: %s\n", ['HOMEPAGE']]) 155 fields.append(["Homepage: %s\n", ['HOMEPAGE']])
152 156
153 def pullData(l, d): 157 def pullData(l, d):