Michael 'Mickey' Lauer [Fri, 10 Jun 2005 20:59:09 +0000 (20:59 +0000)]
OO overhaul:
- Introduce classes for commands and the command processor
- Autoregister available commands
- Fix 'shell' command to work with unlimited number of parameters
- Remove 'exec' command
Michael 'Mickey' Lauer [Fri, 10 Jun 2005 09:20:28 +0000 (09:20 +0000)]
- capture bb.parse exception in 'filebuild'
- restore sys.stdout during raw_input, this repairs
tab completion which I broke two revisions ago
Michael 'Mickey' Lauer [Thu, 9 Jun 2005 18:03:25 +0000 (18:03 +0000)]
add 'shell <command>' which hands a command over to the shell and dumps the output
NOTE: Due to a limitation in the bbshell command processor, 'shell' and 'exec' are
currently broken when using more than one parameter. This will be sorted out asap.
Michael 'Mickey' Lauer [Thu, 9 Jun 2005 13:25:28 +0000 (13:25 +0000)]
Use socket.gethostname() instead of os.environ["HOST"]. That should work on all systems.
Michael 'Mickey' Lauer [Thu, 9 Jun 2005 13:11:42 +0000 (13:11 +0000)]
Greatly improve pastebin functionality:
The BitBake shell now features a generic output buffer for the last 10 commands.
You can dump an overview about the buffered commands with 'buffers' and dump
the contents of a buffer with 'buffer <n>'. Likewise, 'pastebin <n>' uploads
the contents of the said buffer. NOTE: 'lasterror' is still available, but has been
renamed to 'lastlog'. The old pastebin command is still available with 'pastelog'.
Michael 'Mickey' Lauer [Wed, 8 Jun 2005 17:30:37 +0000 (17:30 +0000)]
remove sys.exc_info() hack and instead use the magic .args variable of the exception instance variable
Michael 'Mickey' Lauer [Wed, 8 Jun 2005 17:29:51 +0000 (17:29 +0000)]
add pastebin command to upload the latest error log (if there is one)
Michael 'Mickey' Lauer [Wed, 8 Jun 2005 17:29:07 +0000 (17:29 +0000)]
- set magic args attribute for event exception
- remove event property
- submit descriptive error messages when raising event exceptions
Michael 'Mickey' Lauer [Tue, 7 Jun 2005 13:33:36 +0000 (13:33 +0000)]
build in a try/except block and intercept faulty builds
Holger Hans Peter Freyther [Mon, 6 Jun 2005 23:04:19 +0000 (23:04 +0000)]
bitbake/bin/bitdoc:
-Small utility to generate a Hyper Linked online version
out of documentation.conf.
An example can be found here:http://handhelds.org/~zecke/oe_html/
TODO:
-Beautify the HTML output (shameless rip off from gtkdoc)
-Sort the keys
-Fix and extend OpenEmbedded's documentation.conf to follow the
simple ruleset
KEY[doc] = "This is the description. It can go on \
@see MOO_RELATED, FOO_DOO, GRUFT, BLUR, TOCOTRONIC @group rock, POP \
NewWave"
It will extract the description, related keys (everything after @see
separated by ',') and the groups this key is in. This simple rules
should and could bring us forward.
Michael 'Mickey' Lauer [Fri, 3 Jun 2005 12:05:26 +0000 (12:05 +0000)]
catch build exceptions also when building just one file
Holger Hans Peter Freyther [Thu, 2 Jun 2005 20:22:55 +0000 (20:22 +0000)]
bitbake/bin/bitbake:
Rework handling of pkg_pn. I still wonder if we should
set pkg_pn[pn] at all in this method.
Patch courtsey proti
Michael 'Mickey' Lauer [Wed, 1 Jun 2005 14:08:52 +0000 (14:08 +0000)]
use cooker.findBestProvider() for the 'which' command
Holger Hans Peter Freyther [Tue, 31 May 2005 22:57:05 +0000 (22:57 +0000)]
bitbake/bin/bitbake:
Create a common method to get the preferred version
given a package name.
This patch was done by proti (seb BEI frankengul.org)
and made work by myself. The list in list logic does not
seem 'obvious' and I need to consider how to kill it.
(when I understand what the file_set should represent)
Michael 'Mickey' Lauer [Mon, 30 May 2005 22:10:10 +0000 (22:10 +0000)]
calculate absolute path when parsing a bitbake file. this fixes -b with
relative paths
Michael 'Mickey' Lauer [Mon, 30 May 2005 21:45:30 +0000 (21:45 +0000)]
fix stupid typo. this repairs bitbake -f
Michael 'Mickey' Lauer [Mon, 30 May 2005 19:30:22 +0000 (19:30 +0000)]
add ; as command seperator
unify error messages
add new <directory> <bbfile> command
Michael 'Mickey' Lauer [Mon, 30 May 2005 15:04:16 +0000 (15:04 +0000)]
add some more things to TODO
Michael 'Mickey' Lauer [Mon, 30 May 2005 14:57:28 +0000 (14:57 +0000)]
- fix bug in file*** commands (need to clean the _task_cache per
package)
- add fileRebuild (clean and rebuild a .bbfile)
Michael 'Mickey' Lauer [Mon, 30 May 2005 11:39:42 +0000 (11:39 +0000)]
remove accidantly commited debug line
Michael 'Mickey' Lauer [Sun, 29 May 2005 21:33:46 +0000 (21:33 +0000)]
major update:
- improve registerCommand
- build, clean, and rebuild no longer work on providees or bbfiles, but just on providees
- filebuild, fileclean and filerebuild work on bbfiles
- add which 'providee'
Michael 'Mickey' Lauer [Sun, 29 May 2005 21:29:31 +0000 (21:29 +0000)]
misc. refactoring bits for bin/bitbake:
- remove executeOneBB
- add tryBuildPackage
- add more docstrings
- less abbrevations
- s/buildPackage/buildProvider/
Holger Hans Peter Freyther [Sat, 28 May 2005 20:24:00 +0000 (20:24 +0000)]
bitbake/lib/bb/*:
include 'time' into the scope. For bitbake 1.3.1 we need
to define which modules will be visible when executing
embedded python methods
Holger Hans Peter Freyther [Sat, 28 May 2005 19:08:00 +0000 (19:08 +0000)]
bitbake/bin/bitbake:
update_data() of make.cfg after we've parsed the
each and every bitbake file.
Call me paranoid but this way we make sure that changes
made in the bb files are actually taken...
Michael 'Mickey' Lauer [Fri, 27 May 2005 16:00:52 +0000 (16:00 +0000)]
- add command specific tab completion
- add expert mode - an embedded python interpreter
- add exec command
Holger Hans Peter Freyther [Thu, 26 May 2005 19:00:30 +0000 (19:00 +0000)]
bitbake:
-Prepare the 1.3.0 release of bitbake
Michael 'Mickey' Lauer [Thu, 26 May 2005 14:59:58 +0000 (14:59 +0000)]
some fixes
Michael 'Mickey' Lauer [Thu, 26 May 2005 14:57:24 +0000 (14:57 +0000)]
catch parse error in parseConfigurationFile()
Michael 'Mickey' Lauer [Thu, 26 May 2005 13:26:12 +0000 (13:26 +0000)]
add bbfile completion
Michael 'Mickey' Lauer [Thu, 26 May 2005 13:25:30 +0000 (13:25 +0000)]
- remove checking for return if parse-only is set when executing just one BB
- don't sys.exit() for parse-only, but return. This makes dropping into the Python interactive mode possible.
Phil Blundell [Thu, 26 May 2005 12:30:02 +0000 (12:30 +0000)]
have bb.parse.handle() throw ParseError if the input file is not
understood by any handler, rather than quietly returning None
Michael 'Mickey' Lauer [Thu, 26 May 2005 11:36:20 +0000 (11:36 +0000)]
- add more commands: edit, clean, rebuild.
- load command history on startup
- save command history on exit
Bug: A bug can be seen when you call rebuild on a package more than once -
somehow the make module no longer calls the tasks then.
Michael 'Mickey' Lauer [Wed, 25 May 2005 22:02:46 +0000 (22:02 +0000)]
call update_data right after parsing the conf files
Michael 'Mickey' Lauer [Wed, 25 May 2005 21:55:06 +0000 (21:55 +0000)]
Python 2.3.x compatibility fix
Michael 'Mickey' Lauer [Wed, 25 May 2005 21:02:38 +0000 (21:02 +0000)]
add first (preview) version of the bitbake interactive mode
Michael 'Mickey' Lauer [Wed, 25 May 2005 21:02:11 +0000 (21:02 +0000)]
bitbake: factor out methods parseConfigurationFile() and handleCollections()
Phil Blundell [Wed, 25 May 2005 10:14:30 +0000 (10:14 +0000)]
tolerate ${...} in function names
Michael 'Mickey' Lauer [Tue, 24 May 2005 12:03:15 +0000 (12:03 +0000)]
Mickey's style and performance tunings, volume I:
* substitute 'if dictionary.has_key( key )' with 'if key in dictionary'
It's faster, more understandable and looks much better
Michael 'Mickey' Lauer [Mon, 23 May 2005 21:39:25 +0000 (21:39 +0000)]
update data to make _append's etc. appear. patch courtesy BB-Meister
Zecke
Holger Hans Peter Freyther [Mon, 23 May 2005 18:41:38 +0000 (18:41 +0000)]
bitbake/MANIFEST:
-Include data_smart.py in the MANIFEST
Holger Hans Peter Freyther [Mon, 23 May 2005 18:40:42 +0000 (18:40 +0000)]
bitbake/lib/bb module:
Bump the version number to be different from the
last version
Holger Hans Peter Freyther [Mon, 23 May 2005 18:39:43 +0000 (18:39 +0000)]
bitbake/TODO:
-Not much is done yet but at least fake that we've done
something
Michael 'Mickey' Lauer [Mon, 23 May 2005 16:53:40 +0000 (16:53 +0000)]
Slight OO refactoring of BitBake command line utility in order to
prepare for the BitBake shell which will need to have instance based
variables as opposed to module global ones.
Sorry, this diff is larger than it should be, but I had to reorder
methods and change indenting all over the place. What I basically did
is:
1.) Add a class managing the statistics values: BBStatistics
2.) Add a class managing the build process: BBCooker
3.) Refactor all unbound methods into the BBCooker class
4.) Refactor all module global values into the BBCooker class
5.) Adjust function calls and accesses of the module global values
accordingly
The shell module itself is under construction and will be uploaded asap.
Holger Hans Peter Freyther [Sun, 22 May 2005 22:41:43 +0000 (22:41 +0000)]
bitbake/bin/bitbake:
-Drastically increase the amount of needed RAM to the
unbelievable amount of 12MB when parsing ~2320 bb files.
-Start creating the provider hash and other lists/dictionaries
from the progressCallback. A BBStatusProgress struct was added
to accumulate the data to be used in the buildPackage, showVersions
and similiar methods.
This makes it possible to kill the long delay and also building the
provider hash completely.
Only for building and checking if a package was built (has stamps) it
is necessary to get the data instace from make.pkgdata.
Holger Hans Peter Freyther [Sun, 22 May 2005 22:35:19 +0000 (22:35 +0000)]
bitbake/ChangeLog:
-Mention changes in bitbake since the 1.2.1 release
Holger Hans Peter Freyther [Sun, 22 May 2005 19:44:39 +0000 (19:44 +0000)]
bitbake/lib/bb/make.py:
Pass more data to the parsing progressCallBack.
We will soon use this data to eliminate the long
delay before building.
bitbake/bin/bitbake:
Just change the signature of the callback method for now.
We will soon keep the 'parsing status' in a instance
we will fill while parsing and only evaluate in build_depgraph
Holger Hans Peter Freyther [Sat, 21 May 2005 13:53:38 +0000 (13:53 +0000)]
bitbake/lib/bb/data_smart.py:
-Do a deepcopy of the parent for the persistent
data storage constructor.
-Store the dict as _data member and not the instance
-Operate on the dict in the methods instead of the
DataSmart instances...
Happy deletion of the cache
Holger Hans Peter Freyther [Fri, 20 May 2005 21:51:03 +0000 (21:51 +0000)]
bitbake/lib/bb/fetch.py:
-be less anoying and only print debug messages when
d is none
Holger Hans Peter Freyther [Fri, 20 May 2005 19:39:59 +0000 (19:39 +0000)]
bitbake/lib/bb/fetch.py:
-Warn when init is called without a data instance, we're not able to reorder
them as it would break bitbake <= 1.2.1 and OpenEmbedded
bitbake/lib/bb/parse/BBHandler.py:
-Do not call fetch.init without a data instance. This changes the AtiCore
problem the OE folks are seeing a bit...
Holger Hans Peter Freyther [Fri, 20 May 2005 19:37:06 +0000 (19:37 +0000)]
bitbake/lib/bb/data.py:
-Don't be too keen finding a bug in expand when there is None...
Fix the testcase to delete {TARGET_MOO} first.
Holger Hans Peter Freyther [Fri, 20 May 2005 19:11:10 +0000 (19:11 +0000)]
bitbake/lib/bb/data.py:
-Write an expand test case that actually shows a bug I need to fix
Holger Hans Peter Freyther [Fri, 20 May 2005 18:55:41 +0000 (18:55 +0000)]
bitbake/lib/bb/data.py:
-Add two test cases to the expand method. The behaviour
was not tested before.
Holger Hans Peter Freyther [Fri, 20 May 2005 18:38:01 +0000 (18:38 +0000)]
bitbake/lib/bb/data.py:
-We've killed the default arguments in the methods
now the tests were updatet to initialize a data
instance to work again.
Holger Hans Peter Freyther [Fri, 20 May 2005 18:11:10 +0000 (18:11 +0000)]
bitbake/lib/bb/data_dict.py:
-Fix one bug in the unused data_dict.py. There is still one
left... again cookies for the one finding it
Holger Hans Peter Freyther [Fri, 20 May 2005 17:42:34 +0000 (17:42 +0000)]
bitbake/TODO:
Add basics tasks I want to see finished
Holger Hans Peter Freyther [Fri, 20 May 2005 11:43:37 +0000 (11:43 +0000)]
bitbake/lib/bb/data_smart.py:
Return only the mtime from the os.stat syscall
bitbake/lib/bb/data_dict.py:
Return only the mtime from the os.stat syscall
Holger Hans Peter Freyther [Wed, 18 May 2005 22:37:01 +0000 (22:37 +0000)]
tbake/lib/bb/fetch.py:
Stop sf.net from bull?#*... us. We will fail when we wanted to
download a file and got something with a different name.
This should solve sf.net related problems as we go immediately to
the next mirror and it should work for all other packages as well.
Holger Hans Peter Freyther [Wed, 18 May 2005 22:09:05 +0000 (22:09 +0000)]
bitbake/lib/bb/fetch.py
Try to partially apply
http://wiki.python.org/moin/PythonSpeed/PerformanceTips?highlight=%28performance%29#dots avoid
finding data in bb
Chris Larson [Wed, 18 May 2005 18:39:23 +0000 (18:39 +0000)]
Change the bb.__version__ to 1.2.1, and adjust setup.py to actually import the bb module to obtain the version it uses.
Holger Hans Peter Freyther [Wed, 18 May 2005 18:37:44 +0000 (18:37 +0000)]
bitbake/bin/bitbake:
Update the version to 1.2.1 (now a string)
Michael 'Mickey' Lauer [Wed, 18 May 2005 13:44:02 +0000 (13:44 +0000)]
add missing copyright and fix __ignored_dependencies scoping problem
Holger Hans Peter Freyther [Tue, 17 May 2005 22:55:10 +0000 (22:55 +0000)]
lib/bb/data.py:
Use the new data_smart dictionary
lib/bb/data_smart.py:
The old COW Implementation, made persistent and pass
the test suite.
I commit it because the persistent mode in data_dict.py seems
broken and I don't want to leave you with a broken bitbake.
Todo:
-do a deepcopy on the parent. When we pickle we use sharing
anyway and it is pretty obvious we will pickle as we're the
persistent implementation.
Holger Hans Peter Freyther [Tue, 17 May 2005 22:47:14 +0000 (22:47 +0000)]
lib/bb/data.py:
-Remove default arguments from the data methods. They
cast errors.
(we need to update the test case though)
lib/bb/parse/ConfHandler.py:
-Use the right dictionary
Holger Hans Peter Freyther [Tue, 17 May 2005 22:30:59 +0000 (22:30 +0000)]
bin/bitbake:
-Access pkgdata[] less. This means unpickling the data less often.
This results in a faster initial parsing. We still access each
file three times though
Holger Hans Peter Freyther [Tue, 17 May 2005 22:25:07 +0000 (22:25 +0000)]
lib/bb/data.py:
-Provide a special 'collection/dict' for the collected
bb-files. If we use a persistent storage (CACHE) we will
not hold any data instance in memory but load it from disk
on demand.
This reduces bitbakes memory usage to roughly 40MB. The initial
parsing currently takes roughly thirty seconds more.
lib/bb/make.py:
-Use the new data implementation for pkgdata.
-Do not access pkgdata[f] if we've the data already
in our hands
Michael 'Mickey' Lauer [Tue, 17 May 2005 22:22:38 +0000 (22:22 +0000)]
add authors file
Holger Hans Peter Freyther [Tue, 17 May 2005 22:20:02 +0000 (22:20 +0000)]
lib/bb/data.py:
· -Add a method to get the modify time of named bb.data instance
· -Add a method to create a named bb.data instance. These instances
· inherit the global configuration.
lib/bb/data_dict.py:
· -Add persistents to the data_dict implementation, on the commit
method we will now pickle the internal dict
lib/bb/make.py:
-Use the new persistent/named bb.data methods.
Holger Hans Peter Freyther [Tue, 17 May 2005 22:16:16 +0000 (22:16 +0000)]
lib/bb/build.py:
Do not assume we hold a reference to the variable
we got with a bb.data.getVar*. Always set changes
back to the variable.
Holger Hans Peter Freyther [Tue, 17 May 2005 22:02:04 +0000 (22:02 +0000)]
Add a ChangeLog to lay out the 'API' changes of bitbake
Holger Hans Peter Freyther [Tue, 17 May 2005 19:20:55 +0000 (19:20 +0000)]
lib/bb/fetch.py:
* Remove default params from the fetcher methods to avoid problems
with scoping. The meaning of 'd' is quite overloaded and we try
to undo it one by one. This change is a bit more invasive than
I had hoped for but it is needed.
-- Holger Hans Peter Freyther <freyther@handhelds.org>
Holger Hans Peter Freyther [Tue, 17 May 2005 18:16:03 +0000 (18:16 +0000)]
Add data_dict.py to the MANIFEST
Holger Hans Peter Freyther [Tue, 17 May 2005 18:15:25 +0000 (18:15 +0000)]
createCopy:
-Move a createCopy method into data.py
-Make code creating deepcopies of the data instance
use this new createCopy
Holger Hans Peter Freyther [Tue, 17 May 2005 18:04:46 +0000 (18:04 +0000)]
bitbake data module abstraction:
-bb.data is now a delegate to hookable Data implementation.
-bb.data.init() is the 'factory' method to create a instance
of a concrete implementation.
-Kill assumptions that bb.data.init() returns a {} (python dict)
-Add the old Dictionary Based Implementation as data_dict.py
Chris Larson [Fri, 11 Mar 2005 04:44:44 +0000 (04:44 +0000)]
Adjust the version in setup.py.
Phil Blundell [Sun, 23 Jan 2005 18:42:20 +0000 (18:42 +0000)]
Evaluate dependencies in try_build(), even if stamp file is up to date for the current package.
Chris Larson [Sat, 22 Jan 2005 05:50:23 +0000 (05:50 +0000)]
bin/bitbake:
* check if a package's task is already complete _before_
calling the functions to try to build it.
* don't bother trying to build a package's deps if the package has
already been built.
* cache the information about the 'perhaps you should define
PREFERRED_PROVIDER_blah' messages so that the user only sees one
for each provider.
Chris Larson [Mon, 17 Jan 2005 21:11:26 +0000 (21:11 +0000)]
Add -nochunks makefile targets for documentation generation (user's manual).
Chris Larson [Mon, 17 Jan 2005 20:37:42 +0000 (20:37 +0000)]
Unbork our event classes a bit. Added a 'data' property to the Build events to be more consistent with the other events.
Chris Larson [Mon, 17 Jan 2005 19:36:04 +0000 (19:36 +0000)]
As recommended by pb_ and RP, prepend the task name with 'task_' when mangling OVERRIDES in bb.data.exec_task().
Phil Blundell [Sun, 16 Jan 2005 23:18:20 +0000 (23:18 +0000)]
add current task name to OVERRIDES during execution
Chris Larson [Thu, 6 Jan 2005 21:38:18 +0000 (21:38 +0000)]
Test trigger alterations.
Chris Larson [Thu, 6 Jan 2005 21:37:05 +0000 (21:37 +0000)]
Test trigger alterations.
Phil Blundell [Sun, 2 Jan 2005 01:16:47 +0000 (01:16 +0000)]
correct transposed protocol/revision parameters to svn checkout;
patch courtesy Paul Eggleton
Phil Blundell [Mon, 27 Dec 2004 12:57:18 +0000 (12:57 +0000)]
emit_var(): if showing all vars, emit even those with invalid names
Chris Larson [Sun, 26 Dec 2004 06:01:39 +0000 (06:01 +0000)]
bbread: wrap the call to bb.data.emit_env() in a try: except block.
Chris Larson [Sun, 26 Dec 2004 01:32:08 +0000 (01:32 +0000)]
Remove references to 'BBMAKE' from the debug messages in the bitbake command.
Chris Larson [Sun, 26 Dec 2004 01:23:43 +0000 (01:23 +0000)]
Re-raise bb.build.FuncFailed if it's encountered in emit_var. This ensures that builds of packages that attempt to read the kernel-version file (like kernel modules) fail as they should.
Chris Larson [Fri, 24 Dec 2004 16:48:30 +0000 (16:48 +0000)]
Update the user manual -- add example usage of the bitbake command. add example usage of bbfile collections.
Chris Larson [Fri, 24 Dec 2004 00:58:43 +0000 (00:58 +0000)]
Add information on the bitbake command to the User Manual.
Chris Larson [Wed, 22 Dec 2004 23:04:35 +0000 (23:04 +0000)]
Handle the parse only cmdline option when using --buildfile.
Chris Larson [Wed, 22 Dec 2004 22:57:45 +0000 (22:57 +0000)]
Apply patch from Richard Purdie to fix the --force support in the bitbake script.
Marcin Juszkiewicz [Tue, 14 Dec 2004 18:37:07 +0000 (18:37 +0000)]
renamed to get less ambiguous name
Marcin Juszkiewicz [Mon, 13 Dec 2004 22:32:59 +0000 (22:32 +0000)]
fix building of one .bb file (-b parametr) - fix by pb
Chris Larson [Fri, 10 Dec 2004 21:57:53 +0000 (21:57 +0000)]
Set the 'url' in setup.py to our berlios.de project.
Chris Larson [Fri, 10 Dec 2004 02:23:20 +0000 (02:23 +0000)]
Clean out the cruft in the vim syntax.
Chris Larson [Fri, 10 Dec 2004 02:19:44 +0000 (02:19 +0000)]
Make bbread use bb.make.load_bbfile() rather than calling handle on the .bb itself.
Chris Larson [Thu, 9 Dec 2004 14:51:34 +0000 (14:51 +0000)]
Fix the install paths of our datafiles in setup.py.
Chris Larson [Thu, 9 Dec 2004 13:03:17 +0000 (13:03 +0000)]
Clean up the BBPATH mangling bits in the parser.
Chris Larson [Thu, 9 Dec 2004 12:40:43 +0000 (12:40 +0000)]
Fix the BBPATH mangling fix..
Chris Larson [Thu, 9 Dec 2004 12:32:18 +0000 (12:32 +0000)]
Add the location of the .bb file to BBPATH in the parser's handle() function rather than load_oefile, since we need it done for 'include'd files as well as those directly loaded by the 'bitbake' commandline tool.