]> code.ossystems Code Review - openembedded-core.git/commit
devtool: upgrade: improve performance and show progress when adding files
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Thu, 28 Sep 2017 03:46:14 +0000 (16:46 +1300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 10 Nov 2017 14:44:31 +0000 (14:44 +0000)
commit8b184f6c874b60324ee107af53853687173d3434
tree17f78e7faa7368f9b561d5a0d868d17f7b381ba5
parentc7f4c9f050c11c0de7fcf5badcc19a8fbc6428cf
devtool: upgrade: improve performance and show progress when adding files

When devtool upgrade is upgrading to a new version where the source is
fetched as an archive (e.g. a tarball), we create a single commit in the
git repository that is the upgrade from the old version to the new. We
do this by extracting the old source, committing it, deleting all files,
copying in the new files, running git add on each new/changed/deleted
file, and then committing the result. When a lot of files have changed
in an upgrade (such as QEMU 2.8.1.1 -> 2.10.0) the penultimate step of
running git add it can take quite a long time; in order to reduce this
and show some feedback to the user, run git add with batches of 100
files at once and also show a progress bar. In a local test with the
aforementioned QEMU upgrade it took the time down from over 7 minutes
down to about 13 seconds.

Fixes [YOCTO #11948].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/lib/devtool/upgrade.py