PERFORCE change 124160 for review
Garrett Cooper
gcooper at FreeBSD.org
Fri Jul 27 06:04:44 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=124160
Change 124160 by gcooper at optimus-revised_pkgtools on 2007/07/27 06:04:37
- Submit some more pseudo-code.
- Remove a dup variable declaration.
Affected files ...
.. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/add/main.c#2 edit
.. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/delete/main.c#2 edit
.. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/info/main.c#2 edit
.. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/register/main.c#2 edit
.. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/version/main.c#2 edit
Differences ...
==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/add/main.c#2 (text+ko) ====
@@ -1,0 +1,40 @@
+#include <main.h>
+
+int main(int argc, char **argv)
+{
+
+ /** Process arguments **/
+
+ /** Connect to server process **/
+
+ /**
+ * Do:
+ * - Check to see if entry exists on server.
+ * If so.
+ * -> Register files from MANIFEST in file database.
+ * -> Register package in package database.
+ * If not, and client specified a force flag, install standard
+ * /var/db/pkg/ files, but avoid adding to global database.
+ * This may be usable for backwards compatibility.
+ *
+ * - If interrupted, roll back installed files, and added files to file and package database(s).
+ * Don't forget to communicate this to the server process!
+ *
+ * Other things to do locally (before installing?):
+ * - Check to see if the sandbox / target devices have enough space to install the files to
+ * (libarchive to the rescue?).
+ *
+ * Also run PRE and POST install scripts.
+ *
+ **/
+
+
+ /**
+ * Close and quit
+ *
+ * - Clean up temp files.
+ * - Delete sandbox(es).
+ **/
+ return 0;
+
+}
==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/delete/main.c#2 (text+ko) ====
@@ -1,0 +1,33 @@
+#include <main.h>
+
+int main(int argc, char **argv)
+{
+
+ /** Process arguments **/
+
+ /** Connect to server process **/
+
+ /**
+ * Do:
+ * Search for package entry database.
+ * - If found...
+ * ... and package has dependencies (and upward recursiveness isn't specified)...
+ * ... delete and deinstall, if forced. Issue warning message.
+ * ... fail semi-nicely if not forced.
+ * ... and package doesn't have dependencies, simply uninstall.
+ *
+ * - Complete any necessary prereqs, like pre and post deinstall scripts.
+ *
+ * - Finalize all entry additions and removals to the...
+ * ... file database.
+ * ... package entry database.
+
+ * If interrupted, roll back changes to package and file databases (effectively, 'reinstall' package).
+ *
+ **/
+
+ /** Close and quit **/
+
+ return 0;
+
+}
==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/info/main.c#2 (text+ko) ====
@@ -1,0 +1,23 @@
+#include <main.h>
+
+int main(int argc, char **argv)
+{
+
+ /** Process arguments **/
+
+ /** Connect to server process **/
+
+ /** Do:
+ *
+ * If string specified is a file, get the info from +CONTENTS/+DESCRIPTION.
+ * Else, search entry database for [ pattern, straight query ] and get equivalent info.
+ *
+ * Same as version, if interrupted just close connection..
+ *
+ **/
+
+ /** Close and quit **/
+
+ return 0;
+
+}
==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/register/main.c#2 (text+ko) ====
@@ -1,7 +1,5 @@
#include "lib/prototypes.h"
-int exit_code=0;
-
int main(int argc, char **argv)
{
==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/version/main.c#2 (text+ko) ====
@@ -1,0 +1,33 @@
+#include <main.h>
+
+int main(int argc, char **argv)
+{
+
+ /** Process arguments **/
+
+ /** Connect to server process **/
+
+ /** Do:
+ * If a string's provided...
+ * ... and it is a file, get the info from directly from +CONTENTS.
+ * ... and it's not a file...
+ * ... and it's a glob, pattern search the package entry database.
+ * ... and it's not a glob, do a straight search in the package entry database.
+ *
+ * Else, report all version information for any install packages.
+ *
+ * For all package information obtained output, compare package database value versus INDEX
+ * value and output...
+ * ... '< 'for lesser package version obtained.
+ * ... '=' for same package version obtained.
+ * ... '>' for greater package versio obtained.
+ *
+ * If interrupted, just close connections and exit. Don't worry about cleaning up or doing anything..
+ *
+ **/
+
+ /** Close and quit **/
+
+ return 0;
+
+}
More information about the p4-projects
mailing list