[racket-dev] Updating dependency packages from other sources

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Thu Aug 15 10:19:06 EDT 2013

I don't think there's any good way to do this now. Here are ways that will work:

1) Ignore the dependency during removal

$ raco pkg remove --force x11
$ raco pkg install new-x11-source

2) Manually change the source in yours package database and then update

$ emacs $PLTHOME/racket/share/pkgs/pkgs.rktd
$ raco pkg update x11

As for what we could do going forward, I think either of these
approaches could be 'automated'. For instance, we could add a command
like

$ raco pkg replace x11 new-x11-source

This would behave like either of those (which would be invisible to the user).

Do you have any opinions about how you'd want to do this replacement?

Jay




On Tue, Aug 13, 2013 at 9:48 PM, Asumu Takikawa <asumu at ccs.neu.edu> wrote:
> Hi all,
>
> I have a question about updating packages. I'll use an example
> development scenario to frame the question.
>
> Suppose I have package `aosd` installed that depends on `x11`:
>
>   Installation-wide:
>    Package              Checksum    Source
>    x11                  0fc7555f6bc8f09601a75f9d88f44bfa3c4ff632    (catalog x11)
>    aosd                 7ab51262a256a324b062d7b407cb5341d1f41f69    (catalog aosd)
>
> Now suppose I want to work on the `x11` package since I need to upgrade
> it for some aspect of the `aosd` package. Right now it's installed from
> the package server, but I want to switch it to a linked package from the
> filesystem for development.
>
> If I try to remove just the `x11` package so I can replace it, I get
> this error:
>
>   $ raco pkg remove x11
>   raco pkg remove: cannot remove packages that are dependencies of other
>   packages
>     dependencies:
>        x11 (required by: (aosd))
>
> which is reasonable. But I have to remove the package before I can
> install it from a different source. The `raco pkg update` command looks
> like it might help, but it doesn't let you update from a different
> source AFAICT. The `raco pkg install` command won't work because it'd be
> a conflicting package.
>
> What are the right steps to install over dependency packages? I don't
> think manually uninstalling and re-installing is a good solution.  If n
> other packages depended on `x11` too, it seems like I'd have to
> re-install all n of them.
>
> Cheers,
> Asumu
> _________________________
>   Racket Developers list:
>   http://lists.racket-lang.org/dev



-- 
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://faculty.cs.byu.edu/~jay

"The glory of God is Intelligence" - D&C 93

Posted on the dev mailing list.