[Midnightbsd-cvs] src [7649] stable/0.8/lib/libmport/install_primative.c: when an error occurs, exit as a failure when installing a package.

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sat Jul 30 21:25:45 EDT 2016


Revision: 7649
          http://svnweb.midnightbsd.org/src/?rev=7649
Author:   laffer1
Date:     2016-07-30 21:25:45 -0400 (Sat, 30 Jul 2016)
Log Message:
-----------
when an error occurs, exit as a failure when installing a package.

Modified Paths:
--------------
    stable/0.8/lib/libmport/install_primative.c

Modified: stable/0.8/lib/libmport/install_primative.c
===================================================================
--- stable/0.8/lib/libmport/install_primative.c	2016-07-30 14:17:08 UTC (rev 7648)
+++ stable/0.8/lib/libmport/install_primative.c	2016-07-31 01:25:45 UTC (rev 7649)
@@ -39,6 +39,7 @@
   mportBundleRead *bundle;
   mportPackageMeta **pkgs, *pkg;
   int i;
+  bool error = false;
   
   if ((bundle = mport_bundle_read_new()) == NULL)
     RETURN_ERROR(MPORT_ERR_FATAL, "Out of memory.");
@@ -68,6 +69,7 @@
     {
       mport_call_msg_cb(mport, "Unable to install %s-%s: %s", pkg->name, pkg->version, mport_err_string());
       /* TODO: WHY WAS THIS HERE mport_set_err(MPORT_OK, NULL); */
+		error = true;
 		break; /* do not keep going if we have a package failure! */
     }
   }
@@ -74,6 +76,9 @@
 
   if (mport_bundle_read_finish(mport, bundle) != MPORT_OK)
     RETURN_CURRENT_ERROR;
+
+  if (error)
+     return MPORT_ERR_FATAL;
     
   return MPORT_OK;  
 }



More information about the Midnightbsd-cvs mailing list