# Problem with pkg index



## cduret (Oct 21, 2014)

*H*ello,

I have _a_ similar problem to this post (https://forums.freebsd.org/threads/pkg-version-issues.48059/)

I have recently updated my ports and I still have some ports when I check outdated ports with*:*

```
# pkg version -vl '<'
dri-9.1.7_6,2                      <   needs updating (index has 10.3.0,2)
libGL-9.1.7_3                      <   needs updating (index has 10.3.0)
libglapi-9.1.7_2                   <   needs updating (index has 10.3.0)

# portmaster -a
===>>> Gathering distinfo list for installed ports

===>>> Starting check of installed ports for available updates

===>>> All ports are up to date
```

I have followed instructions for updating pkg in UPDATING with*:*


```
..
For port users:
      # make -C /usr/ports/ports-mgmt/pkg build deinstall install clean
      # pkg check -Ba
..
```

But I still have the issue, I have still those ports marked as outdated.

Thanks for help.


----------



## SirDice (Oct 21, 2014)

How did you update your ports tree? If you used svn you need to rebuild the INDEX file yourself. `make -C /usr/ports index`

As for these specific ports, if you're on FreeBSD 9.x you may need to set WITH_NEW_XORG in /etc/make.conf.


----------



## cduret (Oct 21, 2014)

My version*:*

```
@ sudo uname -a
FreeBSD darkstar 10.0-STABLE FreeBSD 10.0-STABLE #0 r262971: Mon Mar 10 13:27:40 CET 2014     root@darkstar:/usr/obj/usr/src/sys/THINKPKERNEL  amd64
```

I generally use `# portsnap fetch extract`.


----------



## SirDice (Oct 21, 2014)

There's no need for extract as that will extract the entire ports tree from zero. Updating is generally done with `portsnap fetch update`. But this doesn't explain the differences though. 

What do `pkg version -vRL'='` and `pkg version -vIL'='` say?


----------



## cduret (Oct 21, 2014)

Indeed I shoud not do extract each time, thanks.

No need for further tests.
I rebuilt the INDEX with `make -C /usr/ports index`

And now everything seems perfect*:*

```
# pkg version -vl '<'
# portmaster -a
===>>> Gathering distinfo list for installed ports

===>>> Starting check of installed ports for available updates

===>>> All ports are up to date
```

Thank you very much for help!!!


----------



## rezzo (Oct 22, 2014)

Using `make -C /usr/ports index` seems to solve the problem only temporarily.
Once I used again the command `portsnap fetch update`, this INDEX file inconsistency reappeared.
FYI, I also tried to clean things up with `rm -r /usr/ports/*` and then `portsnap fetch extract`, but the problem persists. As follows:

```
# pkg version -vl '<'
dri-9.1.7_6,2                      <   needs updating (index has 10.3.0,2)
libEGL-9.1.7_4                     <   needs updating (index has 10.3.0)
libGL-9.1.7_3                      <   needs updating (index has 10.3.0)
libglapi-9.1.7_2                   <   needs updating (index has 10.3.0)
libglesv2-9.1.7_3                  <   needs updating (index has 10.3.0)
```
I am on FreeBSD 10.0-STABLE r264641.
Thanks for your help!


----------



## protocelt (Oct 22, 2014)

rezzo said:


> Using `make -C /usr/ports index` seems to solve the problem only temporarily.
> Once I used again the command `portsnap fetch update`, this INDEX file inconsistency reappeared.
> FYI, I also tried to clean things up with `rm -r /usr/ports/*` and then `portsnap fetch extract`, but the problem persists. As follows:
> 
> ...



I'm not really sure if this is necessarily a problem per se. I think dri-9.1.7_6,2 or dri-10.3.0,2 is default depending on graphics hardware being used. It would make sense that if dri-9.1.7_6,2 is default for your hardware, what your seeing isn't an error but just pkg telling you that there is indeed updated packages compared to what's installed even though your using the correct version. What is the output of `% cat /etc/make.conf` and `% pkg info xorg-server`? Also are you using Intel, AMD, or Nvidia graphics?


----------



## wblock@ (Oct 22, 2014)

SirDice said:


> How did you update your ports tree? If you used svn you need to rebuild the INDEX file yourself. `make -C /usr/ports index`



I think portmaster(8) fetches the latest index file.  At least I have not manually rebuilt the index file in several years...


----------



## rezzo (Oct 22, 2014)

protocelt said:


> I'm not really sure if this is necessarily a problem per se. I think dri-9.1.7_6,2 or dri-10.3.0,2 is default depending on graphics hardware being used. It would make sense that if dri-9.1.7_6,2 is default for your hardware, what your seeing isn't an error but just pkg telling you that there is indeed updated packages compared to what's installed even though your using the correct version. What is the output of `% cat /etc/make.conf` and `% pkg info xorg-server`? Also are you using Intel, AMD, or Nvidia graphics?


I'm inclined to think this is a real problem for the following reasons:
- Rebuilding the INDEX fixes it (temporarily).
- There seems to be no dri-10.3.0,2 in the ports tree (look here, v9.1.7_6,2 is the last one).
I have a NVIDIA 9500 GT graphics card with its native drivers installed (x11/nvidia-driver 331.67_1) but that's irrelevant, since I'm on a headless machine. I've also used the generic nv and vesa drivers in xorg.conf before, with no problems. graphics/dri 9.1.7_6,2 is a required package for x11-servers/xorg-server 1.12.4_9,1 (x11/xorg 7.7_1) which I have installed.


----------



## protocelt (Oct 23, 2014)

rezzo said:


> [...]
> - There seems to be no dri-10.3.0,2 in the ports tree (look here, v9.1.7_6,2 is the last one).
> [...]



If you look at the port description on the FreshPorts page you linked to it will show dri-10.3.0,2 is available as part of the new Mesa ports updates and will be available to install instead of dri-9.1.7_6,2 when certain criteria is met. graphics/dri was automatically updated for me to dri-10.3.0,2 when I updated with ports-mgmt/portmaster a few days ago. That did kind of surprise me however as I don't use any KMS drivers on my main workstation...

I also track 10-STABLE. From workstation:

```
% pkg info dri
dri-10.3.0,2
Name           : dri
Version        : 10.3.0,2
Installed on   : Fri Oct 17 16:15:39 CDT 2014
Origin         : graphics/dri
Architecture   : freebsd:10:x86:64
Prefix         : /usr/local
Categories     : graphics
Maintainer     : x11@FreeBSD.org
WWW            : http://dri.sourceforge.net/
Comment        : OpenGL hardware acceleration drivers for the DRI
Options        :
        GALLIUM        : on
        TEXTURE        : off
        VDPAU          : on
Shared Libs required:
        libxcb.so.1
        libxcb-dri2.so.0
        libtinfo.so.5.9
        libexpat.so.6
        libdrm_radeon.so.1
        libdrm_intel.so.1
        libdrm.so.2
        libc++.so.1
        libXvMC.so.1
        libXv.so.1
        libX11.so.6
        libX11-xcb.so.1
        libLLVM-3.4.so
Shared Libs provided:
        mesa_dri_drivers.so
        libvdpau_gallium.so.1
        libXvMCgallium.so.1
        gallium_dri.so
Flat size      : 15.5MiB
Description    :
This package contains the current stable release of the client drivers for the
DRI.  With an X Server configured for the DRI they allow direct rendering of
hardware-accelerated OpenGL.

WWW: http://dri.sourceforge.net/
```


----------



## rezzo (Oct 23, 2014)

protocelt said:


> If you look at the port description on the FreshPorts page you linked to it will show dri-10.3.0,2 is available as part of the new Mesa ports updates and will be available to install instead of dri-9.1.7_6,2 when certain criteria is met.


You are right. I guess my "hardware context" is not suitable to upgrade from v9.1.7 to v10.3.0. I'd prefer some different solution, anyway, like splitting the dri port in "-legacy" and "-current" versions. I rely on `pkg version -vl '<'` to determine if my installed ports are up-to-date and these constant "needs updating" messages are a bit... distracting.
Thanks!


----------



## rezzo (Nov 27, 2014)

Hello. I'm posting just to report that with the release of dri-10.3.3,2 and libGL-10.3.3, now `portmaster` updated both ports on my system, thus fixing the problem.


----------

