Skip to content
This repository has been archived by the owner on Apr 19, 2019. It is now read-only.

test build with meta-swupd and new images #25

Closed
wants to merge 194 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
194 commits
Select commit Hold shift + click to select a range
4684081
meta-swupd: Initial population
joshuagl Feb 25, 2016
920244f
meta-swupd: swupd-image: remove the shared pseudo database after runn…
joshuagl Feb 25, 2016
7c2de30
meta-swupd: swupd-image: remove transient virtual image output
joshuagl Feb 25, 2016
e0e27b0
meta-swupd: swupd-image: preserve 'mega' as a reserved bundle name
joshuagl Feb 25, 2016
b25b85f
meta-swupd: swupd-image: populate bundles and base image rootfs from …
joshuagl Feb 29, 2016
97644dd
meta-swupd: swupd-image: remove commented out logic
joshuagl Mar 3, 2016
8b4f14e
meta-swupd: swupdbundle: don't raise an error if SWUPD_BUNDLES is empty
joshuagl Mar 7, 2016
1bb917c
meta-swupd: swupd-image: fix debugging statement
joshuagl Mar 8, 2016
b8b6ddb
meta-swupd: swupd-client: don't generate mega image when SWUPD_BUNDLE…
joshuagl Mar 10, 2016
7df28ff
meta-swupd: swupd-server: Add patch fixing freeing dangling pointers
Mar 14, 2016
746c51c
meta-swupd: swupd-image: various code enhancements
joshuagl Mar 14, 2016
8cf3597
meta-swupd: swupd-image: pass expand parameter to all getVar() calls
joshuagl Mar 16, 2016
7bb4a67
meta-swupd: Remove editor backup files
joshuagl Mar 21, 2016
7617c66
meta-swupd: swupd-image: preserve xattrs when copying files
joshuagl Mar 17, 2016
f519010
meta-swupd: swupd-server: always use xattrs when calculating hashes
joshuagl Mar 21, 2016
725c8c7
meta-swupd: swupd-image: ensure the groups.ini is always created
joshuagl Mar 21, 2016
98ba786
meta-swupd: swupd-image: factor out method to create bundle subscript…
joshuagl Mar 21, 2016
5d6aaba
meta-swupd: swupd-image: unify logic for copying from mega rootfs
joshuagl Mar 21, 2016
0d16dea
meta-swupd: virtual image recipes: reduce polution of the recipe name…
pohly Mar 18, 2016
450100d
meta-swupd: virtual image recipes: stop generating images
pohly Mar 18, 2016
14a5ae1
meta-swupd: swupd images: support creating images that contain os-cor…
pohly Mar 18, 2016
64c85f7
meta-swupd: swupd-image.bbclass: work around pseudo hardlink issue
pohly Mar 22, 2016
d581c64
meta-swupd: swupd-image: preserve permissions in copyxattrtree
Mar 22, 2016
9725078
meta-swupd: swupd-image: remove manifests for bundle images
joshuagl Mar 23, 2016
df29446
meta-swupd: Add initial documentation
joshuagl Mar 23, 2016
2b07e78
meta-swupd: swupd-image: delete some detailed documentation comments
joshuagl Mar 23, 2016
b4e355c
meta-swupd: layer.conf: exclude bash dependency from oe-swupd-helpers…
joshuagl Mar 23, 2016
241a81f
meta-swupd: swupd-image: fix bundle image manifest removal
joshuagl Mar 24, 2016
efc12a2
meta-swupd: swupd-image: don't remove bundle image manifests
joshuagl Mar 29, 2016
070bbd6
meta-swupd: bundle images: create .rootfs.manifest
pohly Mar 27, 2016
9e0b9bd
meta-swupd: swupdbundle.bbclass: support -dev bundles
pohly Mar 29, 2016
fe37f50
meta-swupd: swupd-client: Tweak os-release to conform ClearLinux format
Mar 24, 2016
a967747
meta-swupd: swupd-client: Update Upstream-Status for Fix-build-failur…
Mar 30, 2016
9a66e4d
meta-swupd: swupd-client: Update patch fixing quotes in os-release
Mar 30, 2016
ff3b601
meta-swupd: libarchive: Enable xz and xattrs in native builds
Mar 23, 2016
b1272b2
meta-swupd: swupd-client: Update the client and server to use bsdtar
Mar 23, 2016
15f1f87
meta-swupd: swupd-server: work around pseudo xattr hardlink bug
pohly Mar 30, 2016
9a7bc78
meta-swupd: swupd-image.bbclass: remove assumption about OS version n…
pohly Mar 30, 2016
c711530
meta-swupd: swupd-image: make debugging function for long-running tas…
joshuagl Apr 4, 2016
eaff8ee
meta-swupd: os-release: patch in OS_VERSION during rootfs creation
pohly Mar 31, 2016
f93d939
meta-swupd: bsdiff: add new recipe
joshuagl Mar 7, 2016
b1ddb18
meta-swupd: swupd-server: add recipe for 3.1.2
joshuagl Mar 7, 2016
ef94233
meta-swupd: swupd-client: add recipe for 3.3.0
joshuagl Mar 7, 2016
2a63a12
meta-swupd: swupd-image.bbclass: always update rootfs of base image
pohly Apr 6, 2016
2be2523
meta-swupd: swupd-image.bbclass: fix remove of symlinks to directories
pohly Apr 6, 2016
e2df7ba
meta-swupd: swupd-server: better align 3.1.2 recipe with 2.53 recipe
joshuagl Apr 6, 2016
80ee956
meta-swupd: swupd-client: better align 3.3.0 recipe with 2.87 recipe
joshuagl Apr 6, 2016
0784889
meta-swupd: swupd-image: make the swupd format number a variable
joshuagl Apr 6, 2016
c8a0057
meta-swupd: swupd-client: move 2.87 specific patches to 2.87 directory
joshuagl Apr 7, 2016
f59de38
externalsrc: avoid race in temporary git index file
marquiz Apr 5, 2016
a17ce3e
license.bbclass: fix warnings when run in unprivileged "container" env
bjornfor Apr 4, 2016
9c83aa2
scripts/oe-buildenv-internal: Fix regression in BB_ENV_EXTRAWHITE set…
otavio Apr 4, 2016
25f5ee8
sanity: Increase minimum git version to 1.8.3.1
rpurdie Apr 5, 2016
016c06c
xf86-video-intel: Add patch to fix some poor image quality
Apr 5, 2016
a699e43
package: do_split_packages: expand variables in extra_depends
rossburton Apr 5, 2016
dabd425
gstreamer: remove now-redundant expansion in do_split_packages
rossburton Apr 5, 2016
89da2b1
patch.bbclass: remove useless path assignment
Apr 5, 2016
cc110d3
scripts/oe-selftest: remove unneeded coverage warning
ibarraJhumberto Apr 6, 2016
9f1a0c9
scripts/oe-selftest: remove coverage file if any coverage option is g…
ibarraJhumberto Apr 6, 2016
81509b1
scripts/oe-selftest: avoid the creation of coverage file when coverag…
ibarraJhumberto Apr 6, 2016
1ab65e4
useradd.bbclass: remove user/group created by the package in clean* task
maxinbjohn Apr 6, 2016
437e6a6
bzip2: set correct soname
rossburton Apr 5, 2016
2c4988e
ffmpeg: Make configure options explicit
Apr 6, 2016
ecb7bf9
ffmpeg, gstreamer1.0-libav: add textrel INSANE_SKIPs
Apr 6, 2016
025a240
rpm: remove two unused patch
robertlinux Apr 6, 2016
91017ad
tcl: remove unused fix-configure.patch
robertlinux Apr 6, 2016
4ef26c6
cmake: remove unused dont-run-cross-binaries.patch
robertlinux Apr 6, 2016
f4f7a21
clutter-gst-3.0: remove unused enable-tests.patch
robertlinux Apr 6, 2016
70e3234
glibc: remove unused CVE patches
robertlinux Apr 6, 2016
0a25f84
grub: remove unused 0001-Fix-build-with-glibc-2.20.patch
robertlinux Apr 6, 2016
82f465a
sanity.bbclass: fix a hardcode in check_path_length()
robertlinux Apr 6, 2016
fc378ad
wget: fix build when len(TMPDIR) == 410
robertlinux Apr 6, 2016
941a5c5
create-pull-request: fix for newer git
robertlinux Apr 6, 2016
0636336
libtool: fix contaminated path to lt_truncate_bin
Apr 5, 2016
f646a8a
runqemu-gen-tapdevs: Add note about NetworkManager & tap devices
Apr 5, 2016
196b2fa
image_types: use compress framework to produce checksums for images
kad Mar 24, 2016
c3b3b8c
build-appliance-image: Update to master head revision
rpurdie Apr 6, 2016
5f49291
build-appliance-image: Update to master head revision
rpurdie Apr 6, 2016
d9b579d
build-appliance-image: Update to master head revision
rpurdie Apr 6, 2016
448c63b
meta-yocto: poky.conf: Bump version for 2.1.0 krogoth release
rpurdie Apr 6, 2016
d290883
meta-yocto: poky: Convetion is 2.1, not 2.1.0
rpurdie Apr 6, 2016
3cda9af
meta-yocto: toasterconf.json: Add DL_DIR and SSTATE_DIR to poky toast…
sharidasan Apr 6, 2016
debe9df
bitbake: persist_data: Return str instead of unicode for sqlite3 text…
dkl Apr 5, 2016
e463202
bitbake: fetch2/git.py: remove .indirectiondir workaround
robertlinux Apr 5, 2016
a38a17e
bitbake: toaster: don't start bitbake server
Apr 6, 2016
de41624
bitbake: toaster: get rid of noui option
Apr 6, 2016
0a4197f
bitbake: toaster: set BITBAKE_UI environment variable
Apr 6, 2016
c2844c0
bitbake: toasterui: add brbe parameter to buildinfohelper
Apr 6, 2016
6ec7c04
bitbake: uievent: improve BBUIEventQueue code
Apr 6, 2016
896a4ff
bitbake: buildinfohelper: improve handling of providermap
Apr 6, 2016
12b7763
bitbake: toasterui: fix brbe reporting
Apr 6, 2016
d4f05d7
bitbake: toaster: remove startBBServer API
Apr 6, 2016
561c532
bitbake: toaster: remove release API
Apr 6, 2016
379a33a
bitbake: toaster: add brbe parameter to triggerBuild
Apr 6, 2016
c6e6142
bitbake: toaster: modified setLayers API
Apr 6, 2016
8e40437
bitbake: toaster: reimplement triggerBuild
Apr 6, 2016
5fd1011
bitbake: toaster: add new parameter to _shellcmd
Apr 6, 2016
6af85aa
bitbake: toaster: stop bitbake server after the build
Apr 6, 2016
346a0fa
bitbake: toaster: update conf/local.conf
Apr 6, 2016
b731707
bitbake: toaster: fix jethro build
Apr 6, 2016
ee6c318
bitbake: toaster: use bash explicitly
Apr 6, 2016
0ef9d78
bitbake: toasterui: shutdown on BuildCompleted event
Apr 6, 2016
ee58b38
bitbake: toaster: bldcontrol Add forceShutDown function to BitbakeCon…
sharidasan Apr 6, 2016
89c3dac
bitbake: toaster: Move xhr calls for starting and stopping builds
Apr 6, 2016
a198c2d
bitbake: toaster: xhr Update the implementation of the build cancella…
Apr 6, 2016
c261e79
bitbake: toaster: libtoaster Update implementation of startABuild and…
Apr 6, 2016
972d1b9
bitbake: toaster: update BuildEnvironmentController and BitbakeContro…
sharidasan Apr 6, 2016
2d4c73d
bitbake: toaster: models Add cancelled state to build outcome
sharidasan Apr 6, 2016
3736a2e
bitbake: toaster: bldcontrol models Add a cancelling state the BuildR…
Apr 6, 2016
3585052
bitbake: buildinfohelper: Add handler for cancelling a build
Apr 6, 2016
c1d848c
bitbake: toaster: tables BuildsTable exclude cancelled builds
sharidasan Apr 6, 2016
f4732b9
bitbake: toaster: mrb_section template Add build cancel button
Apr 6, 2016
ed22a21
bitbake: toaster: models Exclude the CANCELLED builds from get_number…
Apr 6, 2016
ac1e7fe
bitbake: toaster: runbuilds Make runbuilds aware of the build CANCELL…
Apr 6, 2016
331aa37
bitbake: toaster: runbuilds Clean up runbuilds
Apr 6, 2016
6a953b1
bitbake: toaster: use empty token
Apr 6, 2016
d9a04c5
bitbake: toaster: update view to support DL_DIR and SSTATE_DIR
sharidasan Apr 6, 2016
5ac3669
bitbake: toaster: update projectconf.html for DL_DIR and SSTATE_DIR
sharidasan Apr 6, 2016
a5e51bc
bitbake: toaster: export BBBASEDIR variable
Apr 6, 2016
ede272c
bitbake: toaster: get bitbake location from BBBASEDIR
Apr 6, 2016
b9975b3
bitbake: buildinfohelper: fix KeyError
Apr 6, 2016
bc03dc0
bitbake: toasterui: update build in internal state
Apr 6, 2016
7879216
bitbake: buildinfohelper: work around unicode exceptions
joshuagl Apr 6, 2016
f7630fa
bitbake: toaster: add rev dep column to image detail pages
Apr 6, 2016
d71d043
bitbake: toaster: Add quint to project so that it can be used offline
Apr 1, 2016
a1c53cd
bitbake: toaster: tests Set MACHINE for the test projects
Apr 1, 2016
0f16431
bitbake: toaster: views jsunittest Add MACHINE and an extra layer to …
Apr 4, 2016
43e4bbd
bitbake: tests: browser Add test to run the js unit tests
Apr 4, 2016
9621987
bitbake: update LICENSE file with QUnit details
townxelliot Apr 6, 2016
62a5082
bitbake: Update version to 1.30.0
rpurdie Apr 6, 2016
71a2dfb
meta-soletta: soletta-dev-app: update to 1_beta7
Apr 1, 2016
b3f5f72
meta-ostro-bsp: linux-yocto: move corei7-64 SRCREV ahead for BXT
jlaako Apr 4, 2016
9f74c83
meta-ostro-bsp: Use ostro-6lowpan package to configure the 802.15.4
yongli3 Mar 28, 2016
d0613c6
meta-ostro: image-dsk.bbclass: fix INITRD content bug when producing …
pohly Mar 29, 2016
784e278
meta-ostro: image-dsk.bbclass: include microcode in initrd again
pohly Apr 1, 2016
7791b5f
meta-ostro: DOC: hardware docs edit
dbkinder Apr 5, 2016
6616e01
meta-ostro: DOC: spelling fixes for disk layout
dbkinder Apr 6, 2016
e07fd92
meta-ostro: ostro-image.bb: avoid task hash mismatch
pohly Apr 6, 2016
08b6eef
meta-ostro: ostroproject-ci: enabler for flexible automatic testing
kad Apr 6, 2016
738d0bd
meta-ostro: bmap-tools: utility to create block map files
kad Mar 18, 2016
ab7e635
meta-ostro: image-dsk: PEP8 cleanup
kad Mar 25, 2016
33fccc3
meta-ostro: image-dsk: Use bmap-tools Python library for sparse files…
kad Apr 7, 2016
3b7950b
meta-ostro: bmap-tools: updated booting and flashing documentation
dbkinder Mar 30, 2016
390d887
meta-ostro: ostroproject-ci: generate bmap and checksums
kad Mar 24, 2016
4dfb6c9
meta-ostro: image-dsk: create additional image conversion types
kad Mar 18, 2016
a11a6d6
meta-iotqa: add case_interface in utils
junhuizx Apr 1, 2016
06a1590
meta-iotqa: bsp/edison.py: add the FVT for IOTOS-1463
otcyanglei Apr 1, 2016
103ab96
meta-iotqa: [restapi] Kill the ocserver after run tests
Apr 5, 2016
3fe4c9d
meta-iotqa: manual.csv: update secure boot manual tests
Apr 5, 2016
5e30cb4
meta-iotqa: test-iot: eliminate EXTRA_IMAGEDEPENDS
pohly Apr 5, 2016
31069bb
meta-iotqa: test-iot.bbclass: support manifest file created for swupd…
pohly Apr 5, 2016
69a07b6
meta-openembedded: waf-cross-answers: Fix faulty link cross-answers-m…
MikeLooijmans Apr 2, 2016
2fa37f2
ostro-os CI: pull in the latest changes
ostroproject-ci Apr 7, 2016
3e42572
layers: activate meta-swupd
pohly Mar 17, 2016
f16914e
ostro.conf: fix swupd version to 2.x
pohly Apr 6, 2016
15bc2ef
ostro: set OS_VERSION for swupd
pohly Mar 18, 2016
72905ae
swupd-http-server: simplify serving swupd www directory
pohly Mar 22, 2016
66cf72c
Ostro OS: prefer Busybox/Toybox over coreutils
pohly Mar 22, 2016
948b07d
Ostro OS: work around swupd bashism
pohly Mar 22, 2016
da60356
ostro-image.bb: remove Smack xattrs from non-Smack images
pohly Mar 22, 2016
302fc5b
ostro images: enable swupd, disable image variants, and re-configure …
pohly Mar 18, 2016
47b9f04
image_types_edison.bbclass: provide ostro-image via symlink
pohly Mar 27, 2016
04fc61b
ostroproject-ci.inc: provide ostro-image via symlink
pohly Mar 26, 2016
2efb9e3
ostro-image.bb: clean up and fix image features and bundle definitions
pohly Mar 24, 2016
c7f2f7c
images: re-enable ostro-image-dev
pohly Mar 29, 2016
4fe135e
recipes-swupd: Remove swupd recipes from meta-ostro
Mar 22, 2016
2db7f9e
swupd-client: Add ostro specific tweaks to swupd
Mar 24, 2016
d3e0e82
swupd: configure OS_VERSION differently in CI and local builds
pohly Mar 31, 2016
fc0cf98
merge: swupd: configure OS_VERSION differently in CI and local builds
pohly Apr 6, 2016
f8ca90d
ostro.conf: prefer util-linux mount
pohly Mar 31, 2016
f2fd814
ostro: make BUILD_ID in os-release file CI specific
pohly Mar 31, 2016
4a1823f
ostroproject-ci.inc: do not document BUILD_ID as official variable
pohly Mar 31, 2016
44b7db4
Ostro images: support images with and without swupd enabled in the sa…
pohly Mar 31, 2016
6726e61
os-release: better tracking of BUILD_ID and and VERSION_ID
pohly Apr 1, 2016
afd045c
image-dsk: use standard IMAGE_LINK_NAME
pohly Apr 1, 2016
7e3181e
Ostro update-alternatives: keep packages constant, configure during i…
pohly Apr 1, 2016
f8168ea
ostro-image.bbclass: ensure that mount and umount are installed
pohly Apr 5, 2016
0db7502
ostro: choose dsk components consistently
pohly Apr 1, 2016
de1b60e
ostro-image.bbclass: speed up build by reducing number of bundles
pohly Apr 1, 2016
7c754f6
ostro-image.bbclass: remove special case for bash
pohly Apr 4, 2016
6921d28
swupd-client: Disable recurring check-update
Apr 1, 2016
39a9714
swupd-client: fix running of efi-combo-update
pohly Apr 4, 2016
e4c612f
efi_combo_updater.c: remove assumptions about paths
pohly Apr 5, 2016
6d6add6
images: dash as scripting shell, shell commands
pohly Feb 5, 2016
7eef3e5
packagegroup-tools-interactive.bb: include extra diagnostic tools
pohly Feb 8, 2016
45605e8
packagegroup-tools-interactive.bb: add file transfer tools (wget/curl…
pohly Feb 15, 2016
0a26790
ostro-image: include interactive tools in reference images
pohly Apr 4, 2016
b8510ae
ostro-image.bbclass: make do_swupd_output visible in the console
pohly Apr 5, 2016
88018dc
ostro-sanity.bbclass: add do_image QA check for dangling symlinks
pohly Apr 6, 2016
8ea690c
ostro-image.bbclass: bump update-alternatives priorities
pohly Apr 7, 2016
70a3ac9
ostro-sanity.bbclass: whitelist dangling symlinks in non-stateless Ostro
pohly Apr 7, 2016
bfacb07
swupd patch cleanup
pohly Apr 7, 2016
1274359
testing: remove CI symlink hacks
pohly Apr 7, 2016
878819e
ostro.conf: undo incorrect OS_VERSION ??= assignment
pohly Apr 7, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Ostro OS:
- meta-java
- meta-soletta
- meta-openembedded
- meta-swupd

The top-level directory comes from openembedded-core and meta-ostro
(including this README.rst), everything else is in its own
Expand Down
2 changes: 2 additions & 0 deletions bitbake/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ Foundation and individual contributors.
* Twitter Bootstrap (including Glyphicons), redistributed under the Apache License 2.0.

* jQuery is redistributed under the MIT license.

* QUnit is redistributed under the MIT license.
2 changes: 1 addition & 1 deletion bitbake/bin/bitbake
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ except RuntimeError as exc:
from bb import cookerdata
from bb.main import bitbake_main, BitBakeConfigParameters, BBMainException

__version__ = "1.29.1"
__version__ = "1.30.0"

if __name__ == "__main__":
if __version__ != bb.__version__:
Expand Down
82 changes: 13 additions & 69 deletions bitbake/bin/toaster
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.

# Usage: source toaster [start|stop|restart-bitbake]
# Usage: source toaster [start|stop]
# [webport=<port>] [noui] [noweb]

# Helper function to kill a background toaster development server
Expand Down Expand Up @@ -95,42 +95,18 @@ stop_system()
kill `cat ${BUILDDIR}/.toasterui.pid` 2>/dev/null
rm ${BUILDDIR}/.toasterui.pid
fi
stop_bitbake
webserverKillAll
# unset exported variables
unset DATABASE_URL
unset TOASTER_CONF
unset TOASTER_DIR
unset BITBAKE_UI
unset BBBASEDIR
trap - SIGHUP
#trap - SIGCHLD
INSTOPSYSTEM=0
}

start_bitbake() {
unset BBSERVER
bitbake --read conf/toaster.conf --server-only -t xmlrpc -B 0.0.0.0:0
if [ $? -ne 0 ]; then
echo "Bitbake server start failed"
return 1
fi
export BBSERVER=0.0.0.0:-1
export DATABASE_URL=`$MANAGE get-dburl`
# we start the TOASTERUI only if not inhibited
if [ $NOTOASTERUI -eq 0 ]; then
bitbake --observe-only -u toasterui --remote-server=$BBSERVER -t xmlrpc \
>>${BUILDDIR}/toaster_ui.log 2>&1 \
& echo $! >${BUILDDIR}/.toasterui.pid
fi
return 0
}

stop_bitbake() {
BBSERVER=0.0.0.0:-1 bitbake -m
unset BBSERVER
# force stop any misbehaving bitbake server
lsof -t bitbake.lock | awk '{print $2}' | grep "[0-9]\+" | xargs -n1 -r kill
}

verify_prereq() {
# Verify Django version
reqfile=$(python -c "import os; print os.path.realpath('$BBBASEDIR/toaster-requirements.txt')")
Expand All @@ -156,7 +132,7 @@ else
TOASTER=$0
fi

BBBASEDIR=`dirname $TOASTER`/..
export BBBASEDIR=`dirname $TOASTER`/..
MANAGE=$BBBASEDIR/lib/toaster/manage.py
OEROOT=`dirname $TOASTER`/../..

Expand Down Expand Up @@ -201,15 +177,11 @@ fi
# make sure that the toaster.sqlite file doesn't default to `pwd` like it currently does.
export TOASTER_DIR=`pwd`

NOTOASTERUI=0
WEBSERVER=1
WEB_PORT="8000"
unset CMD
for param in $*; do
case $param in
noui )
NOTOASTERUI=1
;;
noweb )
WEBSERVER=0
;;
Expand All @@ -229,15 +201,6 @@ if [ `basename \"$0\"` = `basename \"${TOASTER}\"` ]; then
return 1
fi

if [ "$1" = 'restart-bitbake' ] ; then
stop_bitbake
sleep 1
start_bitbake
rc=$?
sleep 3
return $rc
fi

verify_prereq || return 1

# We make sure we're running in the current shell and in a good environment
Expand Down Expand Up @@ -281,16 +244,6 @@ case $CMD in
$MANAGE checksocket "0.0.0.0:$WEB_PORT" || return 1
fi

# Make sure it's safe to start by checking bitbake lock
if [ -e $BUILDDIR/bitbake.lock ]; then
python -c "import fcntl; fcntl.flock(open(\"$BUILDDIR/bitbake.lock\"), fcntl.LOCK_EX|fcntl.LOCK_NB)" 2>/dev/null
if [ $? -ne 0 ] ; then
echo "Error: bitbake lock state error. File locks show that the system is on." 1>&2
echo "Please wait for the current build to finish, stop and then start the system again." 1>&2
return 3
fi
fi

# kill Toaster web server if it's alive
if [ -e $BUILDDIR/.toastermain.pid ] && kill -0 `cat $BUILDDIR/.toastermain.pid`; then
echo "Warning: bitbake appears to be dead, but the Toaster web server is running." 1>&2
Expand All @@ -300,30 +253,21 @@ case $CMD in
fi

# Create configuration file
conf=${BUILDDIR}/conf/toaster.conf
echo "# Created by toaster start script" > $conf
echo "INHERIT+=\"toaster buildhistory\"" >> $conf
conf=${BUILDDIR}/conf/local.conf
line='INHERIT+="toaster buildhistory"'
grep -q "$line" $conf || echo $line >> $conf

if [ $WEBSERVER -gt 0 ] && ! webserverStartAll; then
echo "Failed ${CMD}."
return 4
fi
start_bitbake
if [ $? -eq 0 ]; then
$MANAGE runbuilds & echo $! >${BUILDDIR}/.runbuilds.pid
# set fail safe stop system on terminal exit
trap stop_system SIGHUP
echo "Successful ${CMD}."
return 0
else
# failed start, do stop
stop_system
echo "Failed ${CMD}."
return 1
fi
# stop system on terminal exit
set -o monitor
export BITBAKE_UI='toasterui'
export DATABASE_URL=`$MANAGE get-dburl`
$MANAGE runbuilds & echo $! >${BUILDDIR}/.runbuilds.pid
# set fail safe stop system on terminal exit
trap stop_system SIGHUP
echo "Successful ${CMD}."
return 0
;;
stop )
stop_system
Expand Down
2 changes: 1 addition & 1 deletion bitbake/lib/bb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

__version__ = "1.29.1"
__version__ = "1.30.0"

import sys
if sys.version_info < (2, 7, 3):
Expand Down
18 changes: 1 addition & 17 deletions bitbake/lib/bb/fetch2/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,23 +262,7 @@ def unpack(self, ud, destdir, d):
if ud.bareclone:
cloneflags += " --mirror"

# Versions of git prior to 1.7.9.2 have issues where foo.git and foo get confused
# and you end up with some horrible union of the two when you attempt to clone it
# The least invasive workaround seems to be a symlink to the real directory to
# fool git into ignoring any .git version that may also be present.
#
# The issue is fixed in more recent versions of git so we can drop this hack in future
# when that version becomes common enough.
clonedir = ud.clonedir
if not ud.path.endswith(".git"):
indirectiondir = destdir[:-1] + ".indirectionsymlink"
if os.path.exists(indirectiondir):
os.remove(indirectiondir)
bb.utils.mkdirhier(os.path.dirname(indirectiondir))
os.symlink(ud.clonedir, indirectiondir)
clonedir = indirectiondir

runfetchcmd("%s clone %s %s/ %s" % (ud.basecmd, cloneflags, clonedir, destdir), d)
runfetchcmd("%s clone %s %s/ %s" % (ud.basecmd, cloneflags, ud.clonedir, destdir), d)
os.chdir(destdir)
repourl = self._get_repo_url(ud)
runfetchcmd("%s remote set-url origin %s" % (ud.basecmd, repourl), d)
Expand Down
1 change: 1 addition & 0 deletions bitbake/lib/bb/persist_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ def delValue(self, domain, key):
def connect(database):
connection = sqlite3.connect(database, timeout=5, isolation_level=None)
connection.execute("pragma synchronous = off;")
connection.text_factory = str
return connection

def persist(domain, d):
Expand Down
59 changes: 40 additions & 19 deletions bitbake/lib/bb/ui/buildinfohelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,15 @@ def update_build_object(self, build, errors, warnings, taskfailures):
assert isinstance(errors, int)
assert isinstance(warnings, int)

if build.outcome == Build.CANCELLED:
return
try:
if build.buildrequest.state == BuildRequest.REQ_CANCELLING:
return
except AttributeError:
# We may not have a buildrequest if this is a command line build
pass

outcome = Build.SUCCEEDED
if errors or taskfailures:
outcome = Build.FAILED
Expand All @@ -241,14 +250,16 @@ def update_task_object(self, build, task_name, recipe_name, task_stats):
recipe__name = recipe_name
)

task_to_update.started = self._timestamp_to_datetime(task_stats['started'])
task_to_update.ended = self._timestamp_to_datetime(task_stats['ended'])
task_to_update.elapsed_time = (task_stats['ended'] - task_stats['started'])
task_to_update.cpu_time_user = task_stats['cpu_time_user']
task_to_update.cpu_time_system = task_stats['cpu_time_system']
task_to_update.disk_io_read = task_stats['disk_io_read']
task_to_update.disk_io_write = task_stats['disk_io_write']
task_to_update.disk_io = task_stats['disk_io_read'] + task_stats['disk_io_write']
if 'started' in task_stats and 'ended' in task_stats:
task_to_update.started = self._timestamp_to_datetime(task_stats['started'])
task_to_update.ended = self._timestamp_to_datetime(task_stats['ended'])
task_to_update.elapsed_time = (task_stats['ended'] - task_stats['started'])
task_to_update.cpu_time_user = task_stats.get('cpu_time_user')
task_to_update.cpu_time_system = task_stats.get('cpu_time_system')
if 'disk_io_read' in task_stats and 'disk_io_write' in task_stats:
task_to_update.disk_io_read = task_stats['disk_io_read']
task_to_update.disk_io_write = task_stats['disk_io_write']
task_to_update.disk_io = task_stats['disk_io_read'] + task_stats['disk_io_write']

task_to_update.save()

Expand Down Expand Up @@ -483,7 +494,7 @@ def save_target_file_information(self, build_obj, target_obj, filedata):
parent_obj = self._cached_get(Target_File, target = target_obj, path = parent_path, inodetype = Target_File.ITYPE_DIRECTORY)
tf_obj = Target_File.objects.create(
target = target_obj,
path = path,
path = unicode(path, 'utf-8'),
size = size,
inodetype = Target_File.ITYPE_DIRECTORY,
permission = permission,
Expand All @@ -508,7 +519,7 @@ def save_target_file_information(self, build_obj, target_obj, filedata):

tf_obj = Target_File.objects.create(
target = target_obj,
path = path,
path = unicode(path, 'utf-8'),
size = size,
inodetype = inodetype,
permission = permission,
Expand Down Expand Up @@ -539,7 +550,9 @@ def save_target_file_information(self, build_obj, target_obj, filedata):
filetarget_path = "/".join(fcpl)

try:
filetarget_obj = Target_File.objects.get(target = target_obj, path = filetarget_path)
filetarget_obj = Target_File.objects.get(
target = target_obj,
path = unicode(filetarget_path, 'utf-8'))
except Target_File.DoesNotExist:
# we might have an invalid link; no way to detect this. just set it to None
filetarget_obj = None
Expand All @@ -548,7 +561,7 @@ def save_target_file_information(self, build_obj, target_obj, filedata):

tf_obj = Target_File.objects.create(
target = target_obj,
path = path,
path = unicode(path, 'utf-8'),
size = size,
inodetype = Target_File.ITYPE_SYMLINK,
permission = permission,
Expand Down Expand Up @@ -849,7 +862,7 @@ class BuildInfoHelper(object):
# pylint: disable=bad-continuation
# we do not follow the python conventions for continuation indentation due to long lines here

def __init__(self, server, has_build_history = False):
def __init__(self, server, has_build_history = False, brbe = None):
self.internal_state = {}
self.internal_state['taskdata'] = {}
self.internal_state['targets'] = []
Expand All @@ -865,7 +878,7 @@ def __init__(self, server, has_build_history = False):

# this is set for Toaster-triggered builds by localhostbecontroller
# via toasterui
self.brbe = None
self.brbe = brbe

self.project = None

Expand Down Expand Up @@ -1220,8 +1233,8 @@ def store_target_package_data(self, event):
for target in self.internal_state['targets']:
if target.is_image:
pkgdata = BuildInfoHelper._get_data_from_event(event)['pkgdata']
imgdata = BuildInfoHelper._get_data_from_event(event)['imgdata'][target.target]
filedata = BuildInfoHelper._get_data_from_event(event)['filedata'][target.target]
imgdata = BuildInfoHelper._get_data_from_event(event)['imgdata'].get(target.target, {})
filedata = BuildInfoHelper._get_data_from_event(event)['filedata'].get(target.target, {})

try:
self.orm_wrapper.save_target_package_information(self.internal_state['build'], target, imgdata, pkgdata, self.internal_state['recipes'], built_package=True)
Expand All @@ -1244,7 +1257,6 @@ def store_dependency_information(self, event):
assert 'layer-priorities' in event._depgraph
assert 'pn' in event._depgraph
assert 'tdepends' in event._depgraph
assert 'providermap' in event._depgraph

errormsg = ""

Expand Down Expand Up @@ -1330,7 +1342,7 @@ def store_dependency_information(self, event):
if dep in assume_provided:
continue
via = None
if dep in event._depgraph['providermap']:
if 'providermap' in event._depgraph and dep in event._depgraph['providermap']:
deprecipe = event._depgraph['providermap'][dep][0]
dependency = self.internal_state['recipes'][deprecipe]
via = Provides.objects.get_or_create(name=dep,
Expand Down Expand Up @@ -1404,9 +1416,18 @@ def _store_build_done(self, errorcode):
be.lock = BuildEnvironment.LOCK_LOCK
be.save()
br = BuildRequest.objects.get(pk = br_id)

# if we're 'done' because we got cancelled update the build outcome
if br.state == BuildRequest.REQ_CANCELLING:
logger.info("Build cancelled")
br.build.outcome = Build.CANCELLED
br.build.save()
self.internal_state['build'] = br.build
errorcode = 0

if errorcode == 0:
# request archival of the project artifacts
br.state = BuildRequest.REQ_ARCHIVE
br.state = BuildRequest.REQ_COMPLETED
else:
br.state = BuildRequest.REQ_FAILED
br.save()
Expand Down
Loading