# Something is wrong with pkg_upgrade



## HL1234 (Feb 16, 2013)

Hello,
I use a poor powered machine and so I like to install packages rather then install over the ports.

"pkg_upgrade -avn" give me the advice to update some packages:

```
[server /] => pkg_upgrade -avn
	Synchronize the local index copy with the package server.
	Make a list of outdated packages.
	Perform dependency checks.
	Sort packages by dependency.
	[color="Blue"]The following packages will be updated:[/color]
         Update <python27-2.7.2_3> to <python27-2.7.3_3> (lang/python27)
	Update <portupgrade-2.4.9.9,2> to <portupgrade-2.4.10.2,2> (ports-mgmt/portupgrade)
	Update <pcre-8.30_2> to <pcre-8.31_1> (devel/pcre)
	Update <proftpd-1.3.4a_2> to <proftpd-1.3.4b> (ftp/proftpd)
	Update <mysql-client-5.5.25> to <mysql-client-5.5.28> (databases/mysql55-client)
	Update <proftpd-mod_sql_mysql-1.3.4a_2> to <proftpd-mod_sql_mysql-1.3.4b> 
               (databases/proftpd-mod_sql_mysql)
	Update <lsof-4.86,7> to <lsof-4.87.a,7> (sysutils/lsof)
..
```

So I do:

```
[server /] => pkg_upgrade -av
	Synchronize the local index copy with the package server.
	Start the download manager.
	Make a list of outdated packages.
	Perform dependency checks.
	Sort packages by dependency.
	Validate downloaded packages.
	/usr/ports/packages/All/bash-4.2.37.tbz       100% of 1054 kB  141 kBps
fetch: ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9-stable/All/apache22-itk-mpm-2.2.22_8.tbz: 
[color="Red"]Protocol error
pkg_upgrade: The package <apache22-itk-mpm-2.2.22_8.tbz> could not be fetched.[/color]
..
```
There is an error. I have tried it some times and it hangs every time and also on other packages.

The package path shout be correct:

```
[server /] => setenv
PKG_TMPDIR=/tmp/install
PACKAGEROOT=ftp://ftp.freebsd.org/pub
PACKAGESITE=ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9-stable/All
```
#also I can fetch the package via ftp:
	
	



```
[server /] => fetch [url]ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9-stable/All/apache22-itk-mpm-2.2.22_8.tbz[/url] 

[server /] => ls apache22-itk-mpm-2.2.22_8.tbz                                                                         
apache22-itk-mpm-2.2.22_8.tbz
```

And I can install it alone:

```
[server /] => pkg_upgrade -v apache22-itk-mpm
Synchronize the local index copy with the package server.
Start the download manager.
Make a list of outdated packages.
Perform dependency checks.
Sort packages by dependency.
Validate downloaded packages.
/usr/ports/packages/All/apache22-itk-mpm-2.2.2100% of 3924 kB 1001 kBps
Install 1 package(s).
===> Update <apache-itk-2.2.22_5> to <apache22-itk-mpm-2.2.22_8> (www/apache22-itk-mpm)
/usr/local/etc/apache22/httpd.conf /usr/local/share/examples/apache22/httpd.conf differ: char 235, line 5
===> Creating users and/or groups.>.
...
	=> Update <apache-itk-2.2.22_5> to <apache22-itk-mpm-2.2.22_8> (www/apache22-itk-mpm) succeeded
```

So my question is *what is wrong with "pkg_upgrade -a"*. 
It is not a solution to install all new found packages with hand 
- may be some servers get more then 400 of it.

My be some one has make the same experience.


----------

