# difference between output of portmaster -L and portmaster -na



## roelof (Jul 20, 2011)

Hello, 

When I do `# portmaster -L --index-only | egrep '(ew/ort) version|total install'`
The output is this :

```
===>>> 706 total installed ports
```

So I guess there are no updates.

But when I do `# portmaster -na` then this is the output:

```
===>>> The following actions will be taken if you choose to proceed:
	Upgrade bn-freebsd-doc-20110110 to bn-freebsd-doc-20110710
	Install textproc/docproj-jadetex
	Install chinese/docproj
	Install print/latex-cjk
	Install chinese/arphicttf
	Install chinese/ttfm
	Install chinese/ttf2pt1
	Install print/ttf2pt1
	Install print/t1utils
	Install print/dvipdfmx
	Install print/adobe-cmaps
	Install print/libpaper
	Install print/freetype
	Install print/freetype-tools
	Install print/teTeX
	Install print/cm-super
	Install x11-fonts/p5-type1inst
	Install print/dvipsk-tetex
	Install print/xdvik
	Install x11-toolkits/open-motif
	Install graphics/netpbm
	Install graphics/peps
	Install graphics/scr2png
	Install textproc/fixrtf
	Install textproc/html
	Install textproc/html2text
	Install textproc/linuxdoc
	Install textproc/openjade
	Install textproc/opensp
	Install textproc/scr2txt
	Install textproc/xhtml
	Install textproc/xmlcharent
	Install www/links1
	Install www/tidy
	Upgrade da-freebsd-doc-20110110 to da-freebsd-doc-20110710
	Upgrade de-freebsd-doc-20110110 to de-freebsd-doc-20110710
	Upgrade el-freebsd-doc-20110110 to el-freebsd-doc-20110710
	Upgrade en-freebsd-doc-20110110 to en-freebsd-doc-20110710
	Upgrade es-freebsd-doc-20110110 to es-freebsd-doc-20110710
	Upgrade fr-freebsd-doc-20110110 to fr-freebsd-doc-20110710
	Upgrade hu-freebsd-doc-20110110 to hu-freebsd-doc-20110710
	Upgrade it-freebsd-doc-20110110 to it-freebsd-doc-20110710
	Upgrade ja-freebsd-doc-20110110 to ja-freebsd-doc-20110710
	Upgrade mn-freebsd-doc-20110110 to mn-freebsd-doc-20110710
	Upgrade nl-freebsd-doc-20110110 to nl-freebsd-doc-20110710
	Upgrade pl-freebsd-doc-20110110 to pl-freebsd-doc-20110710
	Upgrade pt-freebsd-doc-20110110 to pt-freebsd-doc-20110710
	Upgrade ru-freebsd-doc-20110110 to ru-freebsd-doc-20110710
	Upgrade sr-freebsd-doc-20110110 to sr-freebsd-doc-20110710
	Upgrade tr-freebsd-doc-20110110 to tr-freebsd-doc-20110710
	Upgrade zh_cn-freebsd-doc-20110110 to zh_cn-freebsd-doc-20110710
	Upgrade zh_tw-freebsd-doc-20110110 to zh_tw-freebsd-doc-20110710
	Upgrade nspr-4.8.7 to nspr-4.8.8
	Upgrade nettle-2.1 to nettle-2.2
```

Now it looks if there are updates.

Can anyone explain me the difference.

Roelof


----------



## fmw (Jul 20, 2011)

It's the '/' that doesn't work here, '|' might be a better choice.

There's a simpler way without (e)grep:

`# pkg_version -vl '<'`

does the same thing. 

`# pkg_version -vL=` almost does the same thing, but is easier to type.


----------



## roelof (Jul 20, 2011)

oke, 

But I still not understand why the first say no updates and the second say there are updates.

Roelof


----------



## mix_room (Jul 20, 2011)

fmw said:
			
		

> There's a simpler way without (e)grep:
> ...
> almost does the same thing, but is easier to type.



I prefer the `# pkg_version -vL =` version as it will also output those packages which have outdated or unknown version information. Thus allowing you to fix those aswell, otherwise they may go undetected for quite some while.


----------



## SirDice (Jul 20, 2011)

Most of the additional packages are build dependencies. They are needed to update the doc packages and are currently not installed.


----------



## roelof (Jul 20, 2011)

Oke, 

But do I need to update them or not.
When I do the `# pkg_version -vL =` I see there are newer versions in ports
But why does the `# postmaster -L` pick them up.

Roelof


----------



## DutchDaemon (Jul 20, 2011)

The answer was given in line #1 of post #2. Reading replies is half the solution.


----------



## roelof (Jul 20, 2011)

Hello, 

Line 1 was 
	
	



```
It's the '/' that doesn't work here, '|' might be a better choice.
```
But in both I don't see a / only a few | 

Roelof


----------



## DutchDaemon (Jul 20, 2011)

Really?

`# portmaster -L --index-only | egrep '(ew/ort) version|total install'`
`# portmaster -L --index-only | egrep '(ew|ort) version|total install'`


----------



## roelof (Jul 20, 2011)

oke, 

I didn't see that one. I overlooked it several times and that happens often to me.
I look to much into details that I oversee things. Dam handicap.

Roelof


----------



## wblock@ (Jul 20, 2011)

fmw said:
			
		

> It's the '/' that doesn't work here, '|' might be a better choice.



Good eye, that went right past me.  That code is from Upgrading FreeBSD Ports.



> There's a simpler way without (e)grep:
> 
> `# pkg_version -vl '<'`
> 
> does the same thing.



Yes, but it takes 30 seconds versus 2.6 seconds for portmaster (on my system).


----------



## roelof (Jul 21, 2011)

Oke, 

But there's still a difference.
`# portmaster -L --index-only| egrep '(ew|ort) version|total install'`
Output 
	
	



```
portmaster -L --index-only| egrep '(ew|ort) version|total install'
===>>> 741 total installed ports
	===>>> There are no new versions available
```

Where as `# pkg_version -vl '<'` gives this output:

```
pkg_version -vl '<'
gpgme-1.3.0_3                       <   needs updating (port has 1.3.1)
seahorse-2.32.0_3                   <   needs updating (port has 2.32.0_4)
```

Roelof


----------



## wblock@ (Jul 21, 2011)

Using --index-only checks versions against the index file.  The ports servers rebuild the index file every few minutes.  If updates to the ports tree are downloaded before the index is rebuilt, it will cause these differences.

Run portsnap now and try it again, or don't use --index-only.  Or rebuild the index file manually (ports(7)) after an update, but it takes a long time.


----------

