Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Dec 2004 01:46:37 -0700 (MST)
From:      Mike Brown <mike@skew.org>
To:        freebsd-ports@freebsd.org
Subject:   Re: Python-dependent port install fails when port & Python use PREFIX
Message-ID:  <200412110846.iBB8kbgY091609@chilled.skew.org>
In-Reply-To: <20041211074202.GB9292@xor.obsecurity.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200412110846.iBB8kbgY091609>