]>
git.e2factory.org Git - e2factory.git/log
Tobias Ulmer [Wed, 26 Feb 2014 11:12:00 +0000 (12:12 +0100)]
Add getter/setter for info table
Doesn't have to be passed as an argument everywhere.
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Tue, 25 Feb 2014 13:18:39 +0000 (14:18 +0100)]
Don't pass main string package into protected environment
The string package can easily be manipulated or variable passed around
in it. Supply each protected environment with its own copy of the
table and only add functions that are considered safe.
Tobias Ulmer [Wed, 12 Feb 2014 17:50:04 +0000 (18:50 +0100)]
Invert resultid/pbuildid ftab error signaling mechanism
Error is now signaled by either false or nil, true to skip and
checksum for everything else. Improve the callback function names for
debug.log and traces. Add documentation all round.
This makes callbacks behave like every other function, instead of a
loaded gun pointing at foot...
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Wed, 12 Feb 2014 14:50:47 +0000 (15:50 +0100)]
Improve e2tool check_results() doc
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Wed, 12 Feb 2014 14:35:18 +0000 (15:35 +0100)]
Allow returning error from e2tool.dlist()
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Wed, 12 Feb 2014 14:21:54 +0000 (15:21 +0100)]
Missed return false to error() conversion
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Wed, 12 Feb 2014 14:10:18 +0000 (15:10 +0100)]
Remove some locals
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Tue, 11 Feb 2014 17:42:43 +0000 (18:42 +0100)]
Split chroot config into own module and class
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Tue, 11 Feb 2014 14:02:39 +0000 (15:02 +0100)]
Remove unused load functions in load_user_config2()
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Tue, 11 Feb 2014 13:52:47 +0000 (14:52 +0100)]
Initialize the cache early
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Mon, 10 Feb 2014 19:21:04 +0000 (20:21 +0100)]
Remove info.chroot.groups and clean up
info.chroot.group_byname contains the same groups. Merge duplicate
documentation, lock most chroot tables, consistently use ipairs().
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Mon, 10 Feb 2014 18:29:10 +0000 (19:29 +0100)]
Simplify chroot setup by dropping build_config.groups
Use chroot groups of the result instead of going through
build_config.groups. Make sure res.chroot is sorted independent of
proj/chroot.
Previously we did a complicated dance adding all required groups to a
build_config dict and then iterated over the entire chroot table. The
order in which chroot groups were untared did depend on the order of
appearance in proj/chroot.
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Fri, 7 Feb 2014 17:59:33 +0000 (18:59 +0100)]
Change pcall to e2lib.trycall, a wrapper with more debug information
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Thu, 6 Feb 2014 19:09:24 +0000 (20:09 +0100)]
Whoops, the -f in git checkout was missing
Works so much better now...
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Thu, 6 Feb 2014 19:02:34 +0000 (20:02 +0100)]
Log all external commands at debug level
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Thu, 6 Feb 2014 18:45:54 +0000 (19:45 +0100)]
Add missed return false on error
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Thu, 6 Feb 2014 17:04:37 +0000 (18:04 +0100)]
Make dofile2() more strict, improving config file error detection
The capability to disallow global variables and reading undefined
variables in configs existed for a long time but was not enabled for
most files... Implements bz#127
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Thu, 6 Feb 2014 11:13:40 +0000 (12:13 +0100)]
LicenceID includes the licence name
Makes no sense to hash it twice. Fixes bz#124
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Wed, 5 Feb 2014 14:24:44 +0000 (15:24 +0100)]
Create licence class and move all licence handling into own module
In addition to all the motions of moving licence out of e2tool, the
following bugs should be fixed in this commit:
svn plugin: Fix bz#123, include LicenceID in SourceID calculation
cvs plugin: Fix bz#126, backtrace when calculating LicenceID
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Wed, 5 Feb 2014 14:12:59 +0000 (15:12 +0100)]
Add or move generic table/attribute verification functions to e2lib
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Thu, 30 Jan 2014 17:31:14 +0000 (18:31 +0100)]
install class.lua
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Wed, 5 Feb 2014 14:03:41 +0000 (15:03 +0100)]
Add ldoc header for middleclass
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Thu, 30 Jan 2014 17:29:08 +0000 (18:29 +0100)]
add middleclass
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Wed, 5 Feb 2014 18:03:49 +0000 (19:03 +0100)]
strict: point error to the stack frame where it occurred
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Thu, 30 Jan 2014 18:53:29 +0000 (19:53 +0100)]
files: error out if the unpack location doesn't exist after unpacking
A mistake here leads to a confusing error message that is by itself
correct, but hard to understand for the user.
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Mon, 3 Feb 2014 16:51:16 +0000 (17:51 +0100)]
Run e2 tools in protected mode, allowing for use of error()
Convert the top level error handling to error(). Not buying us much as
of now, but it's a start.
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Thu, 30 Jan 2014 18:41:08 +0000 (19:41 +0100)]
Move check_project_info into collect_project_info
The distinction makes little sense now, since collect_project_info also
does a lot of checking.
One less step for local tools required
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Mon, 27 Jan 2014 19:31:21 +0000 (20:31 +0100)]
Remove a couple of chroot fields that don't exist any more
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Fri, 24 Jan 2014 16:14:30 +0000 (17:14 +0100)]
Only 6 X are replaced in by mktemp... functions, shorten
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Fri, 24 Jan 2014 16:13:58 +0000 (17:13 +0100)]
Document rsync version requirement
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Thu, 23 Jan 2014 18:48:41 +0000 (19:48 +0100)]
Cleanup collect_project, document, add pbuildid fn...
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Thu, 23 Jan 2014 18:47:23 +0000 (19:47 +0100)]
e2tool: Remove remnants of collect_project
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Wed, 22 Jan 2014 20:06:07 +0000 (21:06 +0100)]
Move collect_project resultid calculation out of e2tool
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Wed, 22 Jan 2014 20:04:44 +0000 (21:04 +0100)]
Add note about what return values resultid() expects
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Wed, 22 Jan 2014 18:54:58 +0000 (19:54 +0100)]
There is no r.pseudo_result field anywhere...
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Wed, 22 Jan 2014 18:54:08 +0000 (19:54 +0100)]
Document e2tool.dsort()
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Wed, 22 Jan 2014 18:51:45 +0000 (19:51 +0100)]
Document e2tool.dlist_recursive() and clarify the code
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Wed, 22 Jan 2014 18:50:02 +0000 (19:50 +0100)]
Improve documentation, mostly error cases
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Wed, 22 Jan 2014 18:45:36 +0000 (19:45 +0100)]
Remove nil in return and error statements
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Wed, 22 Jan 2014 14:26:31 +0000 (15:26 +0100)]
Remove some left over error handling
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Wed, 22 Jan 2014 13:29:11 +0000 (14:29 +0100)]
Don't use stdio to deal with pipes.
Buffering and attempts to loop until a buffer is filled make it
a pain to work with.
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Tue, 21 Jan 2014 19:02:33 +0000 (20:02 +0100)]
eio: add read, write and close, return file descriptor from pipe()
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Tue, 21 Jan 2014 18:58:48 +0000 (19:58 +0100)]
Add read, write, and close wrapers
Stdio only works well with regular files. For pipes, the native syscalls
work much better.
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Tue, 21 Jan 2014 18:52:49 +0000 (19:52 +0100)]
Plug small memory leak in case of poll error
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Tue, 21 Jan 2014 18:51:13 +0000 (19:51 +0100)]
Reduce and refine tracing a bit
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Tue, 21 Jan 2014 18:46:17 +0000 (19:46 +0100)]
Fix collect_project, add missing info.cache argument
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Thu, 16 Jan 2014 19:22:38 +0000 (20:22 +0100)]
Adjust callcmd() to the new poll() interface
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Thu, 16 Jan 2014 17:23:26 +0000 (18:23 +0100)]
Change and extend e2lib.poll() interface
Instead of a single pos in the fdvec table, return a table of all
selected file descriptors. Allows handling more than one active file
descriptor in one go.
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Thu, 16 Jan 2014 17:07:34 +0000 (18:07 +0100)]
Check whether symlink exists, not the destination
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Thu, 16 Jan 2014 12:21:00 +0000 (13:21 +0100)]
Synchronise parent/child in callcmd()
Prevent poll() from running before all file descriptors are set up
and debug logging is disabled in the child.
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Thu, 16 Jan 2014 11:45:54 +0000 (12:45 +0100)]
Fix call to warnf() without category
The warning about optional tools can be a WHINT, no need to complain all
the time about something that is optional.
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Wed, 15 Jan 2014 19:16:52 +0000 (20:16 +0100)]
Fix use after free in poll
Been there since the beginning of (e2factory) time.
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Wed, 15 Jan 2014 18:30:13 +0000 (19:30 +0100)]
Disable write buffering on pipe file object
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Wed, 15 Jan 2014 18:29:34 +0000 (19:29 +0100)]
Add eio.setunbuffered()
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Sun, 12 Jan 2014 03:19:42 +0000 (04:19 +0100)]
Turn collect_project feature into a plugin
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Sun, 12 Jan 2014 03:05:22 +0000 (04:05 +0100)]
Allow calling e2build.write_build_driver()
Useful for plugins.
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Sun, 12 Jan 2014 03:02:21 +0000 (04:02 +0100)]
environment: add tofile function
tofile() creates a shell-sourceable file containing the environment.
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Fri, 10 Jan 2014 18:57:06 +0000 (19:57 +0100)]
Remove documentation for export field in result
Can't find a reference to it anywhere.
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Fri, 10 Jan 2014 18:23:08 +0000 (19:23 +0100)]
info.ftab should be private to e2tool
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Wed, 8 Jan 2014 19:11:29 +0000 (20:11 +0100)]
Remove select_result() and merge code with select_results()
No functional change.
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Wed, 8 Jan 2014 17:43:42 +0000 (18:43 +0100)]
Make load_source_config() plural and add documentation
Reflect that this function loads all source configs into the info table.
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Wed, 8 Jan 2014 17:38:21 +0000 (18:38 +0100)]
Make load_result_config() plural and add documentation
Reflect that this function loads all result configs into the info table.
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Fri, 13 Dec 2013 17:08:03 +0000 (18:08 +0100)]
Make e2tool.get_depends() local, e2tool.dlist should be used instead
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Fri, 13 Dec 2013 17:05:32 +0000 (18:05 +0100)]
e2build: Get dependencies via the extendable e2tool.dlist
I can't see a reason why it's calling e2tool.get_depends directly.
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Fri, 13 Dec 2013 14:30:55 +0000 (15:30 +0100)]
Remove missleading and unused info.build_mode
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Fri, 13 Dec 2013 14:29:18 +0000 (15:29 +0100)]
Remove missleading and unused info.build_modes
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Fri, 13 Dec 2013 14:21:57 +0000 (15:21 +0100)]
Add ldoc comment todo markers, make them show up at least
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Thu, 12 Dec 2013 18:01:43 +0000 (19:01 +0100)]
Enable optimization
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Thu, 12 Dec 2013 16:02:29 +0000 (17:02 +0100)]
Explicitly require and use the cache module
cache metatable is gone.
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Thu, 12 Dec 2013 15:52:03 +0000 (16:52 +0100)]
Cache: remove metatable and clean up
* Remove meta table, forcing grep-able code
* Mark cache table fields private
* lock cache and cache entry tables
* Consistently return false on errors
* Turn ce_by_server() into a dict table lookup
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Thu, 12 Dec 2013 15:48:19 +0000 (16:48 +0100)]
Clean up projid()
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Wed, 11 Dec 2013 16:22:12 +0000 (17:22 +0100)]
info.servers doesn't seem to exist any more, remove
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Wed, 11 Dec 2013 16:16:15 +0000 (17:16 +0100)]
Fix typo
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Tue, 10 Dec 2013 20:34:26 +0000 (21:34 +0100)]
Remove dead code
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Tue, 10 Dec 2013 20:26:46 +0000 (21:26 +0100)]
Integrate hashcache into hash module
Use hash_file_once() most everywhere. Hashcache keeps track of number of
cache hits and limits the cache to the 1000 most used.
It's also much more strict in what is considered a match.
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Fri, 6 Dec 2013 17:53:37 +0000 (18:53 +0100)]
e2tool: Remove hash_path() and use hash.hash_file_once instead
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Fri, 6 Dec 2013 17:53:17 +0000 (18:53 +0100)]
hash: Add hash_file_once() which does all the hash context work
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Fri, 6 Dec 2013 16:37:25 +0000 (17:37 +0100)]
tools: Remove tools that are no longer called directly
sha1sum, md5sum, cat, uname, and bzip2
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Fri, 6 Dec 2013 14:34:44 +0000 (15:34 +0100)]
transport: Fix wrong documentation for file_path()
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Fri, 6 Dec 2013 14:26:42 +0000 (15:26 +0100)]
transport: in fetch_file, improve doc and remove strange tmp path splitting
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Fri, 6 Dec 2013 14:22:17 +0000 (15:22 +0100)]
cache: transport.fetch_file does not take a flags argument
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Fri, 6 Dec 2013 14:20:02 +0000 (15:20 +0100)]
git: cosmetic cleanup
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Fri, 6 Dec 2013 13:50:48 +0000 (14:50 +0100)]
e2tool: Convert to absolute paths and remove e2tool.lcd()
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Fri, 6 Dec 2013 13:48:15 +0000 (14:48 +0100)]
e2-cf: Use absolute paths everywhere
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Fri, 6 Dec 2013 13:45:27 +0000 (14:45 +0100)]
e2build: Remove all chdir() games and deal with absolute paths only
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Fri, 6 Dec 2013 13:43:30 +0000 (14:43 +0100)]
e2tool: extend resultdir(), sourceconfig() and friends by an optional prefix
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Fri, 6 Dec 2013 13:33:22 +0000 (14:33 +0100)]
Add workdir argument to svn_tool() and use it
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Fri, 6 Dec 2013 13:34:49 +0000 (14:34 +0100)]
Extend e2lib.call_tool_argv() with optional workdir and envdict args
Both are passed to callcmd()
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Fri, 6 Dec 2013 13:30:42 +0000 (14:30 +0100)]
Correct write_extension_config() doc comment
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Fri, 6 Dec 2013 13:26:12 +0000 (14:26 +0100)]
fetch-project: Fix absolute destination paths
Bug introduced in
6d3d6f5de9c9667c4e679909b2a34590a89c18bb on
Thu Oct 31 21:29:36 2013 +0100. Didn't make it into a release.
A testcase has been created for this problem.
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Wed, 4 Dec 2013 15:16:13 +0000 (16:16 +0100)]
Stop changing directory in e2-install-e2
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Wed, 4 Dec 2013 15:14:03 +0000 (16:14 +0100)]
No need for chdir in fetch-project
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Wed, 4 Dec 2013 14:52:44 +0000 (15:52 +0100)]
Read/write global_interface_version_file from an absolute path
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Wed, 4 Dec 2013 14:42:24 +0000 (15:42 +0100)]
Define syntax_file global and use it
Removes another static field from the info table.
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Wed, 4 Dec 2013 14:20:39 +0000 (15:20 +0100)]
Use e2lib.parse_e2versionfile() instead of hand-rolled code
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Wed, 4 Dec 2013 14:17:12 +0000 (15:17 +0100)]
Extend e2lib.read_extension_config()
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Wed, 4 Dec 2013 13:23:39 +0000 (14:23 +0100)]
Provide global for e2version file and use it
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Wed, 4 Dec 2013 12:14:57 +0000 (13:14 +0100)]
Provide global for project-location and use it
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Wed, 4 Dec 2013 02:34:38 +0000 (03:34 +0100)]
e2-create-project: use absolute paths instead of chdir
Signed-off-by: Tobias Ulmer <tu@emlix.com>
Tobias Ulmer [Tue, 3 Dec 2013 18:19:27 +0000 (19:19 +0100)]
parse_server_location: improve doc, lock table, fix return errors
Signed-off-by: Tobias Ulmer <tu@emlix.com>