aboutsummaryrefslogtreecommitdiffstats
path: root/lib/swupd/path.py
AgeCommit message (Collapse)Author
2016-12-08path.py: better error handling in copyxattrfiles()Patrick Ohly
When the first tar in a pipe fails, its error code is getting lost. Detect that by checking for output: normally, all operations should be silent, so if there is output, something unusual happened. This also catches warnings. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2016-12-08swupd input: compress with gzPatrick Ohly
Compression with xz is slowing down do_stage_swupd_inputs (on the critical path) by keeping one CPU 100% with xz. gzip compresses faster and (at least for now) on-disk usage matters less than speed. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2016-12-08meta-swupd: put compressed rootfs into sstatePatrick Ohly
do_stage_swupd_updates works with the entire full tree multiple times: copying into the staging area, packing it as sstate archive, copying to the swupd deploy directory. Copying directory trees is slow, in particular when running under pseudo, and do_stage_swupd_updates is on the critical path for completing a build. Therefore it should be as fast as possible. Storing the directory as compressed archive is faster: it cuts down the time for do_stage_swupd_updates from 11min in the Ostro CI to 6min. This is with xz as compression method, which is suitable for long-term archival (good compression) but a lot slower than gzip (https://www.rootusers.com/gzip-vs-bzip2-vs-xz-performance-comparison/). When favoring speed, using gzip may be better. The long-term goal (dream?) is to have swupd work directly with tar archives, in which case expanding the archive and pseudo could be avoided altogether. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2016-07-04Drop use of oe.path.check_output()Joshua Lock
This was a copy-and-paste of the check_output() method of the subprocess module in order to support Python versions prior to 2.7 -- we should just use the method from subprocess directly. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2016-06-13lib/swupd/path: use tempfile for temporary file creationJoshua Lock
Use tempfile.mkstemp() from the standard library, rather than our own logic, to create a unique filename in workdir to use as the copyfile for the tar operation. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2016-06-13lib/swupd/path: add method to copy a directory preserving attributesJoshua Lock
The copyxattrtree() method will copy the entire contents of the src directory to dst preserving extended attributes on files. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2016-06-13lib/swupd: add docstrings for all methodsJoshua Lock
Consistently use docstrings for documenting methods in lib/swupd/* and ensure every method is documented. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2016-06-01swupd-image: move various helper methods to lib/swupd moduleJoshua Lock
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>