mirror of
https://git.yoctoproject.org/poky
synced 2026-09-19 18:49:32 +02:00
scripts/prserv-tool: Adepted to new bitbake cache.
Adepted to the new bitbake cache mechanism which is based on file content but not on file timp stamps any more. (From OE-Core rev: c1705317f9456f761da2094e886a07939291e53a) Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
ce0ecf5d84
commit
c3a23ec304
@@ -9,16 +9,23 @@ help ()
|
|||||||
echo -e "\timport <file>: import the AUTOPR values from the exported file into the PR service."
|
echo -e "\timport <file>: import the AUTOPR values from the exported file into the PR service."
|
||||||
}
|
}
|
||||||
|
|
||||||
export ()
|
clean_cache()
|
||||||
|
{
|
||||||
|
s=`bitbake -e | grep ^CACHE= | cut -f2 -d\"`
|
||||||
|
if [ "x${s}" != "x" ]; then
|
||||||
|
rm -rf ${s}
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
do_export ()
|
||||||
{
|
{
|
||||||
file=$1
|
file=$1
|
||||||
[ "x${file}" == "x" ] && help && exit 1
|
[ "x${file}" == "x" ] && help && exit 1
|
||||||
rm -f ${file}
|
rm -f ${file}
|
||||||
|
|
||||||
touch dummy.inc
|
clean_cache
|
||||||
bitbake -R conf/prexport.conf -R dummy.inc -p
|
bitbake -R conf/prexport.conf -p
|
||||||
s=`bitbake -R conf/prexport.conf -R dummy.inc -e | grep ^PRSERV_DUMPFILE= | cut -f2 -d\"`
|
s=`bitbake -R conf/prexport.conf -e | grep ^PRSERV_DUMPFILE= | cut -f2 -d\"`
|
||||||
rm -f dummy.inc
|
|
||||||
if [ "x${s}" != "x" ];
|
if [ "x${s}" != "x" ];
|
||||||
then
|
then
|
||||||
[ -e $s ] && mv -f $s $file && echo "Exporting to file $file succeeded!"
|
[ -e $s ] && mv -f $s $file && echo "Exporting to file $file succeeded!"
|
||||||
@@ -28,15 +35,14 @@ export ()
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
import ()
|
do_import ()
|
||||||
{
|
{
|
||||||
file=$1
|
file=$1
|
||||||
[ "x${file}" == "x" ] && help && exit 1
|
[ "x${file}" == "x" ] && help && exit 1
|
||||||
|
|
||||||
touch dummy.inc
|
clean_cache
|
||||||
bitbake -R conf/primport.conf -R dummy.inc -R $file -p
|
bitbake -R conf/primport.conf -R $file -p
|
||||||
ret=$?
|
ret=$?
|
||||||
rm -f dummy.inc
|
|
||||||
[ $ret -eq 0 ] && echo "Importing from file $file succeeded!" || echo "Importing from file $file failed!"
|
[ $ret -eq 0 ] && echo "Importing from file $file succeeded!" || echo "Importing from file $file failed!"
|
||||||
return $ret
|
return $ret
|
||||||
}
|
}
|
||||||
@@ -45,10 +51,10 @@ import ()
|
|||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
export)
|
export)
|
||||||
export $2
|
do_export $2
|
||||||
;;
|
;;
|
||||||
import)
|
import)
|
||||||
import $2
|
do_import $2
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
help
|
help
|
||||||
|
|||||||
Reference in New Issue
Block a user