summaryrefslogtreecommitdiff
path: root/meta/lib/oe
AgeCommit message (Collapse)AuthorFiles
2011-11-26getVar/setVar cleanupsRichard Purdie1
Complete the bb.data.getVar/setVar replacements with accesses directly to the data store object. 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 Purdie3
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 *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-04patch: Convert to use oe_terminalRichard Purdie1
Unfortunately we can't access oe_terminal directly from patch.py so we have to pass in the correct terminal function pointer. [YOCTO #1587] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-01lib/oe/terminal: add support for XFCE's terminal emulatorJoshua Lock1
That's Terminal on Fedora and xfce4-terminal on Ubuntu/Debian... This could get interesting! 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 Stirtzel1
The dynamic message domain was introduced by Richard Purdie with the following patch: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=a6c48298b17e6a5844b3638b422fe226e3b67b89 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 Stirtzel1
The dynamic message domain was introduced by Richard Purdie with the following patch: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=a6c48298b17e6a5844b3638b422fe226e3b67b89 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 Wold1
This fixes a problem with package names from inherits showing up Signed-off-by: Saul Wold <sgw@linux.intel.com>
2011-09-18lib/oe/terminal.py: declare konsole from KDE 4.x as unsupportedPaul Eggleton1
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.) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2011-08-10oe.terminal: improve how we spawn screenChris Larson1
- 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). Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-08-10Rework how the devshell functionsChris Larson1
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 Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-07-27lib/oe/util.py: Add MLPREFIX support to prune_suffix()Richard Purdie1
prune_suffix() also needs be aware of MLPREFIX when changing PN for use in BPN. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-26lib/oe/utils: 'Fix' oe.utils.contains() behaviourRichard Purdie1
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-28oe.classutils: add moduleChris Larson1
This adds a ClassRegistry utility metaclass, as maintaining a class registry is a fairly common thing to do. Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-06-23packagedata.py: Fix read_subpkgdata_dict()Richard Purdie1
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-20packagedata: don't choke on empty PACKAGESChris Larson1
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-05-20Move packagedata code into oe.packagedata (sync from OE)Chris Larson1
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-05-20oe.packagegroup: add code for package groups (sync from OE)Chris Larson1
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" Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-05-20oe.data: expand the flagsChris Larson1
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-05-20Implement variable typing (sync from OE)Chris Larson4
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) } Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-05-17Add a new task checklicense and fix some bugs in distro_check.pyMei Lei1
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. Signed-off-by: Mei Lei <lei.mei@intel.com>
2011-05-16lib/oe/process.py: import from OEMartin Jansa1
2011-05-10oe/patch.py: Remove series file during Clean()Khem Raj1
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 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>
2011-05-04distro_check.py: Fix some bugs in distro_check.pyMei Lei1
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. Signed-off-by: Mei Lei <lei.mei@intel.com>
2011-04-21lib/oe/distro_check.py: Fixup Poky referencesRichard Purdie1
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-21lib/oe/patch.py: Cosmetic change to avoid bitbake warningKhem Raj1
bb.mkdirhier should be bb.utils.mkdirhier Signed-off-by: Khem Raj <raj.khem@gmail.com>
2011-03-21oe.utils: add inherits (sync from OE)Chris Larson1
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-03-21oe.path: sync up with current OEChris Larson1
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-03-21oe.patch: add missing importsChris Larson1
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-03-21oe.utils: add bb, bb.data importsChris Larson1
While the metadata can and should rely on bb always being available, this needn't necessarily be the case for imported python modules. Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-03-03qa.py: Fix a typo when evaluating bitsizeMark Hatle1
This should be setting a variable, not performing a comparison. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-03-02insane.bbclass: Fix ELF bitsize comparisonMark Hatle1
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. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-03-02lib/oe/path.py: Use bb.utils.mkdirhier instead of bb.mkdirhierKhem Raj1
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 Purdie1
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 Purdie1
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 Purdie1
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 Purdie1
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2010-10-15distrodata: Modify Distro tracking spreadsheetSaul Wold1
Signed-off-by: Saul Wold <Saul.Wold@intel.com>
2010-09-27distro_check.py: Added additional support for distro checkingSaul Wold1
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 Wold1
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 Wold1
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 Tian1
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 Purdie1
unreadable files Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-12lib/oe/path.py: Add copytree function that worksRichard Purdie1
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-12lib/oe: support wildcards in path.removeJoshua Lock1
Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-08-04lib/oe: sync with OE.devJoshua Lock3
Most notable change is the move to creating symlinks to patches in the metadata tree rather than copying them. Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-06-10lib/oe/patch.py: Fix patch application failure interaction handlingRichard Purdie1
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-06-02do_distro_check: Recipe exists in other distros?Nitin A Kamble1
This adds a new task (distro_check) for each recipe. The task generates the source package list for Fedora OpenSuSE Ubuntu Debian & Mandriva Linux distros. As one recipe or source package can generate multiple target packages the recipe name is compared with the source package name list of LInux distributions. Thread locking is used to avoid multiple threads racing for the package list update. Then the recipe name (PN) is checked if it exists in the package list of distros. And if the DISTRO_PN_ALIAS then it is used to copmare pacakge_name instead of the PN variable. Just for example the DISTRO_PN_ALIAS can be defined in the recipe (.bb) files like this In the file xset_1.0.4.bb: DISTRO_PN_ALIAS = "Fedora=xorg-x11-server-utils;\ Ubuntu=x11-xserver-utils; Debian=x11-xserver-utils;Opensuse=xorg-x11" The final results are stored in the tmp/log/distro_check-${DATETIME}.result file. FYI this command will generate the results for all recipies: bitbake world -f -c distro_check Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2010-05-27lib/oe/patch.py: Fix datastore references in error pathsRichard Purdie1
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-05-06lib/oe: Import oe lib from OE.devJoshua Lock5
This library moves the common Python methods into modules of an 'oe' Python package. Signed-off-by: Joshua Lock <josh@linux.intel.com>