diff options
author | bapt <bapt@FreeBSD.org> | 2012-09-18 22:09:23 +0000 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2012-09-18 22:09:23 +0000 |
commit | c572b3700b5f5a886c712abe51a0c11e0694893e (patch) | |
tree | 69719e7f7b03fdbfee3b9405328a678f568189c8 /usr.sbin/pkg_install/create | |
parent | 5005c75c5d4c3cea0b6150e4a8c7a1d2f928c052 (diff) | |
download | FreeBSD-src-c572b3700b5f5a886c712abe51a0c11e0694893e.zip FreeBSD-src-c572b3700b5f5a886c712abe51a0c11e0694893e.tar.gz |
if a file in plist starts with / then do not prefix it with "prefix" [1]
pkg info -g returns 1 if a file mismatch [2]
flush stdout in pkg info -g [3]
clean up quiet mode (-q | --quiet) output of pkg_version(1) [4]
fix missing error call in uname check added to pkg_version(1) [5]
fix pkg_add(1) fails to install with -C from bad path [6]
only resolve path from pkg_add(1) -p if the given prefix do not start with a '/' [7]
PR: bin/13128 [1]
bin/139015 [2]
bin/113702 [3]
bin/142570 [4]
bin/146857 [5]
bin/157543 [6]
Submitted by: cy [1]
Anton Yuzhaninov <citrin@citrin.ru> [2]
Ighighi <ighighi@gmail.com> [3]
"N.J. Mann" <njm@njm.me.uk> [4]
gcooper [5]
David Naylor <naylor.b.david@gmail.com> [6]
netchild [7]
MFC after: 2 weeks
Diffstat (limited to 'usr.sbin/pkg_install/create')
-rw-r--r-- | usr.sbin/pkg_install/create/perform.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/usr.sbin/pkg_install/create/perform.c b/usr.sbin/pkg_install/create/perform.c index 4409551..e2a884a 100644 --- a/usr.sbin/pkg_install/create/perform.c +++ b/usr.sbin/pkg_install/create/perform.c @@ -215,10 +215,14 @@ pkg_perform(char **pkgs) /* Prefix should add an @cwd to the packing list */ 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); + if (Prefix[0] != '/') { + 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); + } else { + add_plist_top(&plist, PLIST_CWD, Prefix); + } } /* Add the origin if asked, at the top */ |