PERFORCE change 129789 for review
Garrett Cooper
gcooper at FreeBSD.org
Thu Nov 29 11:42:32 PST 2007
http://perforce.freebsd.org/chv.cgi?CH=129789
Change 129789 by gcooper at 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 *,
More information about the p4-projects
mailing list