perform.c (231328) | perform.c (240682) |
---|---|
1/* 2 * FreeBSD install - a package for the installation and maintenance 3 * of non-core utilities. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 5 unchanged lines hidden (view full) --- 14 * Jordan K. Hubbard 15 * 18 July 1993 16 * 17 * This is the main body of the create module. 18 * 19 */ 20 21#include <sys/cdefs.h> | 1/* 2 * FreeBSD install - a package for the installation and maintenance 3 * of non-core utilities. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 5 unchanged lines hidden (view full) --- 14 * Jordan K. Hubbard 15 * 18 July 1993 16 * 17 * This is the main body of the create module. 18 * 19 */ 20 21#include <sys/cdefs.h> |
22__FBSDID("$FreeBSD: head/usr.sbin/pkg_install/create/perform.c 231328 2012-02-10 00:53:39Z eadler $"); | 22__FBSDID("$FreeBSD: head/usr.sbin/pkg_install/create/perform.c 240682 2012-09-18 22:09:23Z bapt $"); |
23 24#include "lib.h" 25#include "create.h" 26 27#include <err.h> 28#include <libgen.h> 29#include <signal.h> 30#include <stdlib.h> --- 179 unchanged lines hidden (view full) --- 210 add_plist(&plist, PLIST_SRC, SrcDir); 211 } 212 213 /* Slurp in the packing list */ 214 read_plist(&plist, pkg_in); 215 216 /* Prefix should add an @cwd to the packing list */ 217 if (Prefix) { | 23 24#include "lib.h" 25#include "create.h" 26 27#include <err.h> 28#include <libgen.h> 29#include <signal.h> 30#include <stdlib.h> --- 179 unchanged lines hidden (view full) --- 210 add_plist(&plist, PLIST_SRC, SrcDir); 211 } 212 213 /* Slurp in the packing list */ 214 read_plist(&plist, pkg_in); 215 216 /* Prefix should add an @cwd to the packing list */ 217 if (Prefix) { |
218 char resolved_prefix[PATH_MAX]; 219 if (realpath(Prefix, resolved_prefix) == NULL) 220 err(EXIT_FAILURE, "couldn't resolve path for prefix: %s", Prefix); 221 add_plist_top(&plist, PLIST_CWD, resolved_prefix); | 218 if (Prefix[0] != '/') { 219 char resolved_prefix[PATH_MAX]; 220 if (realpath(Prefix, resolved_prefix) == NULL) 221 err(EXIT_FAILURE, "couldn't resolve path for prefix: %s", Prefix); 222 add_plist_top(&plist, PLIST_CWD, resolved_prefix); 223 } else { 224 add_plist_top(&plist, PLIST_CWD, Prefix); 225 } |
222 } 223 224 /* Add the origin if asked, at the top */ 225 if (Origin) 226 add_plist_top(&plist, PLIST_ORIGIN, Origin); 227 228 /* 229 * Run down the list and see if we've named it, if not stick in a name --- 374 unchanged lines hidden --- | 226 } 227 228 /* Add the origin if asked, at the top */ 229 if (Origin) 230 add_plist_top(&plist, PLIST_ORIGIN, Origin); 231 232 /* 233 * Run down the list and see if we've named it, if not stick in a name --- 374 unchanged lines hidden --- |