pkg version without /usr/ports (pkgng)

Hello,

I usually use a daily script that runs in my jails: pkg_version -I /foo/my_index_file where my_index_file is a copy of /usr/ports/INDEX-9 in the host, because I disable /usr/ports in my jails (the directory exists but is empty). I installed FreeBSD 9.2-RELEASE. Now I use new PKGNG. I created a jail and I tried to do pkg version -I /foo/my_index_file. Then I get the following message:
Code:
pkg: Unable to open ports directory /usr/ports: No such file or directory
I can do pkg version -I in the host or in the jail if I mount /usr/ports.

Thanks.
 
I tried this in the host: pkg version -Rv. I get the following message:
Code:
Updating repository catalogue
Segmentation fault (core dumped)

Thanks.
 
Try removing some of the old repository files, they may be corrupted. rm /var/db/pkg/repo-*.
 
No chance, I removed two /var/db/pkg/repo-* files, then I get the same result. Now I have one /var/db/pkg/repo-FreeBSD.sqlite file.
 
Just to add information, my /usr/local/etc/pkg/repos/FreeBSD.conf:
Code:
FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
  mirror_type: "srv",
  enabled: yes
}

Did I miss something?
Thanks.
 
Just an edit:

Code:
pkg version -I
[...]
pkg-1.2.5                          =
[...]

and

Code:
pkg version -I foo/bar
[...]
pkg-1.2.5                          =
[...]

It seems pkg version -I uses /usr/ports/INDEX-9 anyway.

(note I updated ports-mgmt/pkg to 1.2.5)
 
Back
Top