[Exherbo-dev] Forcing reinstalls of things

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Sat Mar 12 21:11:09 GMT 2011


On 13 March 2011 03:15, Ciaran McCreesh <ciaran.mccreesh at googlemail.com> wrote:
> I just remembered something interesting:
>
>    cave resolve '!app-editors/vim:0::/'
>
> will force a reinstall vim if it's installed, and will do nothing
> otherwise. Thus, if you want to reinstall things dependent upon a
> package, you can do:
>
>    cave resolve $(cave print-dependent-ids vim::/ -f '!=%F ' )
>
> and so it wouldn't be hard to make:
>
>    cave resolve --reinstall-dependents-of vim
>
> (except that we've run out of short option letters), but that's not the
> interesting bit.
>
> Some of you think you have packages that, when reinstalled or upgraded,
> require other packages to be reinstalled afterwards. Maybe we just need
> some fancy syntax to map onto this mechanism...
>
>    DEPENDENCIES="
>        breaks:
>            dev-libs/foo
>            dev-libs/bar
>        "
>
> or something... Which could be used to create installed-only blockers,
> and would enforce "foo after me" style ordering.
>
> So the questions are:
>
> Can you list the packages that would get broken in the package being
> upgraded?
>
> If you can't, would allowing sets in repositories and in DEPENDENCIES
> be sufficient to make it work? So you'd do:
>
>    DEPENDENCIES="
>        breaks:
>            haskell-libraries
>        "
>
> or something.

And then take the intersection of dependents of the rebuilt/upgraded
library and haskell-libraries?  If so, I think that covers my use case
_if_ we can make the notion of "dependents" transitive as well (i.e.
foo depends on bar which depends on baz; when rebuilding/upgrading baz
then both foo and bar need to be rebuilt).

> Does upgrading something always break its dependents? What about
> reinstalling? Or are the rules more complicated than that? Do we need
> something like:
>
>    DEPENDENCIES="
>        breaks:
>            (
>                dev-libs/foo
>                dev-libs/bar
>            ) [[ *if-replacing = [ <1.23 ] ]]
>        "
>

For the Haskell libraries case, if you're rebuilding the exact same
version just because you want to, then it should be fine.  If,
however, you're rebuilding it because one of its dependencies was
upgraded (even non-Haskell ones: if gtk+ is upgraded then
dev-haskell/gtk will be broken) then it is possible that its ABI has
changed and thus its dependents need to be rebuilt as well.

-- 
Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com
IvanMiljenovic.wordpress.com



More information about the Exherbo-dev mailing list