PERFORCE change 176074 for review
Garrett Cooper
gcooper at FreeBSD.org
Thu Mar 25 06:24:13 UTC 2010
http://p4web.freebsd.org/chv.cgi?CH=176074
Change 176074 by gcooper at gcooper-bayonetta on 2010/03/25 06:23:55
Checkin local change for bin/145000.
Affected files ...
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/usr.sbin/pkg_install/create/perform.c#2 edit
Differences ...
==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/usr.sbin/pkg_install/create/perform.c#2 (text+ko) ====
@@ -208,8 +208,12 @@
read_plist(&plist, pkg_in);
/* Prefix should add an @cwd to the packing list */
- if (Prefix)
- add_plist_top(&plist, PLIST_CWD, Prefix);
+ if (Prefix) {
+ char resolved_prefix[PATH_MAX];
+ if (realpath(Prefix, resolved_prefix) == NULL)
+ err(EXIT_FAILURE, "couldn't resolve path for prefix: %s", Prefix);
+ add_plist_top(&plist, PLIST_CWD, resolved_prefix);
+ }
/* Add the origin if asked, at the top */
if (Origin)
@@ -254,7 +258,9 @@
/* mark_plist(&plist); */
/* Now put the release specific items in */
- add_plist(&plist, PLIST_CWD, ".");
+ if (!Prefix) {
+ add_plist(&plist, PLIST_CWD, ".");
+ }
write_file(COMMENT_FNAME, Comment);
add_plist(&plist, PLIST_IGNORE, NULL);
add_plist(&plist, PLIST_FILE, COMMENT_FNAME);
More information about the p4-projects
mailing list