Skip to content
This repository has been archived by the owner on Feb 26, 2019. It is now read-only.

odd "no packages can be updated" #164

Open
jbenet opened this issue Dec 24, 2014 · 9 comments
Open

odd "no packages can be updated" #164

jbenet opened this issue Dec 24, 2014 · 9 comments
Assignees

Comments

@jbenet
Copy link

jbenet commented Dec 24, 2014

I've an old version of go.crypto/{sha3,blowfish} (two packaged from 1 repo) that i want to update. in manifest:

        {
            "ImportPath": "code.google.com/p/go.crypto/blowfish",
            "Comment": "null-219",
            "Rev": "00a7d3b31bbab5795b4a51933c04fc2768242970"
        },
        {
            "ImportPath": "code.google.com/p/go.crypto/sha3",
            "Comment": "null-219",
            "Rev": "00a7d3b31bbab5795b4a51933c04fc2768242970"
        }

i try:

> ls Godeps/_workspace/src/code.google.com/p/go.crypto/sha3
keccakf.go  sha3.go  sha3_test.go
> ls ~/go/src/code.google.com/p/go.crypto/sha3/
doc.go  hashes.go  keccakKats.json.deflate  keccakf.go  register.go  sha3.go  sha3_test.go  shake.go
> godep update code.google.com/p/go.crypto/sha3
godep: no packages can be updated

:(

I ended up blowing out the dependencies manually, and re-adding it and it worked. :)

@eikenb
Copy link

eikenb commented Jan 30, 2015

I think I am seeing the same issue. I have a repo that contains a go package as a sub-directory in a repository where the top level is not a go package. It saves fine but won't update. I assume this is a side-affect of not wanted to allow for updating of subpackages. But in this case it isn't a subpackage, but a top level package just contained in a subdirectory of the repo.

@ebuchman
Copy link

ebuchman commented Mar 9, 2015

Just encountered the same issue. Glad to see I'm not alone.

@juliusv
Copy link

juliusv commented Mar 11, 2015

Same issue here. We vendor github.com/prometheus/client_golang/model in github.com/prometheus/prometheus, and my GOPATH now has a slightly newer version which I want to save. But alas,

$ godep update github.com/prometheus/client_golang/model
godep: no packages can be updated

The exact revision at which this is happening in Prometheus is this: prometheus/prometheus@d4ef509

I wonder if this is connected to us manually including some files in Godeps which godep didn't include (licenses of the vendored packages are legally required, but if they're in the vendored project's root and you only vendor packages from subdirectories, you're suddenly in violation).

@mpuncel
Copy link

mpuncel commented May 12, 2015

This seems to be caused by this line here: https://github.com/tools/godep/blob/master/update.go#L205

If packages A and B are under the same root, and I try to only update B, the root will be marked for skipping update because A isn't being updated. I'm not sure what the motivation for this feature is, it seems that developers should be able to selectively update sub packages as they desire.

For what it's worth, I fixed my problem by globbing from the root in my godep update command (e.g. godep update github.com/foo/bar/... instead of github.com/foo/bar/pkg/B. A helpful error message would have gone a long way

@curtisallen
Copy link

@mpuncel thanks so much saves a lot of time!

Is this on the radar to be fixed?

@freeformz
Copy link

@mpuncel How would godep restore work if different packages in the same repo are recorded at different versions? Which is the right version of the repository to restore to? That goes away when we can get rid of godep restore, which won't be until after Go 1.6 though.

@mpuncel
Copy link

mpuncel commented Dec 3, 2015

You're totally right. A better error message would be more than sufficient, this was a very confusing error to encounter as a user.

@freeformz
Copy link

@mpuncel agreed.

@freeformz freeformz self-assigned this Dec 3, 2015
@0x5487
Copy link

0x5487 commented Feb 25, 2016

@mpuncel Thank you for providing the information. That is very useful and saved my time :)

jsha pushed a commit to letsencrypt/boulder that referenced this issue Nov 28, 2016
This PR updates the `github.com/prometheus/client_golang` dependency to the v0.8.0 release tag.

For future note, `godep update github.com/prometheus/client_golang/prometheus/promhttp` doesn't work correctly for this package due to the nesting structure (See tools/godep#164). This can be worked around by using `godep update github.com/prometheus/client_golang/...` instead ¯\\\_(ツ)\_/¯

Per `CONTRIBUTING.md` I verified the unit tests pass:

```
daniel@XXXXXX:~/go/src/github.com/prometheus/client_golang$ git show -s
commit c5b7fccd204277076155f10851dad72b76a49317
Merge: a4d14b3 1b26087
Author: Björn Rabenstein <[email protected]>
Date:   Wed Aug 17 17:48:24 2016 +0200

    Merge pull request #226 from prometheus/beorn7/alloc
    
    Bring back zero-alloc label-value access for metric vecs
daniel@XXXXXX:~/go/src/github.com/prometheus/client_golang$ go test ./...
ok  	github.com/prometheus/client_golang/api/prometheus	0.003s
?   	github.com/prometheus/client_golang/examples/random	[no test files]
?   	github.com/prometheus/client_golang/examples/simple	[no test files]
ok  	github.com/prometheus/client_golang/prometheus	28.661s
ok  	github.com/prometheus/client_golang/prometheus/promhttp	0.013s
ok  	github.com/prometheus/client_golang/prometheus/push	0.007s
```
negz pushed a commit to negz/ip-masq-agent that referenced this issue Sep 18, 2018
After a fresh git pull -u of kubernetes.

The main goal here is to update the pkg/util/iptables dependency in order to
leverage the iptables-restore locking support from kubernetes/kubernetes#44895.
I'm not very familiar with godep, and ran into an tools/godep#164.
Comments on that issue imply godep update -v repo/... are a decent workaround.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants