# Confused with the number of ports upgraded by portupgrade.



## sixtydoses (Dec 14, 2009)

Hi,

I ran the the command `portupgrade -frR farsight2` at about 11:09 but for some reason I had to stop it before the upgrade is completed. If I'm not mistaken the number of ports that need to be upgraded was shown as 119.

After few hours I decided to resume my portupgrade, so I used the command `portupgrade -frR farsight2 "<=2009-12-10 11:00"` to continue upgrading from where I left.

I was thinking that the number of ports that need to be upgraded will probably the same as previous since I'm using the -f flag, but to my surprise it shows that there are 968 ports to be upgraded.

So yea I'm kind of confused by the huge discrepancy of the two figures(119 and 968), or is there something wrong with my command?

Thanks in advance.


----------



## mickey (Dec 14, 2009)

sixtydoses said:
			
		

> After few hours I decided to resume my portupgrade, so I used the command `portupgrade -frR farsight2 "<=2009-12-10 11:00"` to continue upgrading from where I left.



The syntax of the portupgrade command is something like:

```
portupgrade [options] pkgname_glob ...
```

So with your commandline, you effectively told portupgrade to force (-f) an upgrade, including required (-R) and dependant (-r) packages of:

farsight2
Everything installed prior or equal to 2009-12-10 11:00
What you probably wanted would have been something like:
`# portupgrade -frR -x ">= 2009-12-10 11:00" farsight2`

Which would have performed the exact same update operation, you performed in the first place, but would have excluded everything installed after 2009-12-10 11:00.


----------



## sixtydoses (Dec 14, 2009)

Ohhh.. it all comes to my senses now.

This `portupgrade -frR -x ">= 2009-12-10 11:00" farsight2`, I supposed is the same as `portupgrade -frR "<= 2009-12-10 11:00" farsight2` ?

Thanks much, mickey.


----------



## mickey (Dec 14, 2009)

sixtydoses said:
			
		

> Ohhh.. it all comes to my senses now.


:e



			
				sixtydoses said:
			
		

> This `portupgrade -frR -x ">= 2009-12-10 11:00" farsight2`, I supposed is the same as `portupgrade -frR "<= 2009-12-10 11:00" farsight2` ?



Um, no. These mean totally different things.
In the first form, the date is associated with the -x (exclude) switch.
In the latter, the date is simply another item in the list of packages, you tell portupgrade to process.


----------



## sixtydoses (Dec 14, 2009)

Ahh.. awesome.. awesome.

Thanks a bunch :stud


----------

