Smart
From Yocto Project
Jump to navigationJump to search
Mark's smart contrib branch:
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=mhatle/smart
To test this out querying a root filesystem on the host:
- Ensure you are using "package_rpm" in PACKAGE_CLASSES
- Comment out the line in core-image-minimal that removes the packaging data files
bitbake core-image-minimal
bitbake python-smartpm-native
bitbake -c devshell core-image-minimal
- Within the devshell:
cd ../rootfs export PYTHONPATH="/path/to/native/sysroot/usr/lib/python2.7/site-packages" export RPM_ETCRPM=$PWD/etc/rpm smart --data-dir=$PWD/var/lib/smart channel --add rpmsys type=rpm-sys name="rpmsys" smart --data-dir=$PWD/var/lib/smart config --set rpm-root=$PWD smart --data-dir=$PWD/var/lib/smart config --set rpm-dbpath=/var/lib/rpm
You should now be able to query the packages installed into the rootfs e.g.
smart --data-dir=$PWD/var/lib/smart query
If you add an rpm-dir channel and run smart under fakechroot (or pseudo presumably, but fakechroot is simpler for testing here) you can install and uninstall packages (note that you might have to install fakechroot on your host first):
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 fakechroot smart --data-dir=$PWD/var/lib/smart install zip # install 'zip' in the rootfs