[Midnightbsd-cvs] src [7690] trunk/libexec/mport.list/mport.list.c: move the index check up
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Mon Aug 8 20:42:20 EDT 2016
Revision: 7690
http://svnweb.midnightbsd.org/src/?rev=7690
Author: laffer1
Date: 2016-08-08 20:42:20 -0400 (Mon, 08 Aug 2016)
Log Message:
-----------
move the index check up
Modified Paths:
--------------
trunk/libexec/mport.list/mport.list.c
Modified: trunk/libexec/mport.list/mport.list.c
===================================================================
--- trunk/libexec/mport.list/mport.list.c 2016-08-09 00:40:50 UTC (rev 7689)
+++ trunk/libexec/mport.list/mport.list.c 2016-08-09 00:42:20 UTC (rev 7690)
@@ -90,7 +90,12 @@
warnx("%s", mport_err_string());
exit(1);
}
-
+
+ if (update && mport_index_load(mport) != MPORT_OK) {
+ warnx("Unable to load updates index, %s", mport_err_string());
+ exit(8);
+ }
+
if (mport_pkgmeta_list(mport, &packs) != MPORT_OK) {
warnx("%s", mport_err_string());
mport_instance_free(mport);
@@ -104,11 +109,6 @@
exit(3);
}
- if (update) {
- if (mport_index_load(mport) != MPORT_OK)
- errx(4, "Unable to load updates index");
- }
-
while (*packs != NULL) {
if (update) {
if (mport_index_lookup_pkgname(mport, (*packs)->name, &indexEntries) != MPORT_OK) {
More information about the Midnightbsd-cvs
mailing list