r4451 - trunk/src/target/opkg/libopkg

thomas at docs.openmoko.org thomas at docs.openmoko.org
Tue May 27 13:19:25 CEST 2008


Author: thomas
Date: 2008-05-27 13:19:24 +0200 (Tue, 27 May 2008)
New Revision: 4451

Modified:
   trunk/src/target/opkg/libopkg/opkg.c
Log:
opkg: report errors from opkg_remove_pkg


Modified: trunk/src/target/opkg/libopkg/opkg.c
===================================================================
--- trunk/src/target/opkg/libopkg/opkg.c	2008-05-27 10:41:50 UTC (rev 4450)
+++ trunk/src/target/opkg/libopkg/opkg.c	2008-05-27 11:19:24 UTC (rev 4451)
@@ -512,6 +512,7 @@
 int
 opkg_remove_package (opkg_t *opkg, const char *package_name, opkg_progress_callback_t progress_callback, void *user_data)
 {
+  int err;
   pkg_t *pkg = NULL;
   pkg_t *pkg_to_remove;
   opkg_progress_data_t pdata;
@@ -519,11 +520,8 @@
   opkg_assert (opkg != NULL);
   opkg_assert (package_name != NULL);
 
-
-
   pkg_info_preinstall_check (opkg->conf);
 
-
   pkg = pkg_hash_fetch_installed_by_name (&opkg->conf->pkg_hash, package_name);
 
   if (pkg == NULL)
@@ -558,7 +556,7 @@
 
   progress (pdata, 75);
 
-  opkg_remove_pkg (opkg->conf, pkg_to_remove, 0);
+  err = opkg_remove_pkg (opkg->conf, pkg_to_remove, 0);
 
   /* write out status files and file lists */
   opkg_conf_write_status_files (opkg->conf);
@@ -567,7 +565,7 @@
 
   progress (pdata, 100);
   opkg_package_free (pdata.package);
-  return 0;
+  return (err) ? OPKG_UNKNOWN_ERROR : OPKG_NO_ERROR;
 }
 
 int





More information about the commitlog mailing list