Subject: Re: make print-PLIST and pkg_add use different quote/escape conventions
To: None <tech-pkg@NetBSD.org>
From: J Chapman Flack <flack@cs.purdue.edu>
List: tech-pkg
Date: 03/13/2005 16:33:00
>  	add/futil.c:                    if (fexec("mkdir", dir, NULL))
>  	add/perform.c:                                          (void) fexec("mkdir", "-p", p->name, NULL);
>  	add/perform.c:          if (fexec("mkdir", "-p", dbdir, NULL)) {

Aha.  Those handle mkdir operations internal to pkg_add itself.
@exec actions in the PLIST file are handled here:

extract.c:

        case PLIST_CMD:
                format_cmd(cmd, sizeof(cmd), p->name, Directory, last_file);
                PUSHOUT(Directory);
                if (Verbose)
                        printf("extract: execute '%s'\n", cmd);
==>             if (!Fake && system(cmd))
                        warnx("command '%s' failed", cmd);
                break;

-Chap