Bug 2472 - archiver.bbclass: improve usability
Summary: archiver.bbclass: improve usability
Status: VERIFIED FIXED
Alias: None
Product: Other YP Layers
Classification: Build System, Metadata & Runtime
Component: layers (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium enhancement
Target Milestone: 1.3 M1
Assignee: Xiaofeng Yan
QA Contact:
URL:
Whiteboard: (QA testing completed) Done
Depends on:
Blocks:
 
Reported: 2012-05-18 15:23 UTC by Christopher Larson
Modified: 2012-06-12 10:10 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Larson 2012-05-18 15:23:33 UTC
In my opinion, the usability of the archiver classes can be improved, beyond the simple addition of default values for the variables. A user could well inherit just archiver rather than the individual useful classes, and not realize it will do nothing.

In my distro, I'm doing something this:

# More sane usability for the archiver classes
ARCHIVER_MODE ?= "none"
ARCHIVER_MODE[type] = "choice"
ARCHIVER_MODE[choices] = "none original patched configured"
ARCHIVER_CLASS = "${@'archive-${ARCHIVER_MODE}-source' \
                     if ARCHIVER_MODE != 'none' else ''}"
INHERIT += "${ARCHIVER_CLASS}"
Comment 1 Xiaofeng Yan 2012-05-23 01:46:28 UTC
Hi Christopher Larson,

This is good way to point to the type for archiving. I will learn your ideas and add them to appropriate place. thanks your good suggestion.

Thanks
Yan
Comment 3 liang li 2012-06-12 10:07:05 UTC
the following is added to the local.conf of build dir:

INHERIT += "archive-original-source"
SOURCE_ARCHIVE_PACKAGE_TYPE ?= 'tar'
SOURCE_ARCHIVE_LOG_WITH_SCRIPTS ?= 'xxx'

run "bitbake core-image-sato-sdk" in build dir to build the qemuppc core-image-sato-sdk image, then change the above to :

INHERIT += "archive-original-source"
SOURCE_ARCHIVE_PACKAGE_TYPE ?= 'tar'
SOURCE_ARCHIVE_LOG_WITH_SCRIPTS ?= ''
 
run "bitbake core-image-sato-sdk" in build dir to build the qemuppc core-image-sato-sdk image.

no error happened , change status to verified.

test env :
host :ubuntu 11.10 x86_64
kernel :3.0.0-20-generic #34-Ubuntu SMP

git info:60543b931d073e17ad935aacfbd0d4eba76e2360
git branch :poky/master