ewtroan (ewtroan) wrote,

Shadows merged

All of the work to shadows is finally done (I think), and merged onto head. It'll appear in Conary 0.13, which should be out soon. We're waiting for Dave to finish some use flag reworking and we should be good to go. I don't doubt that shadows will be enhanced as people start playing with them. I just implemented the minimal structure for now. It's a pretty small patch all things considered; it's made me quite happy about the basic design of Conary.

Shadows are primarily a way of tracking changes to a package. Say you wanted to make a couple of changes to (say, building gcc without --enable-threads=posix). We'll start the shadow from 3.3.3-11 (normally you'd start at head, but I want to show how we track as well, and we need something newer to track to.

cvc shadow localhost@my:shadow /conary.specifix.com@spx:linux/3.3.3-11 gcc:source

Now that the shadow exists, checkout the shadowed recipe and make the change.

cvc checkout gcc=localhost@my:shadow
cd gcc
vi gcc.recipe
cvc commit --message "modified version with --enable-threads removed"
conary rq gcc:source=localhost@my:shadow

See that the version of gcc:source is 3.3.3-11.1? The .1 means that there is one change on the shadow. Now, how would you merge this with 3.3.3-12? That's easy.

cvc merge
cvc diff

See how the original change was preserved? Now do a commit:

cvc commit --message "merged with 3.3.3-12"
conary rq gcc:source=localhost@my:shadow

And you'll see 3.3.3-12.1 is the new version. Cool, huh?

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened