Working on Smart within the Yocto Project

Anders F Björklund afb at algonet.se
Wed Mar 6 14:54:25 PST 2013


Paul Eggleton wrote, some time ago:

>> 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.

Was probably reflected on the roadmap too, one knew that things were strange
when the features was more about Mac OS X and Windows than about Linux...

Or the port to Python 3000 and Qt 4, which didn't really add anything new.
Well, except for duplicating/breaking compatibility with the existing code.

>>> 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.

Yes, so it seems...

>>> 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.

Think I did an implementation for the openSUSE, that could be merged...

https://launchpadlibrarian.net/77666051/smart-rpm-suggests.diff

As well as the .deb parser, that should be able to use your other code.

https://launchpadlibrarian.net/57399369/smart-deb-suggests.diff

As a start of a merge, I added the workaround for no RPMSENSE_MISSINGOK
Not sure if I had these on a branch somewhere. Or just in a directory.

>>> 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.

The patches all look reasonable to me, will be happy to merge in
some future release. There's some other interesting ones pending:

https://bugs.launchpad.net/smart/+bug/992826
https://bugs.launchpad.net/smart/+bug/1086888

Don't think there were any bugs for the branch, but that's minor.
There seems to be enough details given in the commit messages...

Maybe they should be added just for the tracker:
https://launchpad.net/smart/+milestone/1.5

Sadly one cannot cherry-pick in Bazaar, nor rebase properly. :-(
But started https://code.launchpad.net/~smartpm/smart/upcoming

--anders




More information about the Smart mailing list