Python-dependent port install fails when port & Python use PREFIX

Mike Brown mike at skew.org
Sat Dec 11 00:46:37 PST 2004


Kris Kennaway wrote:
> You have to also set LOCALBASE to tell the port where to look for its
> already-installed dependencies.

Thanks! That helped a lot.
Now I have another related question.

I noticed that when following the instructions in the Porter's Handbook to 
generate the pkg-plist automatically, I ended up with my plist containing not 
just all the files that were installed by my port, but also all the files 
installed by the port's dependency: all of Python!

It seems to me that the procedure used to detect changes to dirs in the 
temporary tree should also apply to files. The following seemed to work:

# mkdir /var/tmp/py-xml
# mtree -U -f /etc/mtree/BSD.local.dist -d -e -p /var/tmp/py-xml
# make depends PREFIX=/var/tmp/py-xml LOCALBASE=/var/tmp/py-xml
# (cd /var/tmp/py-xml && find -d * -type d) | sort >! OLD-DIRS
# (cd /var/tmp/py-xml && find -d * \! -type d) | sort >! OLD-FILES
# make install PREFIX=/var/tmp/py-xml LOCALBASE=/var/tmp/py-xml
# (cd /var/tmp/py-xml && find -d * \! -type d) | sort | comm -13 OLD-FILES - | sort -r >! pkg-plist
# (cd /var/tmp/py-xml && find -d * -type d) | sort | comm -13 OLD-DIRS - | sort -r | sed -e 's#^#@dirrm #' >> pkg-plist

(I'm using tcsh, so I use the ">!" idiom for clobbering)

Does that sound reasonable? The resulting pkg-plist seems to be correct.
Should the handbook be updated or are there cases where this isn't the
way to do it?

Thanks,
Mike


More information about the freebsd-ports mailing list