do_unpack, do_patch: shift some responsibility around, clean things up
authorChris Larson <chris_larson@mentor.com>
Wed, 1 Sep 2010 04:52:10 +0000 (04:52 +0000)
committerChris Larson <chris_larson@mentor.com>
Thu, 2 Sep 2010 16:19:17 +0000 (09:19 -0700)
commit900cc29b603691eb3a077cb660545ead3715ed54
tree94d9ca9b87e5b9c22e3bbccc8aac551ced5e13c4
parent490c68ac991239c908ec23a2fc143ef8ce2d9981
do_unpack, do_patch: shift some responsibility around, clean things up

- Consolidate 'is this file a patch' logic
- Move unpack functions from classes into oe.unpack
- Move the unpacking message printing into do_unpack
- Move the destination directory determination into do_unpack
- Use subprocess's ability to pass in PATH and cwd rather than mangling the cmd
- Use shutil.copy2/copytree for ordinary file "unpack"
- Use the existing urldata from bb.fetch.init rather than re-decodeurl'ing the urls
- Make handling of globs in url paths explicit rather than implicit, calling
  oe_unpack on each one, so showing an unpacking message to the user for each
  globbed file, rather than the entirety

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Acked-by: Khem Raj <raj.khem@gmail.com>
Acked-by: Tom Rini <tom_rini@mentor.com>
classes/base.bbclass
classes/patch.bbclass
lib/oe/unpack.py [new file with mode: 0644]