# Problem with updating ports..



## osx-addict (Jun 7, 2009)

Hi all.. 

I've had my system updating numerous ports over the past two days and am down to the following :


```
# pkg_version -vIL=
eog-2.26.2                          <   needs updating (index has 2.26.2_1)
gamin-0.1.10_2                      <   needs updating (index has 0.1.10_3)
gcc-4.3.4_20090517                  <   needs updating (index has 4.3.4.20090531)
gdm-2.24.1_6                        <   needs updating (index has 2.26.1_5)
gmime-sharp-2.2.22_1                <   needs updating (index has 2.2.23_1)
gnome-sharp-2.16.0_5                <   needs updating (index has 2.24.0_3)
p5-Compress-Raw-Zlib-2.019          <   needs updating (index has 2.020)
popt-1.7_5                          <   needs updating (index has 1.14)
```

However, if I do the following you can see what I get :


```
# portupgrade -vP popt
/usr/local/etc/pkgtools.conf:168: warning: already initialized constant OS_PKGBRANCH
--->  Session started at: Sun, 07 Jun 2009 15:13:12 -0700
** Stale lock file was found. Removed.
** None has been installed or upgraded.
--->  Session ended at: Sun, 07 Jun 2009 15:13:13 -0700 (consumed 00:00:00)
```

Any ideas why it won't upgrade any of these ports?


----------



## ericbsd (Jun 8, 2009)

Do you use 

```
portsnap fetch extract
```
to update your ports.


----------



## osx-addict (Jun 8, 2009)

I've got a cronjob that does :


```
portsnap -I cron update && pkg_version -vIL=
```


----------



## DutchDaemon (Jun 8, 2009)

ericturgeon said:
			
		

> Do you use
> 
> ```
> portsnap fetch extract
> ...



If you do, don't  The 'extract' bit is only for the very first time you donwload the ports tree (all 40+ MB of it). After that, 'extract' should be changed to 'update'.


----------



## ericbsd (Jun 8, 2009)

why? I always use extract. and never have problem with.


----------



## DutchDaemon (Jun 8, 2009)

You won't have a problem with it, no. But you're overwriting the entire ports tree time after time (checksumming and extracting 20,000 gz files every single time), instead of just patching the differences since the last portsnap run. It's overkill^n.


----------



## phoenix (Jun 8, 2009)

"portsnap extract" is the same as doing "csup", in that it touches every single file in the ports tree.

"portsnap update" only touches/updates the files that have changed since the last portsnap run.

Think of it like the difference between using "scp -r /" everyday for backups, instead of "rsync /".    One moves a whole heck of a lot more data than the other.


----------



## osx-addict (Jun 9, 2009)

I think I'll ditch the "-I" argument as I now see that tells it to only update the indexes -- probably something not as desirable..


----------



## osx-addict (Jun 9, 2009)

OK -- ditching the '-I' seems to be working now -- my cron logs are showing the updates (whereas before they didn't emit anything for the updates).. Thanks!


----------

