aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib
AgeCommit message (Collapse)Author
2012-01-11meta/PRService: Added export/import fuctions.Lianhao Lu
[YOCTO #1556] - Modified meta/class/package.bbclass and prserv.bbclass according to the change in PR service by adding PACKAGE_ARCH into the query tuple. - Added prexport.bbclass, primport.bbclass to export/import AUTOPR values from/to PRService. - Move PR service related common code to lib/oe/prservice.py. - Supported reading the AUTOPR values from the exported .inc file instead of reading it from remote PR service. - Created a new script bitbake-prserv-tool to export/import the AUTOPR values from/to the PR service. Typical usage scenario of the export/import is: 1. bitbake-prserv-tool export <file> to export the AUTOPR values from the current PR service into an exported .inc file. 2. Others may use that exported .inc file(to be included in the local.conf) to lockdown and reproduce the same AUTOPR when generating package feeds. 3. Others may "bitbake-prserv-tool import <file>" to import the AUTOPR values into their own PR service and the AUTOPR values will be incremented from there. (From OE-Core rev: 9979107d8eaf503efd921564385859b1e83dbb3c) Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-06buildhistory: add script to check for significant changesPaul Eggleton
Adds a buildhistory-diff script which can be used to analyse changes in the buildhistory git repository (as produced by buildhistory.bbclass), and report significant ones that may need manual checking to ensure they aren't regressions (e.g. package size changed by more than a certain percentage, files added/removed/changed in the image, etc.) The implementation is actually split into a small script and a Python module, in order to make the logic re-usable in a future web-based interface. Implements the first part of [YOCTO #1566]. (From OE-Core rev: 5e5cbb9bd8cdce402b979680288ac8c51799a24d) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-05multilib: Abstract class extension code into classextend.pyRichard Purdie
(From OE-Core rev: 563828bad19a242bba9ce3db461bb5807037dfdf) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-08oe.license: add license flattening codeChristopher Larson
This flattens a license tree by selecting one side of each OR operation (chosen via the user supplied function). (From OE-Core rev: 6984961314c8ba2aceab9acabb658f96ed249fef) Signed-off-by: Christopher Larson <kergoth@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-08license: split license parsing into oe.licenseChristopher Larson
In addition to moving this functionality to oe.license, makes the string preparation more picky before passing it off to the ast compilation. This ensures that LICENSE entries like 'GPL/BSD' are seen as invalid (due to the presence of the unsupported '/'). (From OE-Core rev: 20d4068045c76e9dc2aff0c152dd02d6a109c9dd) Signed-off-by: Christopher Larson <kergoth@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-08oe.test_types: move into an oe.tests packageChristopher Larson
(From OE-Core rev: 36cc35b4cbb91049a63daa7c915f538047db0f76) Signed-off-by: Christopher Larson <kergoth@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-27getVar/setVar cleanupsRichard Purdie
Complete the bb.data.getVar/setVar replacements with accesses directly to the data store object. (From OE-Core rev: 2864ff6a4b3c3f9b3bbb6d2597243cc5d3715939) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-10Convert to use direct access to the data store (instead of bb.data.*Var*())Richard Purdie
This is the result of running the following over the metadata: sed \ -e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \ -e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \ -e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \ -e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \ -e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -i `grep -ril bb.data *` (From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-04patch: Convert to use oe_terminalRichard Purdie
Unfortunately we can't access oe_terminal directly from patch.py so we have to pass in the correct terminal function pointer. [YOCTO #1587] (From OE-Core rev: 9e0a21dda24f285a1c4878488e887485a749f3f2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-01lib/oe/terminal: add support for XFCE's terminal emulatorJoshua Lock
That's Terminal on Fedora and xfce4-terminal on Ubuntu/Debian... This could get interesting! (From OE-Core rev: 162b70a36388ac44fc1b39e172cd53579707bff3) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-10-14data.py: fixed message domain errorsSamuel Stirtzel
The dynamic message domain was introduced by Richard Purdie with the following patch: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=a6c48298b17e6a5844b3638b422fe226e3b67b89 (From OE-Core rev: 55a8382e460430dc5ff10755d235d637531d2ae7) Signed-off-by: Samuel Stirtzel <s.stirtzel@googlemail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-10-14patch.py: fixed message domain errorsSamuel Stirtzel
The dynamic message domain was introduced by Richard Purdie with the following patch: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=a6c48298b17e6a5844b3638b422fe226e3b67b89 (From OE-Core rev: 2383e06c8ed7c15aa148b9dbe40445e7095b6f57) Signed-off-by: Samuel Stirtzel <s.stirtzel@googlemail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-21distrodata: fix distro_check codeSaul Wold
This fixes a problem with package names from inherits showing up (From OE-Core rev: edb2a11994ac21e790155ea519bded4b37ef9307) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-19lib/oe/terminal.py: declare konsole from KDE 4.x as unsupportedPaul Eggleton
Konsole 2.x (from KDE 4.x) does not work as devshell - it does not pass the environment or current working directory through among other issues, so do a version check and disable it if it is found (skipping to the next available terminal application.) (From OE-Core rev: ee57cd7deb778dc72e58668d8c71cf840a3bc0d9) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-10oe.terminal: improve how we spawn screenChris Larson
- Name the screen session 'devshell', to avoid confusion if running bitbake itself under a screen session. - Display a warning message when spawning screen, so it's clear to the user that screen has been run (otherwise do_devshell just appears to hang). (From OE-Core rev: 13e01d29d14e7e7403d0c45c5699ea9160243868) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-10Rework how the devshell functionsChris Larson
In the new implementation, each known terminal is defined as a class in oe.terminal, as a subclass of bb.process.Popen. terminal.bbclass wraps this functionality, providing the metadata pieces. It obeys the OE_TERMINAL variable, which is a 'choice' typed variable. This variable may be 'auto', 'none', or any of the names of the defined terminals. When using 'auto', or requesting an unsupported terminal, we attempt to spawn them in priority order until we get one that's available on this system (and in the case of the X terminals, has DISPLAY defined). The 'none' value is used when we're doing things like automated builds, and want to ensure that no terminal is *ever* spawned, under any circumstances. Current available terminals: gnome konsole xterm rxvt screen (From OE-Core rev: 69f77f80965fa06a057837f8f49eda06855c4086) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-27lib/oe/util.py: Add MLPREFIX support to prune_suffix()Richard Purdie
prune_suffix() also needs be aware of MLPREFIX when changing PN for use in BPN. (From OE-Core rev: 20dd241052afa5ff80b91ebf09b0b48765bc3412) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-26lib/oe/utils: 'Fix' oe.utils.contains() behaviourRichard Purdie
Currently oe.utils.contains(X, "A", true, false) will return true for substring matches, e.g. if X = "ABC". This is not what most users expect from the function. In the common OE use of this function there is the case of "touchscreen" and "screen" being used as independent variables. Whilst it could be argued there isn't a problem in that specific case (touchscreens are usually on screens), there is no substring usage of this function is OE-Core so this patch changes the behaviour to match only full strings. It also fixes a bug where duplicate entries would confuse multiple matches, e.g. contains(X, ["A", "B"], ...) would match X = "A A" which is clearly wrong. (From OE-Core rev: 5c09cbe3bf456e968fc853827698eb18b62e8348) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-28oe.classutils: add moduleChris Larson
This adds a ClassRegistry utility metaclass, as maintaining a class registry is a fairly common thing to do. (From OE-Core rev: 6a46c375bea03b145bea41ec29ae2fd4d3cd9db6) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-23packagedata.py: Fix read_subpkgdata_dict()Richard Purdie
If both VAR and VAR_foo are in subd, we need to ensure VAR_foo gets returned. Currently the code would work randomly. The only current user is the rpm packaging backend. (From OE-Core rev: ad098e40e8c57727892819e131bf18308bf244d2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-20packagedata: don't choke on empty PACKAGESChris Larson
(From OE-Core rev: 54ecf8e3992b8a01c2e5bd16720e1819b71b68bd) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-20Move packagedata code into oe.packagedata (sync from OE)Chris Larson
(From OE-Core rev: e6858627ab087f2f25ebbd6c4422eeae35f3b0ac) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-20oe.packagegroup: add code for package groups (sync from OE)Chris Larson
This includes some utility functions for dealing with groups of packages defined in the metadata. Metadata syntax: PACKAGE_GROUP_<group> = "<list of packages>" If the packages in the group are optional: PACKAGE_GROUP_<group>[optional] = "1" (From OE-Core rev: 4df212e9c2a1dd7c80d180fd13b67e9f2799d3e1) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-20oe.data: expand the flagsChris Larson
(From OE-Core rev: 8b9de6d2ad2d351bbc288cbb12562806ba8edae2) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-20Implement variable typing (sync from OE)Chris Larson
This implementation consists of two components: - Type creation python modules, whose job it is to construct objects of the defined type for a given variable in the metadata - typecheck.bbclass, which iterates over all configuration variables with a type defined and uses oe.types to check the validity of the values This gives us a few benefits: - Automatic sanity checking of all configuration variables with a defined type - Avoid duplicating the "how do I make use of the value of this variable" logic between its users. For variables like PATH, this is simply a split(), for boolean variables, the duplication can result in confusing, or even mismatched semantics (is this 0/1, empty/nonempty, what?) - Make it easier to create a configuration UI, as the type information could be used to provide a better interface than a text edit box (e.g checkbox for 'boolean', dropdown for 'choice') This functionality is entirely opt-in right now. To enable the configuration variable type checking, simply INHERIT += "typecheck". Example of a failing type check: BAZ = "foo" BAZ[type] = "boolean" $ bitbake -p FATAL: BAZ: Invalid boolean value 'foo' $ Examples of leveraging oe.types in a python snippet: PACKAGES[type] = "list" python () { import oe.data for pkg in oe.data.typed_value("PACKAGES", d): bb.note("package: %s" % pkg) } LIBTOOL_HAS_SYSROOT = "yes" LIBTOOL_HAS_SYSROOT[type] = "boolean" python () { import oe.data assert(oe.data.typed_value("LIBTOOL_HAS_SYSROOT", d) == True) } (From OE-Core rev: a04ce490e933fc7534db33f635b025c25329c564) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-17Add a new task checklicense and fix some bugs in distro_check.pyMei Lei
distro_check.py: Create a new function called create_log_file to reduce a lot of repeat code in distrodata.bbclass. We needn't to create log file in function save_distro_check_result, because the log file has been generated in check_eventhandler. Another bug is that we maybe access the /tmp/Meego-1.0 before we create this file. Add a judge statement to decide whether we need to create this file firstly. distrodata.bbclass: Add a new task checklicense to collect missing text license information. This can help package-report system to know how many recipes are missing license text. (From OE-Core rev: b41148cda9f0cc292b662a8473f26bc1ee0148f3) Signed-off-by: Mei Lei <lei.mei@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-16lib/oe/process.py: import from OEMartin Jansa
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-10oe/patch.py: Remove series file during Clean()Khem Raj
Currently if there is a failed do_patch the series files get appended so if there were two patches a.patch b.patch and b.patch failed during next run it would append a.patch again a.patch b.patch a.patch and this would keep growing. We can remove series file in Clean() because we populate it in Import() anyway (From OE-Core rev: fd07744ae549c2f43b18d53e6ed16c20df6b4ef3) Signed-off-by: Khem Raj <raj.khem@gmail.com> Acked-by: Chris Larson <chris_larson@mentor.com> Acked-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-04distro_check.py: Fix some bugs in distro_check.pyMei Lei
The recipe meta-ide-support's alias is Poky, but not defined in distro_exceptions, this will lead an error. The compare_in_distro_packages_list function omit a split process, this will lead to a form issue. Change the log file generate way, use symbolic links link to the latest log file, instead of appending every log file in old log. (From OE-Core rev: 123a7f49753aef4d5ccb5f5a5590c3c88775c6d0) Signed-off-by: Mei Lei <lei.mei@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-21lib/oe/distro_check.py: Fixup Poky referencesRichard Purdie
(From OE-Core rev: 41c813e0cd5a0de63db325a5926846b67e88c85a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-23lib/oe/patch.py: Cosmetic change to avoid bitbake warningKhem Raj
bb.mkdirhier should be bb.utils.mkdirhier (From OE-Core rev: cd28d5f5ad7855d0d6a15bec5317c942e2462065) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-23oe.utils: add inherits (sync from OE)Chris Larson
(From OE-Core rev: 0bdb38820489a69448e36c75863e2e2d47cdb20f) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-23oe.path: sync up with current OEChris Larson
(From OE-Core rev: 1958b303f98b8db5bab00344823bbb8e086b8dba) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-23oe.patch: add missing importsChris Larson
(From OE-Core rev: cefbf3a14fcf87e18f7a63a1f55904d9d612ed3e) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-23oe.utils: add bb, bb.data importsChris Larson
While the metadata can and should rely on bb always being available, this needn't necessarily be the case for imported python modules. (From OE-Core rev: a521835701c07f5786acd663fb4fb394e93eba91) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-03qa.py: Fix a typo when evaluating bitsizeMark Hatle
This should be setting a variable, not performing a comparison. (From OE-Core rev: cbe1b8277c610e8e31d1270757877300532bed56) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-03insane.bbclass: Fix ELF bitsize comparisonMark Hatle
Fix the way the ELF size is compared to ensure that incorrectly sized ELF binaries are captured during the file scan. lib/oe/qa.py is changed to accept a bitsize as a parameter. Instead of previously defining true/false, it now takes "0" undefined, "32" 32-bit, and "64" 64-bit as the size argument. This allows us to preserve existing behavior of only loading one ELF type, while allowing the function to be able to discover the size on it's own. (From OE-Core rev: 17dae13fabe2932a47ecc86fcafb1d177226513f) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-02lib/oe/path.py: Use bb.utils.mkdirhier instead of bb.mkdirhierKhem Raj
(From OE-Core rev: 5a22a8c06743b0a8a3d949288b99d53bd4b7ceb3) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-21lib/oe/path.py: Add expection class to handle the output argumentRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-18meta/lib/oe/path: Use check_output for subprocess so we can see error info. ↵Richard Purdie
Import code to be python 2.6 compatible. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-09lib.oe.path: Update copytree function to call shell commands since its twice ↵Richard Purdie
as fast As an added bonus, hardlinks between files in the tree will be preserved too. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-07meta/classes: Update classes to use new fetcher APIRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2010-10-15distrodata: Modify Distro tracking spreadsheetSaul Wold
Signed-off-by: Saul Wold <Saul.Wold@intel.com>
2010-09-27distro_check.py: Added additional support for distro checkingSaul Wold
Now tells which section a macth occurs (main vs contrib) Keywords for Poky, OpenedHand, ... Signed-off-by: Saul Wold <Saul.Wold@intel.com>
2010-09-17Distro Tracking: Updated and add Poky Alias infoSaul Wold
distro_check.py: Add DISTRO_PN_ALIAS check for Poky, OpenedHand, Intel and Upstream, to mark packages that are not in known upstreams distro_tracking_fields.inc: Merged private files into 1 master file Added additional Maintainer Info Added Distro Alias information for Poky and OpenedHand Signed-off-by: Saul Wold <Saul.Wold@intel.com>
2010-09-02distro_check: fix for natives, cross, and initial recipe typesSaul Wold
datetime checking is changed to be once per day Signed-off-by: Saul Wold <Saul.Wold@intel.com> distro_check: fix for natives, cross, and initial recipe types Signed-off-by: Saul Wold <Saul.Wold@intel.com>
2010-09-02distro_check: use space as the delimiter for aliasesKevin Tian
Signed-off-by: Kevin Tian <kevin.tian@intel.com>
2010-08-22lib/oe/path: Use bb.utils.copyfile as shutils can't cope with copying ↵Richard Purdie
unreadable files Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-12lib/oe/path.py: Add copytree function that worksRichard Purdie
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-12lib/oe: support wildcards in path.removeJoshua Lock
Signed-off-by: Joshua Lock <josh@linux.intel.com>