mirror of
https://git.yoctoproject.org/poky
synced 2026-04-27 21:32:13 +02:00
meta: remove True option to getVar calls
getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) (From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
d5e67725ac
commit
c4e2c59088
@@ -25,75 +25,75 @@ addtask distrodata_np
|
||||
do_distrodata_np[nostamp] = "1"
|
||||
python do_distrodata_np() {
|
||||
localdata = bb.data.createCopy(d)
|
||||
pn = d.getVar("PN", True)
|
||||
pn = d.getVar("PN")
|
||||
bb.note("Package Name: %s" % pn)
|
||||
|
||||
import oe.distro_check as dist_check
|
||||
tmpdir = d.getVar('TMPDIR', True)
|
||||
tmpdir = d.getVar('TMPDIR')
|
||||
distro_check_dir = os.path.join(tmpdir, "distro_check")
|
||||
datetime = localdata.getVar('DATETIME', True)
|
||||
datetime = localdata.getVar('DATETIME')
|
||||
dist_check.update_distro_data(distro_check_dir, datetime, localdata)
|
||||
|
||||
if pn.find("-native") != -1:
|
||||
pnstripped = pn.split("-native")
|
||||
bb.note("Native Split: %s" % pnstripped)
|
||||
localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
|
||||
localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES'))
|
||||
bb.data.update_data(localdata)
|
||||
|
||||
if pn.find("-cross") != -1:
|
||||
pnstripped = pn.split("-cross")
|
||||
bb.note("cross Split: %s" % pnstripped)
|
||||
localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
|
||||
localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES'))
|
||||
bb.data.update_data(localdata)
|
||||
|
||||
if pn.find("-crosssdk") != -1:
|
||||
pnstripped = pn.split("-crosssdk")
|
||||
bb.note("cross Split: %s" % pnstripped)
|
||||
localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
|
||||
localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES'))
|
||||
bb.data.update_data(localdata)
|
||||
|
||||
if pn.startswith("nativesdk-"):
|
||||
pnstripped = pn.replace("nativesdk-", "")
|
||||
bb.note("NativeSDK Split: %s" % pnstripped)
|
||||
localdata.setVar('OVERRIDES', "pn-" + pnstripped + ":" + d.getVar('OVERRIDES', True))
|
||||
localdata.setVar('OVERRIDES', "pn-" + pnstripped + ":" + d.getVar('OVERRIDES'))
|
||||
bb.data.update_data(localdata)
|
||||
|
||||
|
||||
if pn.find("-initial") != -1:
|
||||
pnstripped = pn.split("-initial")
|
||||
bb.note("initial Split: %s" % pnstripped)
|
||||
localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
|
||||
localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES'))
|
||||
bb.data.update_data(localdata)
|
||||
|
||||
"""generate package information from .bb file"""
|
||||
pname = localdata.getVar('PN', True)
|
||||
pcurver = localdata.getVar('PV', True)
|
||||
pdesc = localdata.getVar('DESCRIPTION', True)
|
||||
pname = localdata.getVar('PN')
|
||||
pcurver = localdata.getVar('PV')
|
||||
pdesc = localdata.getVar('DESCRIPTION')
|
||||
if pdesc is not None:
|
||||
pdesc = pdesc.replace(',','')
|
||||
pdesc = pdesc.replace('\n','')
|
||||
|
||||
pgrp = localdata.getVar('SECTION', True)
|
||||
plicense = localdata.getVar('LICENSE', True).replace(',','_')
|
||||
pgrp = localdata.getVar('SECTION')
|
||||
plicense = localdata.getVar('LICENSE').replace(',','_')
|
||||
|
||||
rstatus = localdata.getVar('RECIPE_COLOR', True)
|
||||
rstatus = localdata.getVar('RECIPE_COLOR')
|
||||
if rstatus is not None:
|
||||
rstatus = rstatus.replace(',','')
|
||||
|
||||
pupver = localdata.getVar('RECIPE_UPSTREAM_VERSION', True)
|
||||
pupver = localdata.getVar('RECIPE_UPSTREAM_VERSION')
|
||||
if pcurver == pupver:
|
||||
vermatch="1"
|
||||
else:
|
||||
vermatch="0"
|
||||
noupdate_reason = localdata.getVar('RECIPE_NO_UPDATE_REASON', True)
|
||||
noupdate_reason = localdata.getVar('RECIPE_NO_UPDATE_REASON')
|
||||
if noupdate_reason is None:
|
||||
noupdate="0"
|
||||
else:
|
||||
noupdate="1"
|
||||
noupdate_reason = noupdate_reason.replace(',','')
|
||||
|
||||
maintainer = localdata.getVar('RECIPE_MAINTAINER', True)
|
||||
rlrd = localdata.getVar('RECIPE_UPSTREAM_DATE', True)
|
||||
maintainer = localdata.getVar('RECIPE_MAINTAINER')
|
||||
rlrd = localdata.getVar('RECIPE_UPSTREAM_DATE')
|
||||
result = dist_check.compare_in_distro_packages_list(distro_check_dir, localdata)
|
||||
|
||||
bb.note("DISTRO: %s,%s,%s,%s,%s,%s,%s,%s,%s\n" % \
|
||||
@@ -109,80 +109,80 @@ addtask distrodata
|
||||
do_distrodata[nostamp] = "1"
|
||||
python do_distrodata() {
|
||||
import csv
|
||||
logpath = d.getVar('LOG_DIR', True)
|
||||
logpath = d.getVar('LOG_DIR')
|
||||
bb.utils.mkdirhier(logpath)
|
||||
logfile = os.path.join(logpath, "distrodata.csv")
|
||||
|
||||
import oe.distro_check as dist_check
|
||||
localdata = bb.data.createCopy(d)
|
||||
tmpdir = d.getVar('TMPDIR', True)
|
||||
tmpdir = d.getVar('TMPDIR')
|
||||
distro_check_dir = os.path.join(tmpdir, "distro_check")
|
||||
datetime = localdata.getVar('DATETIME', True)
|
||||
datetime = localdata.getVar('DATETIME')
|
||||
dist_check.update_distro_data(distro_check_dir, datetime, localdata)
|
||||
|
||||
pn = d.getVar("PN", True)
|
||||
pn = d.getVar("PN")
|
||||
bb.note("Package Name: %s" % pn)
|
||||
|
||||
if pn.find("-native") != -1:
|
||||
pnstripped = pn.split("-native")
|
||||
bb.note("Native Split: %s" % pnstripped)
|
||||
localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
|
||||
localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES'))
|
||||
bb.data.update_data(localdata)
|
||||
|
||||
if pn.startswith("nativesdk-"):
|
||||
pnstripped = pn.replace("nativesdk-", "")
|
||||
bb.note("NativeSDK Split: %s" % pnstripped)
|
||||
localdata.setVar('OVERRIDES', "pn-" + pnstripped + ":" + d.getVar('OVERRIDES', True))
|
||||
localdata.setVar('OVERRIDES', "pn-" + pnstripped + ":" + d.getVar('OVERRIDES'))
|
||||
bb.data.update_data(localdata)
|
||||
|
||||
if pn.find("-cross") != -1:
|
||||
pnstripped = pn.split("-cross")
|
||||
bb.note("cross Split: %s" % pnstripped)
|
||||
localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
|
||||
localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES'))
|
||||
bb.data.update_data(localdata)
|
||||
|
||||
if pn.find("-crosssdk") != -1:
|
||||
pnstripped = pn.split("-crosssdk")
|
||||
bb.note("cross Split: %s" % pnstripped)
|
||||
localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
|
||||
localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES'))
|
||||
bb.data.update_data(localdata)
|
||||
|
||||
if pn.find("-initial") != -1:
|
||||
pnstripped = pn.split("-initial")
|
||||
bb.note("initial Split: %s" % pnstripped)
|
||||
localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
|
||||
localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES'))
|
||||
bb.data.update_data(localdata)
|
||||
|
||||
"""generate package information from .bb file"""
|
||||
pname = localdata.getVar('PN', True)
|
||||
pcurver = localdata.getVar('PV', True)
|
||||
pdesc = localdata.getVar('DESCRIPTION', True)
|
||||
pname = localdata.getVar('PN')
|
||||
pcurver = localdata.getVar('PV')
|
||||
pdesc = localdata.getVar('DESCRIPTION')
|
||||
if pdesc is not None:
|
||||
pdesc = pdesc.replace(',','')
|
||||
pdesc = pdesc.replace('\n','')
|
||||
|
||||
pgrp = localdata.getVar('SECTION', True)
|
||||
plicense = localdata.getVar('LICENSE', True).replace(',','_')
|
||||
pgrp = localdata.getVar('SECTION')
|
||||
plicense = localdata.getVar('LICENSE').replace(',','_')
|
||||
|
||||
rstatus = localdata.getVar('RECIPE_COLOR', True)
|
||||
rstatus = localdata.getVar('RECIPE_COLOR')
|
||||
if rstatus is not None:
|
||||
rstatus = rstatus.replace(',','')
|
||||
|
||||
pupver = localdata.getVar('RECIPE_UPSTREAM_VERSION', True)
|
||||
pupver = localdata.getVar('RECIPE_UPSTREAM_VERSION')
|
||||
if pcurver == pupver:
|
||||
vermatch="1"
|
||||
else:
|
||||
vermatch="0"
|
||||
|
||||
noupdate_reason = localdata.getVar('RECIPE_NO_UPDATE_REASON', True)
|
||||
noupdate_reason = localdata.getVar('RECIPE_NO_UPDATE_REASON')
|
||||
if noupdate_reason is None:
|
||||
noupdate="0"
|
||||
else:
|
||||
noupdate="1"
|
||||
noupdate_reason = noupdate_reason.replace(',','')
|
||||
|
||||
maintainer = localdata.getVar('RECIPE_MAINTAINER', True)
|
||||
rlrd = localdata.getVar('RECIPE_UPSTREAM_DATE', True)
|
||||
maintainer = localdata.getVar('RECIPE_MAINTAINER')
|
||||
rlrd = localdata.getVar('RECIPE_UPSTREAM_DATE')
|
||||
# do the comparison
|
||||
result = dist_check.compare_in_distro_packages_list(distro_check_dir, localdata)
|
||||
|
||||
@@ -272,60 +272,60 @@ python do_checkpkg() {
|
||||
from bb.fetch2 import FetchError, NoMethodError, decodeurl
|
||||
|
||||
"""first check whether a uri is provided"""
|
||||
src_uri = (d.getVar('SRC_URI', True) or '').split()
|
||||
src_uri = (d.getVar('SRC_URI') or '').split()
|
||||
if src_uri:
|
||||
uri_type, _, _, _, _, _ = decodeurl(src_uri[0])
|
||||
else:
|
||||
uri_type = "none"
|
||||
|
||||
"""initialize log files."""
|
||||
logpath = d.getVar('LOG_DIR', True)
|
||||
logpath = d.getVar('LOG_DIR')
|
||||
bb.utils.mkdirhier(logpath)
|
||||
logfile = os.path.join(logpath, "checkpkg.csv")
|
||||
|
||||
"""generate package information from .bb file"""
|
||||
pname = d.getVar('PN', True)
|
||||
pname = d.getVar('PN')
|
||||
|
||||
if pname.find("-native") != -1:
|
||||
if d.getVar('BBCLASSEXTEND', True):
|
||||
if d.getVar('BBCLASSEXTEND'):
|
||||
return
|
||||
pnstripped = pname.split("-native")
|
||||
bb.note("Native Split: %s" % pnstripped)
|
||||
localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
|
||||
localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES'))
|
||||
bb.data.update_data(localdata)
|
||||
|
||||
if pname.startswith("nativesdk-"):
|
||||
if d.getVar('BBCLASSEXTEND', True):
|
||||
if d.getVar('BBCLASSEXTEND'):
|
||||
return
|
||||
pnstripped = pname.replace("nativesdk-", "")
|
||||
bb.note("NativeSDK Split: %s" % pnstripped)
|
||||
localdata.setVar('OVERRIDES', "pn-" + pnstripped + ":" + d.getVar('OVERRIDES', True))
|
||||
localdata.setVar('OVERRIDES', "pn-" + pnstripped + ":" + d.getVar('OVERRIDES'))
|
||||
bb.data.update_data(localdata)
|
||||
|
||||
if pname.find("-cross") != -1:
|
||||
pnstripped = pname.split("-cross")
|
||||
bb.note("cross Split: %s" % pnstripped)
|
||||
localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
|
||||
localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES'))
|
||||
bb.data.update_data(localdata)
|
||||
|
||||
if pname.find("-initial") != -1:
|
||||
pnstripped = pname.split("-initial")
|
||||
bb.note("initial Split: %s" % pnstripped)
|
||||
localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
|
||||
localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES'))
|
||||
bb.data.update_data(localdata)
|
||||
|
||||
pdesc = localdata.getVar('DESCRIPTION', True)
|
||||
pgrp = localdata.getVar('SECTION', True)
|
||||
pversion = localdata.getVar('PV', True)
|
||||
plicense = localdata.getVar('LICENSE', True)
|
||||
psection = localdata.getVar('SECTION', True)
|
||||
phome = localdata.getVar('HOMEPAGE', True)
|
||||
prelease = localdata.getVar('PR', True)
|
||||
pdepends = localdata.getVar('DEPENDS', True)
|
||||
pbugtracker = localdata.getVar('BUGTRACKER', True)
|
||||
ppe = localdata.getVar('PE', True)
|
||||
psrcuri = localdata.getVar('SRC_URI', True)
|
||||
maintainer = localdata.getVar('RECIPE_MAINTAINER', True)
|
||||
pdesc = localdata.getVar('DESCRIPTION')
|
||||
pgrp = localdata.getVar('SECTION')
|
||||
pversion = localdata.getVar('PV')
|
||||
plicense = localdata.getVar('LICENSE')
|
||||
psection = localdata.getVar('SECTION')
|
||||
phome = localdata.getVar('HOMEPAGE')
|
||||
prelease = localdata.getVar('PR')
|
||||
pdepends = localdata.getVar('DEPENDS')
|
||||
pbugtracker = localdata.getVar('BUGTRACKER')
|
||||
ppe = localdata.getVar('PE')
|
||||
psrcuri = localdata.getVar('SRC_URI')
|
||||
maintainer = localdata.getVar('RECIPE_MAINTAINER')
|
||||
|
||||
""" Get upstream version version """
|
||||
pupver = ""
|
||||
@@ -362,7 +362,7 @@ python do_checkpkg() {
|
||||
psrcuri = "none"
|
||||
pdepends = "".join(pdepends.split("\t"))
|
||||
pdesc = "".join(pdesc.split("\t"))
|
||||
no_upgr_reason = d.getVar('RECIPE_NO_UPDATE_REASON', True)
|
||||
no_upgr_reason = d.getVar('RECIPE_NO_UPDATE_REASON')
|
||||
lf = bb.utils.lockfile("%s.lock" % logfile)
|
||||
with open(logfile, "a") as f:
|
||||
writer = csv.writer(f, delimiter='\t')
|
||||
@@ -401,12 +401,12 @@ python do_distro_check() {
|
||||
|
||||
localdata = bb.data.createCopy(d)
|
||||
bb.data.update_data(localdata)
|
||||
tmpdir = d.getVar('TMPDIR', True)
|
||||
tmpdir = d.getVar('TMPDIR')
|
||||
distro_check_dir = os.path.join(tmpdir, "distro_check")
|
||||
logpath = d.getVar('LOG_DIR', True)
|
||||
logpath = d.getVar('LOG_DIR')
|
||||
bb.utils.mkdirhier(logpath)
|
||||
result_file = os.path.join(logpath, "distrocheck.csv")
|
||||
datetime = localdata.getVar('DATETIME', True)
|
||||
datetime = localdata.getVar('DATETIME')
|
||||
dc.update_distro_data(distro_check_dir, datetime, localdata)
|
||||
|
||||
# do the comparison
|
||||
@@ -449,12 +449,12 @@ do_checklicense[nostamp] = "1"
|
||||
python do_checklicense() {
|
||||
import csv
|
||||
import shutil
|
||||
logpath = d.getVar('LOG_DIR', True)
|
||||
logpath = d.getVar('LOG_DIR')
|
||||
bb.utils.mkdirhier(logpath)
|
||||
pn = d.getVar('PN', True)
|
||||
pn = d.getVar('PN')
|
||||
logfile = os.path.join(logpath, "missinglicense.csv")
|
||||
generic_directory = d.getVar('COMMON_LICENSE_DIR', True)
|
||||
license_types = d.getVar('LICENSE', True)
|
||||
generic_directory = d.getVar('COMMON_LICENSE_DIR')
|
||||
license_types = d.getVar('LICENSE')
|
||||
for license_type in ((license_types.replace('+', '').replace('|', '&')
|
||||
.replace('(', '').replace(')', '').replace(';', '')
|
||||
.replace(',', '').replace(" ", "").split("&"))):
|
||||
|
||||
Reference in New Issue
Block a user