[racket-dev] Package Update Fails?

From: Vincent St-Amour (stamourv at ccs.neu.edu)
Date: Tue Aug 13 17:23:33 EDT 2013

I had installed Stephen's `graph' package. Then, he pushed a new
version, and I tried updating my install. Here's the error I got:


    stamourv at ahuntsic:plt$ raco pkg update graph
    Inferred package scope: /home/stamourv/src/plt/racket/share/pkgs
    Resolving "graph" via https://pkg.racket-lang.org
    Updating:
      graph
    Resolving "graph" via https://pkg.racket-lang.org
    Downloading https://github.com/stchang/graph/tarball/5c769639e02fac538b1034a311ea787627b8a7f6
    The following uninstalled packages are listed as dependencies of graph:
       base
       data-lib
       rackunit-lib
       racket-doc
       scribble-lib
    Would you like to install these dependencies? [Y/n/a/?] y
    Resolving "base" via https://pkg.racket-lang.org
    Resolving "base" via https://planet-compat.racket-lang.org
    raco pkg update: cannot find package on catalogs
      package: base


At that point, I tried removing it and reinstalling it. I got this
error:


    stamourv at ahuntsic:plt$ raco pkg remove graph
    Inferred package scope: /home/stamourv/src/plt/racket/share/pkgs
    Removing graph
    raco setup: directory: #<path:/home/stamourv/src/plt/racket/share/pkgs/graph> does not exist for collection: "graph"
      context...:
       /home/stamourv/src/plt/racket/collects/setup/setup-unit.rkt:271:2: core154
       /home/stamourv/src/plt/racket/collects/setup/setup-unit.rkt:386:4: for-loop
       /home/stamourv/src/plt/racket/collects/pkg/main.rkt: [running body]
       /home/stamourv/src/plt/racket/collects/pkg/raco.rkt: [traversing imports]
       /home/stamourv/src/plt/racket/collects/raco/raco.rkt: [running body]
       /home/stamourv/src/plt/racket/collects/raco/main.rkt: [running body]


That directory did exist, though. At that point, the package was not
listed as installed anymore, but I couldn't install it either:


    stamourv at ahuntsic:plt$ raco pkg install graph
    Resolving "graph" via https://pkg.racket-lang.org
    Downloading https://github.com/stchang/graph/tarball/5c769639e02fac538b1034a311ea787627b8a7f6
    raco setup: given collection path: "graph" refers to the same directory as another given collection path, "graph/graph"
      context...:
       /home/stamourv/src/plt/racket/collects/setup/setup-unit.rkt:539:2: check-against-all
       /home/stamourv/src/plt/racket/collects/pkg/main.rkt: [running body]
       /home/stamourv/src/plt/racket/collects/pkg/raco.rkt: [traversing imports]
       /home/stamourv/src/plt/racket/collects/raco/raco.rkt: [running body]
       /home/stamourv/src/plt/racket/collects/raco/main.rkt: [running body]


Despite that error, the package was listed as being installed, but it
wouldn't work.

I ended up removing the package directory and removing the link (using
raco link). After that, I was finally able to reinstall the package, and
now everything works.

The old version did not have an `info.rkt' file, but the new one does. I
don't know if that makes any difference.

Vincent

Posted on the dev mailing list.