Summary: | ports-mgmt/pkg: cannot open sqlite3 db: Not a directory (FreeBSD 13.0-CURRENT) | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | Nathan <ndowens04> |
Component: | Individual Port(s) | Assignee: | freebsd-pkg (Nobody) <pkg> |
Status: | Closed FIXED | ||
Severity: | Affects Many People | CC: | 000.fbsd, fernape, grahamperrin, grog, jwb, lists+freebsd, lwhsu, marten, philipp, pkg, please, rob2g2-freebsd, spork, w.schwarzenfeld |
Priority: | --- | Flags: | w.schwarzenfeld:
maintainer-feedback?
(pkg) |
Version: | Latest | ||
Hardware: | Any | ||
OS: | Any |
Description
Nathan
2019-10-02 11:49:22 UTC
Additional note, this seems to happen if one is in a path that no longer exists, I did a pwd a moment ago to see where I was and it gave “.” I would think pkg should still work nonetheless Thanks for that precision, that is exactly what I was missing to reproduce. I will fix asap. (In reply to Baptiste Daroussin from comment #2) This may help too. Weirdly I was working in a git dir and switched to master to delete that branch, and tried to use pkg and noticed the dir seemed to disappear and caused pkg issue again. So yeah it is because of current pwd not existing to cause bug it seems; just don’t know what made my dir that existed to disappear :) Same on 11.3-RELEASE-p3. In my case I was sitting in a /usr/ports/blah/foo directory that disappeared when a cron job to update the latest tree ran. I was bitten by this today. pkg: Repository codelab load error: cannot open sqlite3 db: No such file or directory Thank you for the info about non existent current directory. That was the problem. Can it be fixed in pkg or can be the message more informative about what is going on? Had the same issue today on 12.1 version 1.13.2. I was standing in /usr/ports/www/node10 and did portsnap extract and then a pkg install failed with: pkg: Repository FreeBSD load error: cannot open sqlite3 db: Not a directory same problem here. I was in a directory that did not exist any more Met the same issue today in 12.2-STABLE. Just encountered this on 12.2-RELEASE. Had wiped and reinstalled my ports tree and forgot to cd out of /usr/ports in another window. Thanks for posting the workaround. I've had just this problem as well. In my case, it was due to the current directory having gone away under the shell. So the error message was Just Plain Wrong: the "Not a directory" refers to the cwd, not the (misspelt) "sqlite3 db". I don't know if this is related to the other reports, but clearly some better error reporting would help. While I'm here, based on other reports, change "Affects only me" to "Affects Many People" Just for the record, this just happened to me. I was in a git branch which created a new port. I went back to main branch where the port and hence the current directory did not exist and got this error. This is with pkg 1.17.1 fixed in git, will be in the next release: https://github.com/freebsd/pkg/commit/cc2f7f96b01a3b11bc83fedc98c1bcdd4d56cbbe |