Overview

Cros Deploy is a script to deploy (install) a package to your Chromium OS device. It copies the binary packages built in your chroot to the target device and installs (emerges) on the device. Cros Deploy is written to replace cros_package_to_live and gmerge in the near future.

NOTE: Cros Deploy does NOT build packages for you. Please make sure you have built all the requested packages using emerge before invoking cros deploy.
NOTE: To be able to write to your rootfs partition, Cros Deploy may remount your rootfs partition as read-write, or disables the rootfs verification on your device.

Cros Deploy is part of the CrosD project which aims to provide tools with more features, better and more consistent UI. Currently, CrosD tools include:

Device

Device can be

ssh://hostname[:port]

or

hostname[:port]

Port number is the SSH port to use to connect to your device; it is optional (defaults to 22)

How to specify package names?

Cros Deploy does the best to figure out what packages you want to install, even when you do not enter a complete/unique package name. When there is ambiguity, Cros Deploy may prompt the user to choose.

A unique package name should includes three parts:

${category}/${package}-${version}

For example,

dev-python/cherrypy-3.1.2

Cros Deploy accepts any of the following format:

${category}/${package}-${version}

${category}/${package}

${package}-${version}

${package}

When the given input such as ${package} (e.g. cherrypy) is unique, which is the common case, Cros Deploy automatically selects the right package for you. If, however, ${package} exists in multiple categories, Cros Deploy prompts the user to choose. For example,

Multiple matches found for cherrypy:

[0]: dev-python/cherrypy

[1]: foo/cherrypy

Enter your choice to continue [0-1]: 5

When there are multiple versions available, Cros Deploy chooses the best visible one. For example, if you cros_workon a package, Cros Deploy will try to use the 9999 version instead

Installation root

By default, Cros Deploy installs all packages at root ("/"). User can override this with "--root". Note that many dev packages are installed in /usr/local

Known problems and fixes

Where is Cros Deploy?

Cros Deploy is in the chromite repo. The script is chromite/cros/commands/cros_deploy.py. If you cannot find it, update your tree with repo sync.

Failed to emerge package...?

Errors like the one below are likely caused by emerge missing on the target system. (This can happen if the stateful partition is wiped after the OS image has been deployed. Also remember that the target needs to run a test image.)