# All ports return port directory error w/ portupgrade.



## reasons (Oct 1, 2010)

Still with a pretty new install of freebsd8.1, I updated ports with portsnap but when running portupgrade -a all ports look like this:

```
** Port directory not found: x11/xsetmode
** Port directory not found: x11/xsetroot
** Port directory not found: x11/xterm
** Port directory not found: x11/xtrans
** Port directory not found: multimedia/xvid
** Port directory not found: x11/xvinfo
** Port directory not found: x11/xwd
** Port directory not found: x11/xwininfo
** Port directory not found: x11/xwud
** Port directory not found: archivers/zip
** Port directory not found: shells/zsh
** Listing the failed packages (-:ignored / *:skipped / !:failed)
	- x11/xsetmode (port directory error)
	- x11/xsetroot (port directory error)
	- x11/xterm (port directory error)
	- x11/xtrans (port directory error)
	- multimedia/xvid (port directory error)
	- x11/xvinfo (port directory error)
	- x11/xwd (port directory error)
	- x11/xwininfo (port directory error)
	- x11/xwud (port directory error)
	- archivers/zip (port directory error)
	- shells/zsh (port directory error)
```


----------



## jb_fvwm2 (Oct 1, 2010)

maybe try portmaster,

```
cd /usr/ports/audio/yell
make install && rehash && yell
cd ../../ports-mgmt/portmaster
make install && yell
cd ../..
rehash
script -a PortUpgrade.txt portmaster [options] && yell
```
(not tested per se).
May be easier to see what the problem is...


----------



## DutchDaemon (Oct 1, 2010)

I see no problem with portmaster, but do note that weird errors may be caused by a temporary glitch (like a trailing empty line or a missing newline) in files like INDEX-* or MOVED. Re-portsnap to make sure your ports tree itself is not the cause.


----------



## wblock@ (Oct 1, 2010)

reasons said:
			
		

> Still with a pretty new install of freebsd8.1, I updated ports with portsnap but when running portupgrade -a



In general, using -a with portupgrade or portmaster is a big hammer looking for a problem.



> all ports look like this:
> 
> ```
> ** Port directory not found: x11/xsetmode
> ...



Are the directories really missing (ls -l /usr/ports/x11/xsetmode), or not?  Were you root when running portupgrade?


----------



## roddierod (Oct 1, 2010)

reasons said:
			
		

> Still with a pretty new install of freebsd8.1, I updated ports with portsnap



Since it's a new install, did you

```
#portsnap fetch
       #portsnap extract
```

or did you just 
	
	



```
#portsnap fetch update
```


----------



## reasons (Oct 1, 2010)

All ports are actually there and I have extracted with portsnap before. Still reading through the handbook and really what I'm looking for (gentoo background) is a emerge --sync --update --ask world type thing which from what I've found doesn't seem to exist.


----------



## jb_fvwm2 (Oct 1, 2010)

Another thread has a post in which I put forth
how to put "supfile.new" in /usr/ports.
If you have that file you can run

```
cvsup -g -L 2 -1 -P - supfile.new && yell
```
which should give you an updated ports tree
(you may want to run fastest-cvsup, the port,
to put the fastest site into supfile.new to where
you are located).
Whereupon you can

```
pkg_version -voL '=' | tee -a PortList.txt && yell
```
which should show you which ports you may want to
upgrade with portupgrade, portmaster, etc.
(Hopefully no typos...)
...
Unsure if that answers all of what the emerge
command would do.


----------



## reasons (Oct 1, 2010)

jb_fvwm2 said:
			
		

> Another thread has a post in which I put forth
> how to put "supfile.new" in /usr/ports.
> If you have that file you can run
> 
> ...


I'll give that a try, I was able to do 
[CMD="'"]pkg_version -vL='!?' [/CMD]

to see all of what would be updated and even trying to manually type in the long list gave the same errors. Silly of my to forget most people here wouldn't have used gentoo, the command would (in terms of what I'm trying to do here) sync the ports tree, and update all outdated ports with confirmation.

A bit more reading and, this may be common sense I missed, but I've been using pkg_add which may or may not be using the latest version but the lastest compiled version. Not sure if that would throw a wrench into this, either way I'm going to go through and compile everthing instead. Doing this I would get a lot of errors like "An older package exists . . .  make reinstall . . . .if you really want to overwrite", whould i just overwrite it all?


----------



## wblock@ (Oct 1, 2010)

jb_fvwm2 said:
			
		

> Another thread has a post in which I put forth
> how to put "supfile.new" in /usr/ports.
> If you have that file you can run
> 
> ...



csup(1) is already present in FreeBSD 8, use it instead of cvsup.  But portsnap(8) is the preferred method.  It's supposed to be faster, lower bandwidth, and the user doesn't need to configure a supfile.



> ...
> Whereupon you can
> 
> ```
> ...



If you have ports-mgmt/portupgrade installed,
`% portversion -vl'<'`
should be faster.

For interested parties, here's my Upgrading FreeBSD Ports article.


----------



## jb_fvwm2 (Oct 2, 2010)

If you get the "already installed, if you really want to..." type 
of message , what I usually do is,

```
pkg_delete -f /var/db/pkg/port-number && make install && yell
```
Of course how I do it is probably how no one else does it... usually.


----------

