[Midnightbsd-cvs] src: mport.install.c: Sync with the current version of libmport.

ctriv at midnightbsd.org ctriv at midnightbsd.org
Sat Jan 5 17:20:02 EST 2008


Log Message:
-----------
Sync with the current version of libmport.

Modified Files:
--------------
    src/libexec/mport.install:
        mport.install.c (r1.1 -> r1.2)

-------------- next part --------------
Index: mport.install.c
===================================================================
RCS file: /home/cvs/src/libexec/mport.install/mport.install.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -L libexec/mport.install/mport.install.c -L libexec/mport.install/mport.install.c -u -r1.1 -r1.2
--- libexec/mport.install/mport.install.c
+++ libexec/mport.install/mport.install.c
@@ -46,6 +46,7 @@
 {
   int ch, i;
   char *prefix = NULL;
+  mportInstance *mport;
     
   while ((ch = getopt(argc, argv, "p:")) != -1) {
     switch (ch) {
@@ -61,14 +62,22 @@
 
   argc -= optind;
   argv += optind;
+
+  mport = mport_instance_new();
+  
+  if (mport_instance_init(mport, NULL) != MPORT_OK) {
+    warnx("%s", mport_err_string());
+    exit(1);
+  }
   
   for (i=0; i<argc; i++) {
-//    printf("filename: %s\n", argv[i]);
-    if (mport_install_pkg(argv[i], prefix) != MPORT_OK) {
+    if (mport_install_primative(mport, argv[i], prefix) != MPORT_OK) {
       warnx("%s", mport_err_string());
       exit(1);
     }
   }
+ 
+  mport_instance_free(mport); 
   
   return 0;
 }


More information about the Midnightbsd-cvs mailing list