Send commitlog mailing list submissions to
        commitlog@lists.openmoko.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.openmoko.org/mailman/listinfo/commitlog
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of commitlog digest..."
Today's Topics:

   1. development kernel tree: Changes to 'andy' ([EMAIL PROTECTED])
   2. development kernel tree: Changes to 'andy' ([EMAIL PROTECTED])
   3. r4466 - trunk/src/target/opkg/libopkg ([EMAIL PROTECTED])
   4. r4467 - trunk/src/target/opkg/libopkg ([EMAIL PROTECTED])
--- Begin Message ---
 arch/arm/mach-s3c2440/mach-gta02.c |   47 +++++++-
 drivers/i2c/chips/pcf50633.c       |  239 +++++++++++++++++++++++++++++++++--
 drivers/mfd/glamo/glamo-core.c     |   16 +++
 drivers/mfd/glamo/glamo-core.h     |    3 +-
 drivers/power/bq27000_battery.c    |    1 -
 drivers/video/display/jbt6k74.c    |   67 ++++++-----
 include/linux/glamofb.h            |    3 +
 include/linux/jbt6k74.h            |    4 +
 include/linux/pcf50633.h           |    5 +
 include/linux/pcf506xx.h           |    2 +
 include/linux/resume-dependency.h  |   78 ++++++++++++
 11 files changed, 415 insertions(+), 50 deletions(-)

New commits:
commit 9c7de0731fb4ff45ff2c8b866d77889bef79f3d0
Author: Andy Green <[EMAIL PROTECTED]>
Date:   Mon Jun 2 13:10:05 2008 +0100

    From: Andy Green <[EMAIL PROTECTED]>
    fix-remove-unused-model-name-bq27000.patch
    Signed-off-by: Andy Green <[EMAIL PROTECTED]>

commit e8df1856dc6b9b834c996ff4ca4bf63520395185
Author: Andy Green <[EMAIL PROTECTED]>
Date:   Mon Jun 2 12:43:37 2008 +0100

    From: Andy Green <[EMAIL PROTECTED]>
    add-use-pcf50633-resume-callback-jbt6k74.patch
    
    Signed-off-by: Andy Green <[EMAIL PROTECTED]>

commit 6c17ff4125db1ccb549f46267622b340aa0e9185
Author: Andy Green <[EMAIL PROTECTED]>
Date:   Mon Jun 2 12:43:37 2008 +0100

    From: Andy Green <[EMAIL PROTECTED]>
    introduce-pcf50633-resume-dependency-list.patch
    
    Signed-off-by: Andy Green <[EMAIL PROTECTED]>

commit f0b0a2804fc63342f6f53556d3bd6b1edd6812ba
Author: Andy Green <[EMAIL PROTECTED]>
Date:   Mon Jun 2 12:43:37 2008 +0100

    From: Andy Green <[EMAIL PROTECTED]>
    introduce-resume-dependency.patch
    Signed-off-by: Andy Green <[EMAIL PROTECTED]>

commit 18f6bd751edd8f7e5df768a1b4c32127cc52a368
Author: Andy Green <[EMAIL PROTECTED]>
Date:   Mon Jun 2 12:41:21 2008 +0100

    introduce-charging-led-behaviour.patch
    
    Creates a new behaviour requested by Will that the red LED on GTA02
    is lit during battery charging.and goes out when the battery is full.
    
    This is done by leveraging the PMU interrupts, but in one scenario
    there is no interrupt that occurs, when the battery is replaced after
    being removed with the USB power in all the while.  So a sleepy work
    function is started under those circumstances to watch for battery
    reinsertion or USB cable pull.
    
    100mA limit was not being observed under some conditions so this was
    fixed and tested with a USB cable with D+/D- disconnected.  1A
    charger behaviour was also tested.
    
    Showing the charging action exposes some inconsistency in pcf50633
    charging action.  If your battery is nearly full, it will keep
    charging it at decreasing current even after it thinks it is at
    100% capacity for a long while.  But if you pull that same battery
    and re-insert it, the charger state machine in pcf50633 believe it is
    full and won't charge it.
    
    Signed-off-by: Andy Green <[EMAIL PROTECTED]>




--- End Message ---
--- Begin Message ---
Rebased ref, commits from common ancestor:
commit 3ea17afde0fc5a88a267a4206f05cd133546ccee
Author: Andy Green <[EMAIL PROTECTED]>
Date:   Mon Jun 2 13:22:59 2008 +0100

    fix-remove-unused-model-name-bq27000.patch
    
    Model name isn't in the bq27000 register set, remove the
    claim that we can deliver it
    
    Signed-off-by: Andy Green <[EMAIL PROTECTED]>

commit f4095c8373e9dc1a6560200d504ad63431a10ab4
Author: Andy Green <[EMAIL PROTECTED]>
Date:   Mon Jun 2 13:22:24 2008 +0100

    add-use-pcf50633-resume-callback-jbt6k74.patch
    
    Adds the resume callback stuff to glamo, then changes
    jbt6k74 to no longer use a sleeping workqueue, but to
    make its resume actions dependent on pcf50633 and
    glamo resume (for backlight and communication to LCM
    respectively)
    
    Signed-off-by: Andy Green <[EMAIL PROTECTED]>

commit 0167ff763986a76ba07e0e8ad361f3352d9225cd
Author: Andy Green <[EMAIL PROTECTED]>
Date:   Mon Jun 2 13:20:32 2008 +0100

    introduce-pcf50633-resume-dependency-list.patch
    
    Adds resume dependency support to pcf50633
    
    Signed-off-by: Andy Green <[EMAIL PROTECTED]>

commit 41ef3bc2e33fe173e24cb5e840e07da21ed243af
Author: Andy Green <[EMAIL PROTECTED]>
Date:   Mon Jun 2 13:19:19 2008 +0100

    introduce-resume-dependency.patch
    
    Defines a way for drivers to defer execution of resume callbacks
    until one or more other driver they are dependent on has itself
    resumed.
    
    Signed-off-by: Andy Green <[EMAIL PROTECTED]>

commit caeda671794e7004af93652c9ee044fb2489fc6c
Author: Andy Green <[EMAIL PROTECTED]>
Date:   Mon Jun 2 13:18:24 2008 +0100

    introduce-charging-led-behaviour.patch
    
    Creates a new behaviour requested by Will that the red LED on GTA02
    is lit during battery charging.and goes out when the battery is full.
    
    This is done by leveraging the PMU interrupts, but in one scenario
    there is no interrupt that occurs, when the battery is replaced after
    being removed with the USB power in all the while.  So a sleepy work
    function is started under those circumstances to watch for battery
    reinsertion or USB cable pull.
    
    100mA limit was not being observed under some conditions so this was
    fixed and tested with a USB cable with D+/D- disconnected.  1A
    charger behaviour was also tested.
    
    Showing the charging action exposes some inconsistency in pcf50633
    charging action.  If your battery is nearly full, it will keep
    charging it at decreasing current even after it thinks it is at
    100% capacity for a long while.  But if you pull that same battery
    and re-insert it, the charger state machine in pcf50633 believe it is
    full and won't charge it.
    
    Signed-off-by: Andy Green <[EMAIL PROTECTED]>




--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2008-06-02 18:11:25 +0200 (Mon, 02 Jun 2008)
New Revision: 4466

Modified:
   trunk/src/target/opkg/libopkg/opkg.c
   trunk/src/target/opkg/libopkg/opkg_cmd.c
   trunk/src/target/opkg/libopkg/opkg_error.h
   trunk/src/target/opkg/libopkg/opkg_install.c
   trunk/src/target/opkg/libopkg/opkg_install.h
   trunk/src/target/opkg/libopkg/opkg_upgrade.c
   trunk/src/target/opkg/libopkg/pkg.c
   trunk/src/target/opkg/libopkg/pkg_depends.c
   trunk/src/target/opkg/libopkg/pkg_hash.c
   trunk/src/target/opkg/libopkg/pkg_hash.h
Log:
opkg: consolidate error enums and add an error for when no package matches
current architecture


Modified: trunk/src/target/opkg/libopkg/opkg.c
===================================================================
--- trunk/src/target/opkg/libopkg/opkg.c        2008-05-31 15:02:32 UTC (rev 
4465)
+++ trunk/src/target/opkg/libopkg/opkg.c        2008-06-02 16:11:25 UTC (rev 
4466)
@@ -27,6 +27,7 @@
 #include "opkg_download.h"
 #include "opkg_remove.h"
 #include "opkg_upgrade.h"
+#include "opkg_error.h"
 
 #include "sprintf_alloc.h"
 #include "file_util.h"
@@ -385,7 +386,7 @@
     return OPKG_PACKAGE_ALREADY_INSTALLED;
   }
 
-  new = pkg_hash_fetch_best_installation_candidate_by_name(opkg->conf, 
package_name);
+  new = pkg_hash_fetch_best_installation_candidate_by_name(opkg->conf, 
package_name, NULL);
   if (!new)
   {
     /* XXX: Error: Could not find package to install */
@@ -489,13 +490,13 @@
     opkg_package_free (pdata.package);
     switch (err)
     {
-      case PKG_INSTALL_ERR_NOT_TRUSTED: return OPKG_GPG_ERROR;
-      case PKG_INSTALL_ERR_DOWNLOAD: return OPKG_DOWNLOAD_FAILED;
-      case PKG_INSTALL_ERR_DEPENDENCIES:
-      case PKG_INSTALL_ERR_CONFLICTS: return OPKG_DEPENDENCIES_FAILED;
-      case PKG_INSTALL_ERR_ALREADY_INSTALLED: return 
OPKG_PACKAGE_ALREADY_INSTALLED;
-      case PKG_INSTALL_ERR_SIGNATURE: return OPKG_GPG_ERROR;
-      case PKG_INSTALL_ERR_MD5: return OPKG_MD5_ERROR;
+      case OPKG_INSTALL_ERR_NOT_TRUSTED: return OPKG_GPG_ERROR;
+      case OPKG_INSTALL_ERR_DOWNLOAD: return OPKG_DOWNLOAD_FAILED;
+      case OPKG_INSTALL_ERR_DEPENDENCIES:
+      case OPKG_INSTALL_ERR_CONFLICTS: return OPKG_DEPENDENCIES_FAILED;
+      case OPKG_INSTALL_ERR_ALREADY_INSTALLED: return 
OPKG_PACKAGE_ALREADY_INSTALLED;
+      case OPKG_INSTALL_ERR_SIGNATURE: return OPKG_GPG_ERROR;
+      case OPKG_INSTALL_ERR_MD5: return OPKG_MD5_ERROR;
       default: return OPKG_UNKNOWN_ERROR;
     }
   }
@@ -625,13 +626,13 @@
   {
     switch (err)
     {
-      case PKG_INSTALL_ERR_NOT_TRUSTED: return OPKG_GPG_ERROR;
-      case PKG_INSTALL_ERR_DOWNLOAD: return OPKG_DOWNLOAD_FAILED;
-      case PKG_INSTALL_ERR_DEPENDENCIES:
-      case PKG_INSTALL_ERR_CONFLICTS: return OPKG_DEPENDENCIES_FAILED;
-      case PKG_INSTALL_ERR_ALREADY_INSTALLED: return 
OPKG_PACKAGE_ALREADY_INSTALLED;
-      case PKG_INSTALL_ERR_SIGNATURE: return OPKG_GPG_ERROR;
-      case PKG_INSTALL_ERR_MD5: return OPKG_MD5_ERROR;
+      case OPKG_INSTALL_ERR_NOT_TRUSTED: return OPKG_GPG_ERROR;
+      case OPKG_INSTALL_ERR_DOWNLOAD: return OPKG_DOWNLOAD_FAILED;
+      case OPKG_INSTALL_ERR_DEPENDENCIES:
+      case OPKG_INSTALL_ERR_CONFLICTS: return OPKG_DEPENDENCIES_FAILED;
+      case OPKG_INSTALL_ERR_ALREADY_INSTALLED: return 
OPKG_PACKAGE_ALREADY_INSTALLED;
+      case OPKG_INSTALL_ERR_SIGNATURE: return OPKG_GPG_ERROR;
+      case OPKG_INSTALL_ERR_MD5: return OPKG_MD5_ERROR;
       default: return OPKG_UNKNOWN_ERROR;
     }
   }
@@ -917,7 +918,7 @@
     if (old->state_status != SS_INSTALLED)
       continue;
 
-    new = pkg_hash_fetch_best_installation_candidate_by_name(opkg->conf, 
old->name);
+    new = pkg_hash_fetch_best_installation_candidate_by_name(opkg->conf, 
old->name, NULL);
     if (new == NULL) {
       /* XXX: Notice: Assuming locally install package is up to date */
       continue;

Modified: trunk/src/target/opkg/libopkg/opkg_cmd.c
===================================================================
--- trunk/src/target/opkg/libopkg/opkg_cmd.c    2008-05-31 15:02:32 UTC (rev 
4465)
+++ trunk/src/target/opkg/libopkg/opkg_cmd.c    2008-06-02 16:11:25 UTC (rev 
4466)
@@ -116,7 +116,7 @@
          opkg_conf_write_status_files(conf);
          pkg_write_changed_filelists(conf);
      } else { 
-         opkg_message(conf, OPKG_NOTICE, "Nothing to be done\n");
+         opkg_message(conf, OPKG_DEBUG, "Nothing to be done\n");
      }
 }
 
@@ -146,7 +146,7 @@
 
        result = (cmd->fun)(conf, argc, argv);
 
-        if ( result != 0 ) {
+        if ( result != 0 && !error_list) {
            opkg_message(conf, OPKG_NOTICE, "An error ocurred, return value: 
%d.\n", result);
         }
 
@@ -156,7 +156,7 @@
            opkg_message(conf, OPKG_NOTICE, "Collected errors:\n");
            /* Here we print the errors collected and free the list */
            while (error_list != NULL) {
-                 opkg_message(conf, OPKG_NOTICE, "%s",error_list->errmsg);
+                 opkg_message(conf, OPKG_NOTICE, " * %s", error_list->errmsg);
                  error_list = error_list->next;
 
            }
@@ -593,8 +593,7 @@
           err = opkg_install_by_name(conf, arg);
          if (err == OPKG_PKG_HAS_NO_CANDIDATE) {
               opkg_message(conf, OPKG_ERROR,
-                           "Cannot find package %s.\n"
-                           "Check the spelling or perhaps run 'opkg update'\n",
+                           "Cannot find package %s.\n",
                            arg);
          }
      }
@@ -683,7 +682,7 @@
      for (i = 0; i < argc; i++) {
          arg = argv[i];
 
-         pkg = pkg_hash_fetch_best_installation_candidate_by_name(conf, arg);
+         pkg = pkg_hash_fetch_best_installation_candidate_by_name(conf, arg, 
&err);
          if (pkg == NULL) {
               opkg_message(conf, OPKG_ERROR,
                            "Cannot find package %s.\n"

Modified: trunk/src/target/opkg/libopkg/opkg_error.h
===================================================================
--- trunk/src/target/opkg/libopkg/opkg_error.h  2008-05-31 15:02:32 UTC (rev 
4465)
+++ trunk/src/target/opkg/libopkg/opkg_error.h  2008-06-02 16:11:25 UTC (rev 
4466)
@@ -17,11 +17,26 @@
 #define OPKG_ERROR_H
 
 enum opkg_error {
-    OPKG_SUCCESS = 0,
-    OPKG_PKG_DEPS_UNSATISFIED,
-    OPKG_PKG_IS_ESSENTIAL,
-    OPKG_PKG_HAS_DEPENDENTS,
-    OPKG_PKG_HAS_NO_CANDIDATE
+  OPKG_ERR_UNKNOWN = -1,
+  OPKG_ERR_NONE = 0,
+
+  OPKG_PKG_DEPS_UNSATISFIED,
+  OPKG_PKG_IS_ESSENTIAL,
+  OPKG_PKG_HAS_DEPENDENTS,
+  OPKG_PKG_HAS_NO_CANDIDATE,
+  OPKG_PKG_HAS_NO_AVAILABLE_ARCH,
+
+  OPKG_INSTALL_ERR_NOT_TRUSTED,
+  OPKG_INSTALL_ERR_DOWNLOAD,
+  OPKG_INSTALL_ERR_CONFLICTS,
+  OPKG_INSTALL_ERR_ALREADY_INSTALLED,
+  OPKG_INSTALL_ERR_DEPENDENCIES,
+  OPKG_INSTALL_ERR_NO_DOWNGRADE,
+  OPKG_INSTALL_ERR_NO_SPACE,
+  OPKG_INSTALL_ERR_SIGNATURE,
+  OPKG_INSTALL_ERR_MD5,
+  OPKG_INSTALL_ERR_INTERNAL,
+
 };
 typedef enum opkg_error opkg_error_t;
 

Modified: trunk/src/target/opkg/libopkg/opkg_install.c
===================================================================
--- trunk/src/target/opkg/libopkg/opkg_install.c        2008-05-31 15:02:32 UTC 
(rev 4465)
+++ trunk/src/target/opkg/libopkg/opkg_install.c        2008-06-02 16:11:25 UTC 
(rev 4466)
@@ -137,7 +137,7 @@
 
 opkg_error_t opkg_install_by_name(opkg_conf_t *conf, const char *pkg_name)
 {
-     int cmp;
+     int cmp, err;
      pkg_t *old, *new;
      char *old_version, *new_version;
 
@@ -147,7 +147,7 @@
         opkg_message(conf, OPKG_DEBUG2, " Old versions from pkg_hash_fetch %s 
\n",  old->version );
     
      opkg_message(conf, OPKG_DEBUG2, " Getting new  from pkg_hash_fetch \n" );
-     new = pkg_hash_fetch_best_installation_candidate_by_name(conf, pkg_name);
+     new = pkg_hash_fetch_best_installation_candidate_by_name(conf, pkg_name, 
&err);
      if ( new ) 
         opkg_message(conf, OPKG_DEBUG2, " New versions from pkg_hash_fetch %s 
\n",  new->version );
 
@@ -165,7 +165,10 @@
      opkg_message(conf, OPKG_DEBUG2, " \n");
 
      if (new == NULL) {
-         return OPKG_PKG_HAS_NO_CANDIDATE;
+         if (err)
+           return err;
+         else
+           return OPKG_PKG_HAS_NO_CANDIDATE;
      }
 
      new->state_flag |= SF_USER;
@@ -307,7 +310,7 @@
 
      return 0;
 }
-
+#if 0
 int name_mark_dependencies_for_installation(opkg_conf_t *conf, const char 
*pkg_name, pkg_vec_t *pkgs_needed)
 {
      int cmp;
@@ -360,7 +363,7 @@
      return pkg_mark_dependencies_for_installation(conf, new, pkgs_needed);
 }
 
-
+#endif
 
 int satisfy_dependencies_for(opkg_conf_t *conf, pkg_t *pkg)
 {
@@ -762,7 +765,7 @@
      if (!pkg) {
          opkg_message(conf, OPKG_ERROR,
                       "INTERNAL ERROR: null pkg passed to opkg_install_pkg\n");
-         return PKG_INSTALL_ERR_INTERNAL;
+         return OPKG_INSTALL_ERR_INTERNAL;
      }
 
      opkg_message(conf, OPKG_DEBUG2, "Function: %s calling pkg_arch_supported 
%s \n", __FUNCTION__, __FUNCTION__);
@@ -770,11 +773,11 @@
      if (!pkg_arch_supported(conf, pkg)) {
          opkg_message(conf, OPKG_ERROR, "INTERNAL ERROR: architecture %s for 
pkg %s is unsupported.\n",
                       pkg->architecture, pkg->name);
-         return PKG_INSTALL_ERR_INTERNAL;
+         return OPKG_INSTALL_ERR_INTERNAL;
      }
      if (pkg->state_status == SS_INSTALLED && conf->force_reinstall == 0 && 
conf->nodeps == 0) {
          err = satisfy_dependencies_for(conf, pkg);
-         if (err) { return PKG_INSTALL_ERR_DEPENDENCIES; }
+         if (err) { return OPKG_INSTALL_ERR_DEPENDENCIES; }
 
          opkg_message(conf, OPKG_NOTICE,
                       "Package %s is already installed in %s.\n", 
@@ -789,7 +792,7 @@
      old_pkg = pkg_hash_fetch_installed_by_name(&conf->pkg_hash, pkg->name);
 
      err = opkg_install_check_downgrade(conf, pkg, old_pkg, message);
-     if (err) { return PKG_INSTALL_ERR_NO_DOWNGRADE; }
+     if (err) { return OPKG_INSTALL_ERR_NO_DOWNGRADE; }
 
      pkg->state_want = SW_INSTALL;
      if (old_pkg){                          
@@ -799,7 +802,7 @@
 
      /* Abhaya: conflicts check */
      err = check_conflicts_for(conf, pkg);
-     if (err) { return PKG_INSTALL_ERR_CONFLICTS; }
+     if (err) { return OPKG_INSTALL_ERR_CONFLICTS; }
     
      /* this setup is to remove the upgrade scenario in the end when
        installing pkg A, A deps B & B deps on A. So both B and A are
@@ -809,7 +812,7 @@
         && conf->force_reinstall == 0) return 0;
     
      err = verify_pkg_installable(conf, pkg);
-     if (err) { return PKG_INSTALL_ERR_NO_SPACE; }
+     if (err) { return OPKG_INSTALL_ERR_NO_SPACE; }
 
      if (pkg->local_filename == NULL) {
          err = opkg_download_pkg(conf, pkg, conf->tmp_dir);
@@ -817,7 +820,7 @@
               opkg_message(conf, OPKG_ERROR,
                            "Failed to download %s. Perhaps you need to run 
'opkg update'?\n",
                            pkg->name);
-              return PKG_INSTALL_ERR_DOWNLOAD;
+              return OPKG_INSTALL_ERR_DOWNLOAD;
          }
      }
 
@@ -835,7 +838,7 @@
      if (file_exists (sig_file_name))
      {
        if (opkg_verify_file (conf, list_file_name, sig_file_name))
-         return PKG_INSTALL_ERR_SIGNATURE;
+         return OPKG_INSTALL_ERR_SIGNATURE;
      }
 
      free (lists_dir);
@@ -853,7 +856,7 @@
                            "Package %s md5sum mismatch. Either the opkg or the 
package index are corrupt. Try 'opkg update'.\n",
                            pkg->name);
               free(file_md5);
-              return PKG_INSTALL_ERR_MD5;
+              return OPKG_INSTALL_ERR_MD5;
          }
          free(file_md5);
      }
@@ -866,11 +869,11 @@
 /* Pigi: check if it will pass from here when replacing. It seems to fail */
 /* That's rather strange that files don't change owner. Investigate !!!!!!*/
      err = update_file_ownership(conf, pkg, old_pkg);
-     if (err) { return PKG_INSTALL_ERR_UNKNOWN; }
+     if (err) { return OPKG_ERR_UNKNOWN; }
 
      if (conf->nodeps == 0) {
          err = satisfy_dependencies_for(conf, pkg);
-         if (err) { return PKG_INSTALL_ERR_DEPENDENCIES; }
+         if (err) { return OPKG_INSTALL_ERR_DEPENDENCIES; }
      }
 
      replacees = pkg_vec_alloc();
@@ -1019,7 +1022,7 @@
               sigprocmask(SIG_UNBLOCK, &newset, &oldset);
 
           pkg_vec_free (replacees);
-         return PKG_INSTALL_ERR_UNKNOWN;
+         return OPKG_ERR_UNKNOWN;
      }
      opkg_set_current_state (conf, OPKG_STATE_NONE, NULL);
 }

Modified: trunk/src/target/opkg/libopkg/opkg_install.h
===================================================================
--- trunk/src/target/opkg/libopkg/opkg_install.h        2008-05-31 15:02:32 UTC 
(rev 4465)
+++ trunk/src/target/opkg/libopkg/opkg_install.h        2008-06-02 16:11:25 UTC 
(rev 4466)
@@ -22,21 +22,6 @@
 #include "opkg_conf.h"
 #include "opkg_error.h"
 
-enum {
-  PKG_INSTALL_ERR_NONE,
-  PKG_INSTALL_ERR_NOT_TRUSTED,
-  PKG_INSTALL_ERR_DOWNLOAD,
-  PKG_INSTALL_ERR_CONFLICTS,
-  PKG_INSTALL_ERR_ALREADY_INSTALLED,
-  PKG_INSTALL_ERR_DEPENDENCIES,
-  PKG_INSTALL_ERR_NO_DOWNGRADE,
-  PKG_INSTALL_ERR_NO_SPACE,
-  PKG_INSTALL_ERR_SIGNATURE,
-  PKG_INSTALL_ERR_MD5,
-  PKG_INSTALL_ERR_INTERNAL,
-  PKG_INSTALL_ERR_UNKNOWN
-};
-
 opkg_error_t opkg_install_by_name(opkg_conf_t *conf, const char *pkg_name);
 opkg_error_t opkg_install_multi_by_name(opkg_conf_t *conf, const char 
*pkg_name);
 int opkg_install_from_file(opkg_conf_t *conf, const char *filename);

Modified: trunk/src/target/opkg/libopkg/opkg_upgrade.c
===================================================================
--- trunk/src/target/opkg/libopkg/opkg_upgrade.c        2008-05-31 15:02:32 UTC 
(rev 4465)
+++ trunk/src/target/opkg/libopkg/opkg_upgrade.c        2008-06-02 16:11:25 UTC 
(rev 4466)
@@ -33,7 +33,7 @@
           return 0;
      }
 
-     new = pkg_hash_fetch_best_installation_candidate_by_name(conf, old->name);
+     new = pkg_hash_fetch_best_installation_candidate_by_name(conf, old->name, 
NULL);
      if (new == NULL) {
           old_version = pkg_version_str_alloc(old);
           opkg_message(conf, OPKG_NOTICE,

Modified: trunk/src/target/opkg/libopkg/pkg.c
===================================================================
--- trunk/src/target/opkg/libopkg/pkg.c 2008-05-31 15:02:32 UTC (rev 4465)
+++ trunk/src/target/opkg/libopkg/pkg.c 2008-06-02 16:11:25 UTC (rev 4466)
@@ -1713,7 +1713,7 @@
          pkg_t *pkg = available_pkgs->pkgs[i];
          if (!pkg->arch_priority && (pkg->state_flag || (pkg->state_want != 
SW_UNKNOWN))) {
               /* clear flags and want for any uninstallable package */
-              opkg_message(conf, OPKG_NOTICE, "Clearing state_want and 
state_flag for pkg=%s (arch_priority=%d flag=%d want=%d)\n", 
+              opkg_message(conf, OPKG_DEBUG, "Clearing state_want and 
state_flag for pkg=%s (arch_priority=%d flag=%d want=%d)\n", 
                            pkg->name, pkg->arch_priority, pkg->state_flag, 
pkg->state_want);
               pkg->state_want = SW_UNKNOWN;
               pkg->state_flag = 0;

Modified: trunk/src/target/opkg/libopkg/pkg_depends.c
===================================================================
--- trunk/src/target/opkg/libopkg/pkg_depends.c 2008-05-31 15:02:32 UTC (rev 
4465)
+++ trunk/src/target/opkg/libopkg/pkg_depends.c 2008-06-02 16:11:25 UTC (rev 
4466)
@@ -173,7 +173,7 @@
               pkg_t *satisfying_pkg = 
                    pkg_hash_fetch_best_installation_candidate(conf, 
satisfying_apkg, 
                                                               
pkg_installed_and_constraint_satisfied, 
-                                                              
dependence_to_satisfy, 1);
+                                                              
dependence_to_satisfy, 1, NULL);
                /* Being that I can't test constraing in pkg_hash, I will test 
it here */
               if (satisfying_pkg != NULL) {
                   if (!pkg_installed_and_constraint_satisfied ( 
satisfying_pkg,dependence_to_satisfy)) {
@@ -197,7 +197,7 @@
                    pkg_t *satisfying_pkg = 
                         pkg_hash_fetch_best_installation_candidate(conf, 
satisfying_apkg, 
                                                                    
pkg_constraint_satisfied, 
-                                                                   
dependence_to_satisfy, 1);
+                                                                   
dependence_to_satisfy, 1, NULL);
                     /* Being that I can't test constraing in pkg_hash, I will 
test it here too */
                    if (satisfying_pkg != NULL) {
                          if (!pkg_constraint_satisfied ( 
satisfying_pkg,dependence_to_satisfy)) {

Modified: trunk/src/target/opkg/libopkg/pkg_hash.c
===================================================================
--- trunk/src/target/opkg/libopkg/pkg_hash.c    2008-05-31 15:02:32 UTC (rev 
4465)
+++ trunk/src/target/opkg/libopkg/pkg_hash.c    2008-06-02 16:11:25 UTC (rev 
4466)
@@ -170,7 +170,7 @@
 
 
 pkg_t *pkg_hash_fetch_best_installation_candidate(opkg_conf_t *conf, 
abstract_pkg_t *apkg, 
-                                                 int (*constraint_fcn)(pkg_t 
*pkg, void *cdata), void *cdata, int quiet)
+                                                 int (*constraint_fcn)(pkg_t 
*pkg, void *cdata), void *cdata, int quiet, int *err)
 {
      int i; 
      int nprovides = 0;
@@ -185,6 +185,9 @@
      pkg_t *held_pkg = NULL;
      pkg_t *good_pkg_by_name = NULL;
 
+     if (err)
+       *err = 0;
+
      if (matching_apkgs == NULL || providers == NULL || 
          apkg == NULL || apkg->provided_by == NULL || (apkg->provided_by->len 
== 0))
          return NULL;
@@ -251,6 +254,14 @@
                         pkg_vec_insert(matching_pkgs, maybe);
                    }
               }
+
+               if (vec->len > 0 && matching_pkgs->len < 1)
+               {
+                 opkg_message (conf, OPKG_ERROR, "   Packages found, but none 
available for the current "
+                                                 "architecture\n");
+                 if (err)
+                   *err = OPKG_PKG_HAS_NO_AVAILABLE_ARCH;
+               }
          }
      }
 
@@ -351,15 +362,18 @@
          return 0;   
 }
 
-pkg_t *pkg_hash_fetch_best_installation_candidate_by_name(opkg_conf_t *conf, 
const char *name)
+pkg_t *pkg_hash_fetch_best_installation_candidate_by_name(opkg_conf_t *conf, 
const char *name, int *err)
 {
      hash_table_t *hash = &conf->pkg_hash;
      abstract_pkg_t *apkg = NULL;
+     pkg_t *ret;
 
      if (!(apkg = abstract_pkg_fetch_by_name(hash, name)))
          return NULL;
-     
-     return pkg_hash_fetch_best_installation_candidate(conf, apkg, 
pkg_name_constraint_fcn, apkg->name, 0);
+
+     ret = pkg_hash_fetch_best_installation_candidate(conf, apkg, 
pkg_name_constraint_fcn, apkg->name, 0, err);
+
+     return ret;
 }
 
 
@@ -517,7 +531,7 @@
   if (dependents != NULL)
     while (dependents [i] != NULL && i < ab_pkg->provided_by->len)
       printf ("\tprovided by - %s\n", dependents [i ++]->name);
-  pkg = pkg_hash_fetch_best_installation_candidate_by_name (conf, 
ab_pkg->name);
+  pkg = pkg_hash_fetch_best_installation_candidate_by_name (conf, 
ab_pkg->name, NULL);
   if (pkg) {
     i = 0;
     while (i < pkg->depends_count)

Modified: trunk/src/target/opkg/libopkg/pkg_hash.h
===================================================================
--- trunk/src/target/opkg/libopkg/pkg_hash.h    2008-05-31 15:02:32 UTC (rev 
4465)
+++ trunk/src/target/opkg/libopkg/pkg_hash.h    2008-06-02 16:11:25 UTC (rev 
4466)
@@ -45,8 +45,8 @@
                                       const char * version);
 abstract_pkg_vec_t *pkg_hash_fetch_all_installation_candidates(hash_table_t 
*hash, const char *name);
 pkg_t *pkg_hash_fetch_best_installation_candidate(opkg_conf_t *conf, 
abstract_pkg_t *apkg, 
-                                                 int (*constraint_fcn)(pkg_t 
*pkg, void *data), void *cdata, int quiet);
-pkg_t *pkg_hash_fetch_best_installation_candidate_by_name(opkg_conf_t *conf, 
const char *name);
+                                                 int (*constraint_fcn)(pkg_t 
*pkg, void *data), void *cdata, int quiet, int *error);
+pkg_t *pkg_hash_fetch_best_installation_candidate_by_name(opkg_conf_t *conf, 
const char *name, int *err);
 pkg_t *pkg_hash_fetch_installed_by_name(hash_table_t *hash,
                                        const char *pkg_name);
 pkg_t *pkg_hash_fetch_installed_by_name_dest(hash_table_t *hash,




--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2008-06-02 18:55:45 +0200 (Mon, 02 Jun 2008)
New Revision: 4467

Modified:
   trunk/src/target/opkg/libopkg/pkg_hash.c
Log:
opkg: update error message


Modified: trunk/src/target/opkg/libopkg/pkg_hash.c
===================================================================
--- trunk/src/target/opkg/libopkg/pkg_hash.c    2008-06-02 16:11:25 UTC (rev 
4466)
+++ trunk/src/target/opkg/libopkg/pkg_hash.c    2008-06-02 16:55:45 UTC (rev 
4467)
@@ -257,8 +257,7 @@
 
                if (vec->len > 0 && matching_pkgs->len < 1)
                {
-                 opkg_message (conf, OPKG_ERROR, "   Packages found, but none 
available for the current "
-                                                 "architecture\n");
+                 opkg_message (conf, OPKG_ERROR, "Packages were found, but 
none compatible with the architectures configured\n");
                  if (err)
                    *err = OPKG_PKG_HAS_NO_AVAILABLE_ARCH;
                }




--- End Message ---
_______________________________________________
commitlog mailing list
commitlog@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/commitlog

Reply via email to