2005-08-31 10:45:47 +00:00
|
|
|
python do_pkg_write_metainfo () {
|
Convert to use direct access to the data store (instead of bb.data.*Var*())
This is the result of running the following over the metadata:
sed \
-e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \
-e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-i `grep -ril bb.data *`
(From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-09 15:00:01 +00:00
|
|
|
deploydir = d.getVar('DEPLOY_DIR', 1)
|
2005-08-31 10:45:47 +00:00
|
|
|
if not deploydir:
|
|
|
|
bb.error("DEPLOY_DIR not defined, unable to write package info")
|
|
|
|
return
|
|
|
|
|
|
|
|
try:
|
|
|
|
infofile = file(os.path.join(deploydir, 'package-metainfo'), 'a')
|
|
|
|
except OSError:
|
|
|
|
raise bb.build.FuncFailed("unable to open package-info file for writing.")
|
|
|
|
|
Convert to use direct access to the data store (instead of bb.data.*Var*())
This is the result of running the following over the metadata:
sed \
-e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \
-e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-i `grep -ril bb.data *`
(From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-09 15:00:01 +00:00
|
|
|
name = d.getVar('PN', 1)
|
|
|
|
version = d.getVar('PV', 1)
|
|
|
|
desc = d.getVar('DESCRIPTION', 1)
|
|
|
|
page = d.getVar('HOMEPAGE', 1)
|
|
|
|
lic = d.getVar('LICENSE', 1)
|
2005-08-31 10:45:47 +00:00
|
|
|
|
|
|
|
infofile.write("|| "+ name +" || "+ version + " || "+ desc +" || "+ page +" || "+ lic + " ||\n" )
|
|
|
|
infofile.close()
|
|
|
|
}
|
|
|
|
|
|
|
|
addtask pkg_write_metainfo after do_package before do_build
|