summaryrefslogtreecommitdiffstats
path: root/meta/classes/distrodata.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/distrodata.bbclass')
-rw-r--r--meta/classes/distrodata.bbclass26
1 files changed, 8 insertions, 18 deletions
diff --git a/meta/classes/distrodata.bbclass b/meta/classes/distrodata.bbclass
index c85f7b3474..b0f4ecea09 100644
--- a/meta/classes/distrodata.bbclass
+++ b/meta/classes/distrodata.bbclass
@@ -272,24 +272,15 @@ python do_checkpkg() {
272 if upstream_check_unreliable == "1": 272 if upstream_check_unreliable == "1":
273 return "N/A", "CHECK_IS_UNRELIABLE" 273 return "N/A", "CHECK_IS_UNRELIABLE"
274 274
275 try: 275 uv = oe.recipeutils.get_recipe_upstream_version(localdata)
276 uv = oe.recipeutils.get_recipe_upstream_version(localdata) 276 pupver = uv['version'] if uv['version'] else "N/A"
277 pupver = uv['version'] if uv['version'] else "N/A" 277 pversion = uv['current_version']
278 except Exception as e: 278 revision = uv['revision'] if uv['revision'] else "N/A"
279 pupver = "N/A"
280 279
281 if pupver == "N/A": 280 if pupver == "N/A":
282 pstatus = "UNKNOWN" if upstream_version_unknown else "UNKNOWN_BROKEN" 281 pstatus = "UNKNOWN" if upstream_version_unknown else "UNKNOWN_BROKEN"
283 else: 282 else:
284 src_uri = (localdata.getVar('SRC_URI') or '').split() 283 cmp = vercmp_string(pversion, pupver)
285 if src_uri:
286 uri_type, _, _, _, _, _ = decodeurl(src_uri[0])
287 else:
288 uri_type = "none"
289 pv, _, _ = oe.recipeutils.get_recipe_pv_without_srcpv(pversion, uri_type)
290 upv, _, _ = oe.recipeutils.get_recipe_pv_without_srcpv(pupver, uri_type)
291
292 cmp = vercmp_string(pv, upv)
293 if cmp == -1: 284 if cmp == -1:
294 pstatus = "UPDATE" if not upstream_version_unknown else "KNOWN_BROKEN" 285 pstatus = "UPDATE" if not upstream_version_unknown else "KNOWN_BROKEN"
295 elif cmp == 0: 286 elif cmp == 0:
@@ -297,7 +288,7 @@ python do_checkpkg() {
297 else: 288 else:
298 pstatus = "UNKNOWN" if upstream_version_unknown else "UNKNOWN_BROKEN" 289 pstatus = "UNKNOWN" if upstream_version_unknown else "UNKNOWN_BROKEN"
299 290
300 return pupver, pstatus 291 return pversion, pupver, pstatus, revision
301 292
302 293
303 """initialize log files.""" 294 """initialize log files."""
@@ -334,7 +325,6 @@ python do_checkpkg() {
334 325
335 pdesc = localdata.getVar('DESCRIPTION') 326 pdesc = localdata.getVar('DESCRIPTION')
336 pgrp = localdata.getVar('SECTION') 327 pgrp = localdata.getVar('SECTION')
337 pversion = localdata.getVar('PV')
338 plicense = localdata.getVar('LICENSE') 328 plicense = localdata.getVar('LICENSE')
339 psection = localdata.getVar('SECTION') 329 psection = localdata.getVar('SECTION')
340 phome = localdata.getVar('HOMEPAGE') 330 phome = localdata.getVar('HOMEPAGE')
@@ -345,7 +335,7 @@ python do_checkpkg() {
345 psrcuri = localdata.getVar('SRC_URI') 335 psrcuri = localdata.getVar('SRC_URI')
346 maintainer = localdata.getVar('RECIPE_MAINTAINER') 336 maintainer = localdata.getVar('RECIPE_MAINTAINER')
347 337
348 pupver, pstatus = get_upstream_version_and_status() 338 pversion, pupver, pstatus, prevision = get_upstream_version_and_status()
349 339
350 if psrcuri: 340 if psrcuri:
351 psrcuri = psrcuri.split()[0] 341 psrcuri = psrcuri.split()[0]
@@ -358,7 +348,7 @@ python do_checkpkg() {
358 with open(logfile, "a") as f: 348 with open(logfile, "a") as f:
359 writer = csv.writer(f, delimiter='\t') 349 writer = csv.writer(f, delimiter='\t')
360 writer.writerow([pname, pversion, pupver, plicense, psection, phome, 350 writer.writerow([pname, pversion, pupver, plicense, psection, phome,
361 prelease, pdepends, pbugtracker, ppe, pdesc, pstatus, pupver, 351 prelease, pdepends, pbugtracker, ppe, pdesc, pstatus, prevision,
362 psrcuri, maintainer, no_upgr_reason]) 352 psrcuri, maintainer, no_upgr_reason])
363 f.close() 353 f.close()
364 bb.utils.unlockfile(lf) 354 bb.utils.unlockfile(lf)