Working on Smart within the Yocto Project

Paul Eggleton paul.eggleton at linux.intel.com
Wed Feb 13 02:08:20 PST 2013


On Wednesday 05 December 2012 19:38:25 Anders F Björklund wrote:
> Paul Eggleton wrote:
> > Over the last month, Mark Hatle at Wind River Systems, myself and several
> > other engineers have been working on integrating Smart into OpenEmbedded
> > [1] as part of the Yocto Project [2] to be used in conjunction with RPM 5
> > when RPM is selected as the output package format. Smart is being used in
> > two capacities:
> > 
> > 1) In the traditional manner for installing and upgrading packages on the
> > target system (as a replacement for Zypper)
> 
> At one point openSUSE was using Smart, but they are back to Zypper now...
> I am not aware of any other distribution still actively using Smart either.

This is quite a shame, as Smart seems very capable and easy to extend.
 
> > 2) As part of the root file system construction process on the build host
> > -
> > i.e. installing all of the base packages that go into a root filesystem.
> > This replaces a custom set of scripts wrapping RPM and some helper
> > utilities. This posed the most challenges; we need to be able to install
> > an entire system into a specific path instead of /, which turned out to
> > be a little more complicated than just setting rpm-root (mostly due to
> > needing to pass other to RPM so it behaves in the correct way).
> 
> There is some rudimentary support with the smart "rpm-root" config, but
> I gather you need to do something more than just set the root in the ts ?

It is mostly as simple as this; there was just some unusual interaction 
between rpm and Smart to do with handling the db path. One of the patches we 
have applied addresses this.
 
> > In the process we have applied a number of patches to Smart, and ideally
> > we would like to get these integrated upstream. Some of them are
> > straightforward bug fixes, others implement new functionality.
> > 
> > The largest of the patches is to implement "recommends" support (i.e.
> > where a dependency relationship is marked such that installation should
> > succeed even if the dependency can't be satisfied). Although unusual for
> > RPM-based systems, support for this is required for our system so we have
> > added it into the cache, the transaction code, the RPM backend, and the
> > rpm-md metadata code (corresponding patch also needed for createrepo). We
> > haven't implemented support for this in other backends that would make
> > sense (e.g. deb) but it would not be hard to do so.
> 
> Strange coincidence, the bug tracking "recommends" was recently closed
> in a related project due to them switching to just using apt instead:
> 
> https://bugs.launchpad.net/smart/+bug/268143
> 
> But maybe you have a better implementation than just treating the
> recommends/suggests as requires... Are you using "Requires(hint)" ?
> 
> i.e. the RPMSENSE_MISSINGOK tag flag in RPM

Yes, we're using RPMSENSE_MISSINGOK.

> > What would be the preferred way to submit these patches for review?
> 
> That would be https://code.launchpad.net/smart but you would still need
> someone to review the patch. And there isn't really anyone left to do so.
> 
> But creating a "~user/smart/topic" branch and propose it for merging,
> is the way to submit patches. You would use bzr for that, by the way.

OK, it took me a while but I finally posted and submitted a branch yesterday. 
For reference the branch is here:

https://code.launchpad.net/~paul-eggleton/smart/yocto-smart-fixes

Hopefully someone can review these patches.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



More information about the Smart mailing list