Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] bitbake-prserv-tool adepted to new bitbake cache
@ 2012-02-28  3:42 Lianhao Lu
  2012-02-28  3:42 ` [PATCH 1/1] scripts/prserv-tool: Adepted " Lianhao Lu
  2012-03-05 21:47 ` [PATCH 0/1] bitbake-prserv-tool adepted " Saul Wold
  0 siblings, 2 replies; 3+ messages in thread
From: Lianhao Lu @ 2012-02-28  3:42 UTC (permalink / raw)
  To: openembedded-core

Modified the bitbake-prserv-tool scripts to trigger reparse according to the 
new content-based bitbake cache mechanism.

The following changes since commit 8d4db8e6dcd2d25637cb77515fe776552f2fdd6d:
  Dongxiao Xu (1):
        bitbake.conf: Create a new filter variable BB_HASHCONFIG_WHITELIST

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib llu/prserv-tool
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=llu/prserv-tool

Lianhao Lu (1):
  scripts/prserv-tool: Adepted to new bitbake cache.

 scripts/bitbake-prserv-tool |   28 +++++++++++++++++-----------
 1 files changed, 17 insertions(+), 11 deletions(-)




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/1] scripts/prserv-tool: Adepted to new bitbake cache.
  2012-02-28  3:42 [PATCH 0/1] bitbake-prserv-tool adepted to new bitbake cache Lianhao Lu
@ 2012-02-28  3:42 ` Lianhao Lu
  2012-03-05 21:47 ` [PATCH 0/1] bitbake-prserv-tool adepted " Saul Wold
  1 sibling, 0 replies; 3+ messages in thread
From: Lianhao Lu @ 2012-02-28  3:42 UTC (permalink / raw)
  To: openembedded-core

Adepted to the new bitbake cache mechanism which is based on file
content but not on file timp stamps any more.

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
---
 scripts/bitbake-prserv-tool |   28 +++++++++++++++++-----------
 1 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/scripts/bitbake-prserv-tool b/scripts/bitbake-prserv-tool
index 6c0584c..f3855df 100755
--- a/scripts/bitbake-prserv-tool
+++ b/scripts/bitbake-prserv-tool
@@ -9,16 +9,23 @@ help ()
     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
     [ "x${file}" == "x" ] && help && exit 1
     rm -f ${file}
 
-    touch dummy.inc
-    bitbake -R conf/prexport.conf -R dummy.inc -p
-    s=`bitbake -R conf/prexport.conf -R dummy.inc -e | grep ^PRSERV_DUMPFILE= | cut -f2 -d\"`
-    rm -f dummy.inc
+    clean_cache
+    bitbake -R conf/prexport.conf -p
+    s=`bitbake -R conf/prexport.conf -e | grep ^PRSERV_DUMPFILE= | cut -f2 -d\"`
     if [ "x${s}" != "x" ];
     then
        [ -e $s ] && mv -f $s $file && echo "Exporting to file $file succeeded!"
@@ -28,15 +35,14 @@ export ()
     return 1
 }
 
-import ()
+do_import ()
 {
     file=$1
     [ "x${file}" == "x" ] && help && exit 1
 
-    touch dummy.inc
-    bitbake -R conf/primport.conf -R dummy.inc -R $file -p
+    clean_cache
+    bitbake -R conf/primport.conf -R $file -p
     ret=$?
-    rm -f dummy.inc
     [ $ret -eq 0 ] && echo "Importing from file $file succeeded!" || echo "Importing from file $file failed!"
     return $ret
 }
@@ -45,10 +51,10 @@ import ()
 
 case $1 in
 export)
-    export $2
+    do_export $2
     ;;
 import)
-    import $2
+    do_import $2
     ;;
 *)
     help
-- 
1.7.0.4




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 0/1] bitbake-prserv-tool adepted to new bitbake cache
  2012-02-28  3:42 [PATCH 0/1] bitbake-prserv-tool adepted to new bitbake cache Lianhao Lu
  2012-02-28  3:42 ` [PATCH 1/1] scripts/prserv-tool: Adepted " Lianhao Lu
@ 2012-03-05 21:47 ` Saul Wold
  1 sibling, 0 replies; 3+ messages in thread
From: Saul Wold @ 2012-03-05 21:47 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On 02/27/2012 07:42 PM, Lianhao Lu wrote:
> Modified the bitbake-prserv-tool scripts to trigger reparse according to the
> new content-based bitbake cache mechanism.
>
> The following changes since commit 8d4db8e6dcd2d25637cb77515fe776552f2fdd6d:
>    Dongxiao Xu (1):
>          bitbake.conf: Create a new filter variable BB_HASHCONFIG_WHITELIST
>
> are available in the git repository at:
>
>    git://git.yoctoproject.org/poky-contrib llu/prserv-tool
>    http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=llu/prserv-tool
>
> Lianhao Lu (1):
>    scripts/prserv-tool: Adepted to new bitbake cache.
>
>   scripts/bitbake-prserv-tool |   28 +++++++++++++++++-----------
>   1 files changed, 17 insertions(+), 11 deletions(-)
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>

Merged into OE-core

Thanks
	Sau!




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-03-05 21:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-28  3:42 [PATCH 0/1] bitbake-prserv-tool adepted to new bitbake cache Lianhao Lu
2012-02-28  3:42 ` [PATCH 1/1] scripts/prserv-tool: Adepted " Lianhao Lu
2012-03-05 21:47 ` [PATCH 0/1] bitbake-prserv-tool adepted " Saul Wold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox