Date: Thu, 29 Nov 2007 19:42:31 GMT From: Garrett Cooper <gcooper@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 129789 for review Message-ID: <200711291942.lATJgVBi097962@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=129789 Change 129789 by gcooper@shiina-ibook on 2007/11/29 19:42:08 Still not sure how far the sandbox will encompass the rest of the operations, but in the event that the sandbox is a necessary component for all operations, add the option of creating or not creating the physical sandbox.. Affected files ... .. //depot/projects/soc2007/revised_fbsd_pkgtools/pkg_revised/v2/contrib/libpkg/pkg_sandbox.c#2 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/pkg_revised/v2/contrib/libpkg/pkg_sandbox.h#2 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/pkg_revised/v2/contrib/libpkg/pkg_sandbox_private.h#2 edit Differences ... ==== //depot/projects/soc2007/revised_fbsd_pkgtools/pkg_revised/v2/contrib/libpkg/pkg_sandbox.c#2 (text+ko) ==== @@ -35,6 +35,7 @@ struct pkg_sandbox * pkg_sandbox_new(struct pkg *package, const char *pkg_prefix, + int create_sandbox, pkg_sandbox_purge_sandbox_callback *purge, pkg_sandbox_destroy_sandbox_callback *destroy, pkg_sandbox_set_stage_callback *set_stage, @@ -75,8 +76,13 @@ strcat(sandbox->workdir, "/"); strcat(sandbox->workdir, package->pkg_name); - if (0 != flock(sandbox->work_dir, LOCK_UN)) - return PKG_SANDBOX_UNLOCK_FAIL; + if (create_sandbox != 0) { + + if (0 != flock(sandbox->work_dir, LOCK_UN)) + return PKG_SANDBOX_UNLOCK_FAIL; + + } + sandbox->real_file = create_sandbox; return sandbox; ==== //depot/projects/soc2007/revised_fbsd_pkgtools/pkg_revised/v2/contrib/libpkg/pkg_sandbox.h#2 (text+ko) ==== @@ -52,7 +52,7 @@ struct pkg_sandbox; -struct pkg_sandbox* pkg_sandbox_new(package *, const char *, +struct pkg_sandbox* pkg_sandbox_new(package *, const char *, int, pkg_sandbox_purge_sandbox_callback *, pkg_sandbox_destroy_sandbox_callback *, pkg_sandbox_set_stage_callback *, ==== //depot/projects/soc2007/revised_fbsd_pkgtools/pkg_revised/v2/contrib/libpkg/pkg_sandbox_private.h#2 (text+ko) ==== @@ -33,7 +33,7 @@ typedef int pkg_sandbox_set_stage_callback(struct pkg_sandbox*, int); typedef int pkg_sandbox_free_sandbox_callback(struct pkg_sandbox *); -struct pkg_sandbox* pkg_sandbox_new(package *, const char *, +struct pkg_sandbox* pkg_sandbox_new(package *, const char *, int, pkg_sandbox_purge_sandbox_callback *, pkg_sandbox_destroy_sandbox_callback *, pkg_sandbox_set_stage_callback *,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200711291942.lATJgVBi097962>