Smart

From Yocto Project
Revision as of 08:08, 24 July 2013 by PaulEggleton (talk | contribs) (Use --installed option for first query)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

http://labix.org/smart/

Smart is now used in conjunction with RPM in OE-Core / Poky as of 1.4 (dylan).

You can use this on the target if you are using RPM packaging and have package-management in IMAGE_FEATURES.

To interact with a root filesystem using Smart on the host:

# Ensure you are using "package_rpm" in PACKAGE_CLASSES
# Have EXTRA_IMAGE_FEATURES += "package-management" in local.conf
# bitbake core-image-minimal
# bitbake -c devshell core-image-minimal
# Then, within the devshell:
cd ../rootfs
export RPM_ETCRPM=$PWD/etc/rpm

You should now be able to query the packages installed into the rootfs e.g.

smart --data-dir=$PWD/var/lib/smart query --installed

If you add an rpm-dir channel and run smart under pseudo you can install and uninstall packages:

smart --data-dir=$PWD/var/lib/smart channel --add test type=rpm-dir path=/path/to/tmp/deploy/rpm/i586
smart --data-dir=$PWD/var/lib/smart query # verify that the new channel is recognized
smart --data-dir=$PWD/var/lib/smart install zip # install 'zip' in the rootfs