On Aug 14, 2007, at 7:15 PM, [EMAIL PROTECTED] wrote:

N_Ox <[EMAIL PROTECTED]> writes:
Question 1:  I thought I had to create directories manually when
copying
my own destroot or pre- or post- destroot phases.  If not, can it
simply
be omitted for the file specified in the MacPorts guide under
"MacPorts
File Hierarchy".  That is the mtree, correct?

I think I create directories in destroot for a lot of ports, and I
thought
others did too so I'm confused.

Don't worry, I've just discovered that by mistake, I haven't created
an mtree directory and xinstall didn't complain.
I think they are created before the destroot stage and that these
that remain empty after are deleted in destroot_finish.

Okay, so the rule must be that you don't need to create directories
manaually to put files in top-level mtree directories for destroot or
post-destroot phases, otherwise yes.

Mark


There's the ${prefix}/etc/macports/prefix.mtree file and whatever is listed there is created by MacPorts itself during the pre-destroot stage as the installation bed for a destrooting port (destroot_start proc in base/src/port1.0/portdestroot.tcl [1]). Once the destroot stage is done, whatever directory in the destroot that's void of any files (that is, the destrooting port didn't place anything in them) gets pruned during the post-destroot closing stage. Therefore, anything else that's not in the default mtree needs to be created manually and anything you intend to keep for installation even if empty has to be safeguarded through a destroot.keepdirs clause.

        HTH! Ping me if not ;-)


-jmpp


[1]:

$[juan @macbookpro: macports1.0](858/0,1) -> sudo find /opt/local - name macosx.mtree
/opt/local/share/macports/resources/port1.0/install/macosx.mtree

$[juan @macbookpro: macports1.0](859/0,1) -> sudo find /opt/local - name prefix.mtree
/opt/local/etc/macports/prefix.mtree
/opt/local/share/macports/resources/port1.0/install/prefix.mtree

I wonder if we still use the mtree file installed in ${prefix}/etc/ macports/ for something? Anyone care to destroot a port after moving it aside and report any findings? (comparing to destrooting after moving the one in /opt/local/share/macports/resources/port1.0/ install/ aside would be ideal).

_______________________________________________
macports-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo/macports-dev

Reply via email to