# Libreoffice has been built of wrong version (3.4.4)



## Ievgen (Jun 7, 2012)

Hi, 

Yesterday before going home I decided to install editors/libreoffice. So I left my laptop executing [cmd=]portinstall --batch libreoffice[/cmd]

Today, when I came to work and opened my laptop I saw the message that said 
	
	



```
fetch error, x11/kdelibs4
```
 Ok, never mind, so I verified the internet connection and executed [cmd=]portinstall --batch x11/kdelibs4[/cmd]

That worked fine, the package has been installed, so I decided to continue building libreoffice:


```
devel-pc# portinstall --batch libreoffice
** Found already installed package(s) of 'editors/libreoffice': libreoffice-3.4.4
```

How come could this had happened?

I did a little bit further investigation:

```
> pkg_info -o /var/db/pkg/libreoffice-3.4.4/
Information for libreoffice-3.4.4:

Origin:
editors/libreoffice

> portversion -v | grep libreoffice
libreoffice-3.4.4           <  needs updating (port has 3.5.2_4)
```

So I've got two questions:

How could editors/libreoffice be installed before x11/kdelibs4?
Why was it installed wit the wrong version?
Could you help me to understand this kind of mystery?


----------



## SirDice (Jun 7, 2012)

Ievgen said:
			
		

> 2. Why was it installed of wrong version ?


Your ports tree is not in sync with the /usr/ports/INDEX. The INDEX is newer. Update your ports tree with portsnap(8).


----------



## Ievgen (Jun 7, 2012)

I doubt, I always do *portsdb -Fu* after _csup_.
Nevertheless:


```
devel-pc# cat /usr/ports/editors/libreoffice/distinfo | head -1
SHA256 (libreoffice/libreoffice-core-3.5.2.2.tar.xz) = df681145f7f1dda30e3f82d4924722957662d744df0e7b6fa024b2bd53fb3dc6
```

Am I on the same page?


----------



## SirDice (Jun 7, 2012)

Ievgen said:
			
		

> I doubt, I always do portsdb -Fu after csup.


If I remember correctly this only updates the INDEX.db file from whatever is in INDEX. You can run *make index* in /usr/ports/ to generate an INDEX from your current ports tree.



> Nevertheless:
> 
> 
> ```
> ...


That does show the correct version. I wonder why it still picked the old one :x


----------



## Ievgen (Jun 8, 2012)

I've found the reason, libreoffice was said to be built only from packages in pkgtools.conf:

```
USE_PKGS_ONLY = [
        'editors/*libreoffice*',
  ]
```
I put it there some time ago and totally forgot. 
That's why it was picking up the latest available build.


----------

