2007-01-24 DarwinPorts or MacPorts

I have an old version of DarwinPorts installed. It is so old, in fact, that it no longer selfupdates:

DarwinPorts

DarwinPorts base version 1.102 installed
Selfupdate failed: couldn't open "/opt/local/var/db/dports/sources/rsync.rsync.opendarwin.org_dpupdate1/base/dp_version": no such file or directory

Grrr!

Should I just reinstall it all? I have a lot of outdated packages, and I expect there are quite a lot of unused packages as well. It might be a good idea to start from a clean slate.

Alpinobombus:~ alex$ sudo port installed|wc -l
      86
Alpinobombus:~ alex$ sudo port outdated|wc -l
      52

Except that I refuse to believe that this is a good idea. A good system should never require restarting from a clean slate! >{

Oh, and I changed the `portarchivemode` option in `/opt/local/etc/ports/ports.conf` to “no”. No more archives of the binary stuff I built. I don’t think I ever installed and uninstalled the same version multiple times. I did rebuild a package now and then, and on these occasion the unpacking of the old binary from the archive instead of a rebuild confused me to no end. I’m not sharing the binaries with anybody else, either. I might as well do without and save some diskspace.

​#Software

Comments

(Please contact me if you want to remove your comment.)

Does doing a “port sync” before trying selfupdate help at all? It’s been awhile since I’ve played with DarwinPorts.

DarwinPorts

– ndrake 2007-01-24 13:49 UTC

ndrake

---

Thanks the pointer. It seems to make no difference. The `dp_version` file is still missing. If you’re no longer using DarwinPorts – what are you using? Or have you switched away from OSX?

DarwinPorts

Alpinobombus:~ alex$ sudo port -d sync
Synchronizing from rsync://rsync.opendarwin.org/dpupdate/dports
receiving file list ... done

wrote 101 bytes  read 226503 bytes  41200.73 bytes/sec
total size is 13694186  speedup is 60.43
Alpinobombus:~ alex$ sudo port selfupdate
DarwinPorts base version 1.102 installed
Selfupdate failed: couldn't open "/opt/local/var/db/dports/sources/rsync.rsync.opendarwin.org_dpupdate1/base/dp_version": no such file or directory

It seems I am not alone with this problem. ¹ No help to be found, however.

¹

– AlexSchroeder 2007-01-24 15:25 UTC

---

I’ve installed MacPorts 1.3.1 from a diskimage, and moved the following stuff from the old `/opt/local/` directory over to the new one:

MacPorts

var/db/dports/distfiles/*
var/db/dports/receipts/*
/var/db/dports/software

At least `sudo port selfupdate`, `sudo port installed` and `sudo port outdated` seem to produce the correct output. 😄

I looked at the output of `sudo port outdated` and using lots of `port info` and `port dependents` to figure out candidates for `sudo port uninstall`. I think it worked! It also meant quite some typing. I’d love a simple GUI for this... Maybe I should write something recurses up and down the dependencies, tells you which packages have no dependencies – usually the “apps” that you really need, or the dependencies of apps that you didn’t need and have subsequently uninstalled. And it should make it easy to launch an uninstall command, let the user verify the chain of dependencies, and then launch the correct command.

Now I’m running `sudo port upgrade installed`...

– AlexSchroeder 2007-01-24 15:57 UTC

---

Hm. I see where I went wrong. My moving around of files didn’t keep the installed stuff in _opt_local! And so now the port system thinks that some things are installed that are not really there. Argh.

This resulted in config errors when trying to install the tiff package. Something about a jpeg header file missing. So I had to force the uninstall of the jpeg package (since it wasn’t there anyway) and reinstall it:

sudo port uninstall -f jpeg
sudo port install jpeg
sudo port install tiff

So basically I’m in a minefield already. What a mess.

Here’s a command-line to find packages with no dependents:

`for f in`port installed -q|sed -n ’s/^ \(.*\) @.*_\1_p’`; do port dependents $f|grep "no dep"; done`

So, should you be in the same position, you should try to install MacPorts in-place, I think. The moving around of directories I did was not enough. My problem was that I missed the directories where the installed files actually reside (such as `bin`!), then I uninstalled some, and from then I was unable to fix the mess except by forcefully (`-f`) uninstalling and reinstalling packages.

MacPorts

– Alex Schroeder 2007-01-25 09:38 UTC

Alex Schroeder

---

What is ’alpinobombus’ ? A bumblebee ? Is there a story here ?

– AlokSingh 2007-01-25 10:38 UTC

AlokSingh

---

Not much of a story: I call my machines by bumblebee subgenera... (→ NamingScheme)

NamingScheme

– Alex Schroeder 2007-01-25 11:47 UTC

Alex Schroeder

---

I encountered exactly the same problem but found a way to hack round it that did not require a fresh install. See: http://www.rufuspollock.org/archives/159

http://www.rufuspollock.org/archives/159

– Anonymous 2007-02-13 13:09 UTC

Anonymous