Re: portversion vs pkg_version

From: Kris Kennaway (kkenn_at_rot13.obsecurity.org)
Date: 09/02/03


Date: Tue, 02 Sep 2003 17:00:15 GMT

In article <3f533075$0$25245$5fc3050@dreader1.news.tiscali.nl>, Marco van Lienen wrote:
> Hi all!
>
> I know portversion comes from the portupgrade port and pkg_version from the
> base install.
> But when I run a `pkg_version -L =` and a `portversion -L =` the ouput is
> different.
> I don't understand yet why that is, since AFAIK both give status info back
> with regard to installed ports/packages.

portversion uses the INDEX file to look up port versions. If your
INDEX is out of date you will get stale results. You can build a new
INDEX file with portsdb -uU, but this can take a long time depending
on hardware. pkg_version does not use INDEX but queries the port
versions directly - as a result it is usually slower than portversion
(not as slow as a full INDEX rebuild) but guaranteed to be accurate.

Kris



Relevant Pages

  • Re: portversion vs. pkg_version
    ... portversion(uses the INDEX file to look up port versions) is ... use portversion instead, it's efficient cause it use port database. ...
    (freebsd-questions)
  • Re: Portsnap support on CURRENT
    ... portversion (from the portupgrade port) to list which of my packages are ... These messages are incorrect (i.e., ...
    (freebsd-current)
  • Re: Portupgrade Broke?
    ... Just ran the portversion command for the ... >>first time since last Saturday and the ouptut indicated that my ... Yesterday, I brought all of my packages up-to-date, ran pkgdb -F, ... succeeds port ". ...
    (freebsd-questions)
  • Re: Portsnap support on CURRENT
    ... portversion to list which of my packages ... Investigation of the portsnap source ... to generate INDEX-7: ...
    (freebsd-current)
  • Re: Portsnap support on CURRENT
    ... the "port has" version identified by portversion is older than ... it only actually generates INDEX, INDEX-5, and INDEX-6 from portsnap ... updates in extract_indices; it doesn't generate INDEX-7. ...
    (freebsd-current)