Odd issue with gregor+tzinfo
Closed this issue · 6 comments
I have a couple of packages that depend on gregor. I've noticed that occasionally, when I want to update, I have to update my packages twice. The second time always works. The first time fails with some interesting things in the raco
log. First interesting thing is this bit:
The following out-of-date packages are listed as dependencies of MY-PACKAGE and they will be automatically updated:
tzinfo
tzinfo
various
other
dependencies
etc.
Why is tzinfo
listed twice? I wasn't sure (though I do have a murky theory that I'll share at the end of this message).
The second weird thing is the actual failure:
Uninstalling to prepare re-install of tzinfo
Moving tzinfo to trash: /path/to/trash
Uninstsalling to prepare re-install of tzinfo
raco pkg install: package not currently installed
package: tzinfo
current scope: user
It tried to move tzinfo
to the trash twice. The second time, it fails, and raco update MY-PACKAGE
bails. Then when I run raco update MY-PACKAGE
the second time, everything is fine -- because the first raco update
left things in a state where tzinfo
wasn't installed.
I was digging around in the gregor
repo and I noticed that gregor
depends on gregor-lib
and gregor-docs
. Both of those depend on tzinfo
.
Normally, I wouldn't think that's a problem. However, when I look at this in light of the behavior I'm seeing, my theory is that something is causing Racket to think that it needs to update tzinfo
twice. Not sure exactly why. And I'm not sure if this is actually a Racket/Raco bug.
However, do you think it could be the way the gregor dependencies are set up?
My workaround, BTW, is to raco pkg update tzinfo
before my first install. That circumvents the error. But I'm still curious about the root cause.
@srfoster Off the top of my head, I don't know. I haven't seen this before. Does
raco pkg show -a|grep tzinfo
show more than one installation of the package?
@srfoster To clarify, I don't think this is something that normally happens, so I suspect it has something to do with your local setup. It's normal for multiple packages to depend on the same package.
Yes, it's definitely normal.
And I would tend to agree that there's something weird about my setup. However, I haven't been able to find anything weird about it.
To answer your other question, I don't appear to have more than one installation of the same package.
Update:
Since posting, I've now seen the same error pop up with regard to non-gregor-related packages. It still mystifies me why it's happening, and it's starting to feel like a bug with raco update
. I have a couple of machines where I can catch the bug happening, and I'm looking at the raco update
source code to see if I can figure out what's going on. I'm also trying to discover a reliable way of reproducing what I'm seeing.
I'll report back when I know more. If you have ideas, please let me know. :)