portupgrade across NFS

Michael Collette Michael.Collette at TestEquity.com
Tue Jun 6 00:44:38 UTC 2006

I've got a setup here where I need to run portupgrade on a different box 
from the one where the port is actually going to.  I have all the NFS 
exports setup on the target box and mount points on the installer. 
Almost everything is working... except the reason for this posting.

When portupgrade attempts to remove the entry in /var/db/pkg for the old 
port, it fails to remove the directory.  It does remove all the contents 
of the directory, but not the directory itself.

This problem only occurs when using portupgrade.  Both pkg_delete and 
pkg_deinstall work without error.  Also, everything else in the process 
that portupgrade goes through appears to work properly.  Just that 
/var/db/pkg directory won't delete when NFS mounted.

Apparently other folks have had this problem before as I discovered upon 
googling about.  The following PR touches on the matter.


Been staring at Ruby code I don't fully understand for the better part 
of 2 days now, and I don't understand why this glitch is happening.  It 
looks like portupgrade simply calls to pkg_deinstall, which is a wrapper 
for pkg_delete.  Logically if the last 2 work, then portupgrade should 
as well, but obviously it doesn't.

Anyone out there able to make any sense of that Ruby code?  Is there 
something we can patch in there to get this tid bit functional?

Michael Collette
IT Manager
TestEquity LLC

More information about the freebsd-questions mailing list