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. Openmoko's OpenEmbedded repository. This is used to build the
      Openmoko distribution: Changes to 'org.openmoko.dev'
      ([EMAIL PROTECTED])
   2. Openmoko's OpenEmbedded repository. This is used to build the
      Openmoko distribution: Changes to 'org.openmoko.asu.dev'
      ([EMAIL PROTECTED])
   3. Production testing software for GTA02: Changes to 'master'
      ([EMAIL PROTECTED])
   4. Production testing software for GTA02: Changes to 'master'
      ([EMAIL PROTECTED])
   5. Openmoko's OpenEmbedded repository. This is used to build the
      Openmoko distribution: Changes to 'org.openmoko.dev'
      ([EMAIL PROTECTED])
   6. Openmoko's OpenEmbedded repository. This is used to build the
      Openmoko distribution: Changes to 'org.openmoko.dev'
      ([EMAIL PROTECTED])
   7. r4473 - trunk/src/target/opkg/libopkg ([EMAIL PROTECTED])
   8. r4474 - trunk/src/target/opkg/libopkg ([EMAIL PROTECTED])
   9. r4475 - trunk/src/target/opkg/libopkg ([EMAIL PROTECTED])
--- Begin Message ---
 packages/boost/boost_1.33.1.bb                     |    2 +-
 .../boost/files/atomic_count_gcc_atomicity.patch   |   12 ++++++++----
 .../xserver-kdrive-common/xserver-nodm-init.bb     |    2 +-
 .../xserver-nodm-init/xserver-nodm                 |    3 +++
 4 files changed, 13 insertions(+), 6 deletions(-)

New commits:
commit c333af2a100da8e34d7d9d39dabd347c8722120c
Author: Graeme Gregory <[EMAIL PROTECTED]>
Date:   Wed Jun 4 11:00:11 2008 +0100

    [boost] better fix for atomicity problem, allows gnash to compile again

commit dee895bd8caefb4398b52ee46dec73808a8afb62
Merge: 9210847717073edfd9e24ae75bc2b71e69d9c70a 
d0d51cdc54d3468a63db38ea6a25e72c612d7a46
Author: Graeme Gregory <[EMAIL PROTECTED]>
Date:   Wed Jun 4 09:16:00 2008 +0100

    Merge branch 'org.openmoko.dev' of git+ssh://[EMAIL 
PROTECTED]/var/cache/git/openmoko into org.openmoko.dev

commit 9210847717073edfd9e24ae75bc2b71e69d9c70a
Author: Holger Hans Peter Freyther <[EMAIL PROTECTED]>
Date:   Sun Jun 1 19:17:58 2008 +0200

    [x11] Make sure to set a HOME and LOGNAME when launching
        Set a HOME and LOGNAME when none is being set.




--- End Message ---
--- Begin Message ---
 .../packagekit/files/03_group_infomation.patch     |   31 ++++++++++++++++++++
 packages/packagekit/packagekit_git.bb              |    5 ++-
 2 files changed, 34 insertions(+), 2 deletions(-)

New commits:
commit c8ab1b23c264c99cbd4d757413aa19a3067b8c0c
Author: Julian_chu <[EMAIL PROTECTED]>
Date:   Wed Jun 4 18:08:45 2008 +0800

    [packagekit] Add patch to packagekit.
     it fix a bug that packagekit does not reply group message after new 
get-details implementation.




--- End Message ---
--- Begin Message ---
 Makefile                                           |  101 +-
 gsm-utility/gsmd-dm2.patch                         |   75 +
 gta02-dm1/kernel_config/defconfig-2.6.24-DM1       | 1820 ++++++++++++++++++++
 gta02-dm1/rootfs/Makefile                          |   28 +-
 gta02-dm1/rootfs/config/def-busybox-config         |    2 +-
 .../rootfs/target_rootfs_data/etc/default/apmd     |    8 +
 .../target_rootfs_data/etc/default/bluetooth       |    4 +
 .../rootfs/target_rootfs_data/etc/default/devpts   |    5 +
 .../rootfs/target_rootfs_data/etc/default/gsmd     |   60 +-
 .../rootfs/target_rootfs_data/etc/default/mountall |    1 +
 .../rootfs/target_rootfs_data/etc/default/rcS      |   25 +
 .../target_rootfs_data/etc/default/usb-gadget      |    3 +
 .../etc/default/volatiles/00_core                  |   39 +
 .../etc/default/volatiles/99_hal                   |    2 +
 .../etc/default/volatiles/volatiles.04_pulse       |    2 +
 .../rootfs/target_rootfs_data/etc/init.d/functions |   17 +
 .../rootfs/target_rootfs_data/etc/init.d/gsmd      |   23 +-
 .../target_rootfs_data/etc/init.d/gsmd.backup      |   51 -
 gta02-dm2/build                                    |    8 -
 gta02-dm2/generate-test-rootfs                     |    2 +-
 20 files changed, 2138 insertions(+), 138 deletions(-)

New commits:
commit a52022572b86c2147ff6402c273052bcbe91796c
Author: Anthony Chang <[EMAIL PROTECTED]>
Date:   Wed Jun 4 11:58:03 2008 +0100

    upgrade kernel for DM1 to 2.6.24
    
    upgrade kernel for DM1 to 2.6.24, update rootfs include gsmd




--- End Message ---
--- Begin Message ---
 gta02-dm2/gsm-utility/build-gsm.sh   |   13 ------
 gta02-dm2/gsm-utility/gsmd-dm2.patch |   75 ----------------------------------
 2 files changed, 0 insertions(+), 88 deletions(-)

New commits:
commit 321bf9cbe0ea80d954f24778b6038e9b9b24a1bf
Author: Anthony Chang <[EMAIL PROTECTED]>
Date:   Wed Jun 4 12:45:10 2008 +0100

    remove gsmd code in DM2




--- End Message ---
--- Begin Message ---
 packages/qtopia-phone/qtopia-phone.inc |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 401d1820720d51d7522982931f78cbe6e68c604a
Author: Graeme Gregory <[EMAIL PROTECTED]>
Date:   Wed Jun 4 13:41:04 2008 +0100

    [qtopia-phone] fix TARGET_DEVICE in same method as -x11 version




--- End Message ---
--- Begin Message ---
 packages/tasks/task-openmoko-feed.bb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

New commits:
commit 8cc5b4bb8b11e80e16b76001447c15ff445a1901
Author: Graeme Gregory <[EMAIL PROTECTED]>
Date:   Wed Jun 4 13:56:05 2008 +0100

    [openmoko-feed] remove midori for now as it doesnt compile




--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2008-06-04 16:49:44 +0200 (Wed, 04 Jun 2008)
New Revision: 4473

Modified:
   trunk/src/target/opkg/libopkg/libopkg.c
   trunk/src/target/opkg/libopkg/opkg.c
   trunk/src/target/opkg/libopkg/opkg_cmd.c
   trunk/src/target/opkg/libopkg/opkg_cmd.h
   trunk/src/target/opkg/libopkg/opkg_conf.c
   trunk/src/target/opkg/libopkg/opkg_conf.h
   trunk/src/target/opkg/libopkg/opkg_error.h
Log:
opkg: Consolidate error reporting from opkg_conf_init and ensure return value is
      checked in the appropriate places.

opkg: Add a locking mechanism to prevent two instances of opkg being run at the
      same time.


Modified: trunk/src/target/opkg/libopkg/libopkg.c
===================================================================
--- trunk/src/target/opkg/libopkg/libopkg.c     2008-06-04 06:34:12 UTC (rev 
4472)
+++ trunk/src/target/opkg/libopkg/libopkg.c     2008-06-04 14:49:44 UTC (rev 
4473)
@@ -271,6 +271,7 @@
        err = opkg_conf_init (&opkg_conf, args);
        if (err)
        {
+               opkg_print_error_list (&opkg_conf);
                return err;
        }
 
@@ -485,6 +486,7 @@
        err = opkg_conf_init (&opkg_conf, &args);
        if (err)
        {
+               opkg_print_error_list (&opkg_conf);
                return err;
        }
 

Modified: trunk/src/target/opkg/libopkg/opkg.c
===================================================================
--- trunk/src/target/opkg/libopkg/opkg.c        2008-06-04 06:34:12 UTC (rev 
4472)
+++ trunk/src/target/opkg/libopkg/opkg.c        2008-06-04 14:49:44 UTC (rev 
4473)
@@ -185,13 +185,28 @@
 opkg_new ()
 {
   opkg_t *opkg;
+  int err;
+
   opkg = malloc (sizeof (opkg_t));
 
   opkg->args = malloc (sizeof (args_t));
-  args_init (opkg->args);
+  err = args_init (opkg->args);
+  if (err)
+  {
+    free (opkg->args);
+    free (opkg);
+    return NULL;
+  }
 
   opkg->conf = malloc (sizeof (opkg_conf_t));
-  opkg_conf_init (opkg->conf, opkg->args);
+  err = opkg_conf_init (opkg->conf, opkg->args);
+  if (err)
+  {
+    free (opkg->conf);
+    free (opkg->args);
+    free (opkg);
+    return NULL;
+  }
 
   opkg_init_options_array (opkg->conf, &opkg->options);
   return opkg;

Modified: trunk/src/target/opkg/libopkg/opkg_cmd.c
===================================================================
--- trunk/src/target/opkg/libopkg/opkg_cmd.c    2008-06-04 06:34:12 UTC (rev 
4472)
+++ trunk/src/target/opkg/libopkg/opkg_cmd.c    2008-06-04 14:49:44 UTC (rev 
4473)
@@ -138,6 +138,23 @@
      return NULL;
 }
 
+void opkg_print_error_list (opkg_conf_t *conf)
+{
+  if ( error_list ) {
+     reverse_error_list(&error_list);
+
+     printf ("Collected errors:\n");
+     /* Here we print the errors collected and free the list */
+     while (error_list != NULL) {
+           printf (" * %s", error_list->errmsg);
+           error_list = error_list->next;
+
+     }
+     free_error_list(&error_list);
+  }
+
+}
+
 int opkg_cmd_exec(opkg_cmd_t *cmd, opkg_conf_t *conf, int argc, const char 
**argv, void *userdata)
 {
        int result;
@@ -150,20 +167,8 @@
            opkg_message(conf, OPKG_NOTICE, "An error ocurred, return value: 
%d.\n", result);
         }
 
-        if ( error_list ) {
-           reverse_error_list(&error_list);
+        opkg_print_error_list (conf);
 
-           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);
-                 error_list = error_list->next;
-
-           }
-           free_error_list(&error_list);
-
-        }
-   
        p_userdata = NULL;
        return result;
 }

Modified: trunk/src/target/opkg/libopkg/opkg_cmd.h
===================================================================
--- trunk/src/target/opkg/libopkg/opkg_cmd.h    2008-06-04 06:34:12 UTC (rev 
4472)
+++ trunk/src/target/opkg/libopkg/opkg_cmd.h    2008-06-04 14:49:44 UTC (rev 
4473)
@@ -38,5 +38,6 @@
 int opkg_configure_packages(opkg_conf_t *conf, char *pkg_name);
 
 int pkg_mark_provides(pkg_t *pkg);
+void opkg_print_error_list (opkg_conf_t *conf);
 
 #endif

Modified: trunk/src/target/opkg/libopkg/opkg_conf.c
===================================================================
--- trunk/src/target/opkg/libopkg/opkg_conf.c   2008-06-04 06:34:12 UTC (rev 
4472)
+++ trunk/src/target/opkg/libopkg/opkg_conf.c   2008-06-04 14:49:44 UTC (rev 
4473)
@@ -17,6 +17,7 @@
 
 #include "includes.h"
 #include "opkg_conf.h"
+#include "opkg_error.h"
 
 #include "xregex.h"
 #include "sprintf_alloc.h"
@@ -28,6 +29,9 @@
 #include <glob.h>
 #include "opkg_defines.h"
 
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
 
 static int opkg_conf_parse_file(opkg_conf_t *conf, const char *filename,
                                pkg_src_list_t *pkg_src_list,
@@ -100,10 +104,10 @@
      int err;
      char *tmp_dir_base;
      nv_pair_list_t tmp_dest_nv_pair_list;
-     char * lists_dir =NULL;
+     char *lists_dir = NULL, *lock_file = NULL;
      glob_t globbuf;
      char *etc_opkg_conf_pattern = "/etc/opkg/*.conf";
-     char *pending_dir  =NULL;
+     char *pending_dir = NULL;
 
      memset(conf, 0, sizeof(opkg_conf_t));
 
@@ -117,7 +121,24 @@
      conf->restrict_to_default_dest = 0;
      conf->default_dest = NULL;
 
+     /* check for lock file */
+     if (args->offline_root)
+       sprintf_alloc (&lock_file, "%s/%s/lock", args->offline_root, 
OPKG_STATE_DIR_PREFIX);
+     else
+       sprintf_alloc (&lock_file, "%s/lock", OPKG_STATE_DIR_PREFIX);
 
+     conf->lock_fd = creat (lock_file, S_IRUSR | S_IWUSR | S_IRGRP);
+     err = lockf (conf->lock_fd, F_TLOCK, 0);
+
+     free (lock_file);
+
+     if (err)
+     {
+       opkg_message (conf, OPKG_ERROR, "Could not obtain administrative 
lock\n");
+       return OPKG_CONF_ERR_LOCK;
+     }
+
+
      if (args->tmp_dir)
          tmp_dir_base = args->tmp_dir;
      else 
@@ -129,7 +150,7 @@
      if (conf->tmp_dir == NULL) {
          fprintf(stderr, "%s: Failed to create temporary directory `%s': %s\n",
                  __FUNCTION__, conf->tmp_dir, strerror(errno));
-         return errno;
+         return OPKG_CONF_ERR_TMP_DIR;
      }
 
      conf->force_depends = 0;
@@ -165,19 +186,17 @@
               if (opkg_conf_parse_file(conf, args->conf_file,
                                    &conf->pkg_src_list, 
&tmp_dest_nv_pair_list,&lists_dir)<0) {
                    /* Memory leakage from opkg_conf_parse-file */
-                   return -1;
+                   return OPKG_CONF_ERR_PARSE;
                }
-                   
      }
 
-     /* if (!lists_dir ){*/
      if (strlen(lists_dir)<=1 ){
         lists_dir = realloc(lists_dir,strlen(OPKG_CONF_LISTS_DIR)+2);
         sprintf (lists_dir,"%s",OPKG_CONF_LISTS_DIR);
      }
 
      if (args->offline_root) {
-            char *tmp;// = malloc(strlen(lists_dir) + 
strlen(args->offline_root) + 1);
+            char *tmp;
             sprintf_alloc(&tmp, "%s/%s",args->offline_root,lists_dir);
             free(lists_dir);
             lists_dir = tmp;
@@ -202,7 +221,7 @@
                    if ( opkg_conf_parse_file(conf, globbuf.gl_pathv[i], 
                                         &conf->pkg_src_list, 
&tmp_dest_nv_pair_list,&lists_dir)<0) {
                         /* Memory leakage from opkg_conf_parse-file */
-                        return -1;
+                        return OPKG_CONF_ERR_PARSE;
                    }
          }
      }
@@ -289,7 +308,7 @@
         if (args->dest) {
             err = opkg_conf_set_default_dest(conf, args->dest);
             if (err) {
-                 return err;
+                 return OPKG_CONF_ERR_DEFAULT_DEST;
             }
         }
      }

Modified: trunk/src/target/opkg/libopkg/opkg_conf.h
===================================================================
--- trunk/src/target/opkg/libopkg/opkg_conf.h   2008-06-04 06:34:12 UTC (rev 
4472)
+++ trunk/src/target/opkg/libopkg/opkg_conf.h   2008-06-04 14:49:44 UTC (rev 
4473)
@@ -41,6 +41,7 @@
 
 struct opkg_conf
 {
+     int lock_fd; /* file descriptor for the lock file */
      pkg_src_list_t pkg_src_list;
      pkg_dest_list_t pkg_dest_list;
      nv_pair_list_t arch_list;

Modified: trunk/src/target/opkg/libopkg/opkg_error.h
===================================================================
--- trunk/src/target/opkg/libopkg/opkg_error.h  2008-06-04 06:34:12 UTC (rev 
4472)
+++ trunk/src/target/opkg/libopkg/opkg_error.h  2008-06-04 14:49:44 UTC (rev 
4473)
@@ -20,6 +20,11 @@
   OPKG_ERR_UNKNOWN = -1,
   OPKG_ERR_NONE = 0,
 
+  OPKG_CONF_ERR_DEFAULT_DEST,  /* could not set default dest */
+  OPKG_CONF_ERR_PARSE,         /* error parsing config file */
+  OPKG_CONF_ERR_TMP_DIR,       /* could not create temporary directory */
+  OPKG_CONF_ERR_LOCK,          /* could not get opkg lock */
+
   OPKG_PKG_DEPS_UNSATISFIED,
   OPKG_PKG_IS_ESSENTIAL,
   OPKG_PKG_HAS_DEPENDENTS,




--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2008-06-04 17:11:44 +0200 (Wed, 04 Jun 2008)
New Revision: 4474

Modified:
   trunk/src/target/opkg/libopkg/pkg_hash.c
Log:
opkg: Convert "multiple packages" message to NOTICE rather than ERROR


Modified: trunk/src/target/opkg/libopkg/pkg_hash.c
===================================================================
--- trunk/src/target/opkg/libopkg/pkg_hash.c    2008-06-04 14:49:44 UTC (rev 
4473)
+++ trunk/src/target/opkg/libopkg/pkg_hash.c    2008-06-04 15:11:44 UTC (rev 
4474)
@@ -297,7 +297,7 @@
               latest_installed_parent = matching;
          if (matching->state_flag & (SF_HOLD|SF_PREFER)) {
               if (held_pkg)
-                   opkg_message(conf, OPKG_ERROR, "Multiple packages (%s and 
%s) providing same name marked HOLD or PREFER.  Using latest.\n",
+                   opkg_message(conf, OPKG_NOTICE, "Multiple packages (%s and 
%s) providing same name marked HOLD or PREFER.  Using latest.\n",
                                 held_pkg->name, matching->name);
               held_pkg = matching;
          }




--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2008-06-04 17:34:52 +0200 (Wed, 04 Jun 2008)
New Revision: 4475

Modified:
   trunk/src/target/opkg/libopkg/libopkg.c
   trunk/src/target/opkg/libopkg/libopkg.h
   trunk/src/target/opkg/libopkg/opkg_cmd.c
   trunk/src/target/opkg/libopkg/opkg_cmd.h
   trunk/src/target/opkg/libopkg/opkg_conf.c
Log:
opkg: remove unused code


Modified: trunk/src/target/opkg/libopkg/libopkg.c
===================================================================
--- trunk/src/target/opkg/libopkg/libopkg.c     2008-06-04 15:11:44 UTC (rev 
4474)
+++ trunk/src/target/opkg/libopkg/libopkg.c     2008-06-04 15:34:52 UTC (rev 
4475)
@@ -29,362 +29,6 @@
 opkg_status_callback opkg_cb_status = NULL;
 opkg_list_callback opkg_cb_list = NULL;
 
-
-int
-opkg_init (opkg_message_callback mcall, 
-           opkg_response_callback rcall,
-           args_t * args)
-{
-       opkg_cb_message = mcall;
-       opkg_cb_response = rcall;
-
-       args_init (args);
-
-       return 0;
-}
-
-
-int
-opkg_deinit (args_t * args)
-{
-       args_deinit (args);
-       opkg_cb_message = NULL;
-       opkg_cb_response = NULL;
-
-       /* place other cleanup stuff here */
-
-       return 0;
-}
-
-
-int
-opkg_packages_list(args_t *args, 
-                   const char *packages, 
-                   opkg_list_callback cblist,
-                   void *userdata)
-{
-       opkg_cmd_t *cmd;
-       opkg_conf_t opkg_conf;
-       int err;
-
-       err = opkg_conf_init (&opkg_conf, args);
-       if (err)
-       {
-               return err;
-       }
-
-       opkg_cb_list = cblist;
-       /* we need to do this because of static declarations, 
-        * maybe a good idea to change */
-       cmd = opkg_cmd_find ("list");
-       if (packages)
-               err = opkg_cmd_exec (cmd, &opkg_conf, 1, &packages, userdata);
-       else
-               err = opkg_cmd_exec (cmd, &opkg_conf, 0, NULL, userdata);
-       opkg_cb_list = NULL;
-       opkg_conf_deinit (&opkg_conf);
-       return (err);
-}
-
-
-int
-opkg_packages_status(args_t *args,
-                     const char *packages,
-                     opkg_status_callback cbstatus,
-                     void *userdata)
-{
-       opkg_cmd_t *cmd;
-       opkg_conf_t opkg_conf;
-       int err;
-
-       err = opkg_conf_init (&opkg_conf, args);
-       if (err)
-       {
-               return err;
-       }
-
-       opkg_cb_status = cbstatus;
-
-       /* we need to do this because of static declarations,
-        * maybe a good idea to change */
-       cmd = opkg_cmd_find ("status");
-       if (packages)
-               err = opkg_cmd_exec (cmd, &opkg_conf, 1, &packages, userdata);
-       else
-               err = opkg_cmd_exec (cmd, &opkg_conf, 0, NULL, userdata);
-
-       opkg_cb_status = NULL;
-       opkg_conf_deinit (&opkg_conf);
-       return (err);
-}
-
-
-int
-opkg_packages_info(args_t *args,
-                   const char *packages,
-                   opkg_status_callback cbstatus,
-                   void *userdata)
-{
-       opkg_cmd_t *cmd;
-       opkg_conf_t opkg_conf;
-       int err;
-
-       err = opkg_conf_init (&opkg_conf, args);
-       if (err)
-       {
-               return err;
-       }
-
-       opkg_cb_status = cbstatus;
-
-       /* we need to do this because of static declarations,
-        * maybe a good idea to change */
-       cmd = opkg_cmd_find ("info");
-       if (packages)
-               err = opkg_cmd_exec (cmd, &opkg_conf, 1, &packages, userdata);
-       else
-               err = opkg_cmd_exec (cmd, &opkg_conf, 0, NULL, userdata);
-
-       opkg_cb_status = NULL;
-       opkg_conf_deinit (&opkg_conf);
-       return (err);
-}
-
-
-int
-opkg_packages_install (args_t * args, const char *name)
-{
-       opkg_cmd_t *cmd;
-       opkg_conf_t opkg_conf;
-       int err;
-
-       /* this error should be handled in application */
-       if (!name || !strlen (name))
-               return (-1);
-
-       err = opkg_conf_init (&opkg_conf, args);
-       if (err)
-       {
-               return err;
-       }
-
-       /* we need to do this because of static declarations,
-        * maybe a good idea to change */
-       cmd = opkg_cmd_find ("install");
-       err = opkg_cmd_exec (cmd, &opkg_conf, 1, &name, NULL);
-
-       opkg_conf_deinit(&opkg_conf);
-       return (err);
-}
-
-
-int
-opkg_packages_remove(args_t *args, const char *name, int purge)
-{
-       opkg_cmd_t *cmd;
-       opkg_conf_t opkg_conf;
-       int err;
-
-       /* this error should be handled in application */
-       if (!name || !strlen (name))
-               return (-1);
-
-       err = opkg_conf_init (&opkg_conf, args);
-       if (err)
-       {
-               return err;
-       }
-
-       /* we need to do this because of static declarations, 
-        * maybe a good idea to change */
-       if (purge)
-               cmd = opkg_cmd_find ("purge");
-       else
-               cmd = opkg_cmd_find ("remove");
-
-       err = opkg_cmd_exec (cmd, &opkg_conf, 1, &name, NULL);
-       
-       opkg_conf_deinit(&opkg_conf);
-       return (err);
-}
-
-
-int 
-opkg_lists_update(args_t *args)
-{
-       opkg_cmd_t *cmd;
-       opkg_conf_t opkg_conf;
-       int err;
-
-       err = opkg_conf_init (&opkg_conf, args);
-       if (err)
-       {
-               return err;
-       }
-
-       /* we need to do this because of static declarations, 
-        * maybe a good idea to change */
-       cmd = opkg_cmd_find ("update");
-
-       err = opkg_cmd_exec (cmd, &opkg_conf, 0, NULL, NULL);
-       
-       opkg_conf_deinit(&opkg_conf);
-       return (err);
-}
-
-
-int 
-opkg_packages_upgrade(args_t *args)
-{
-       opkg_cmd_t *cmd;
-       opkg_conf_t opkg_conf;
-       int err;
-
-       err = opkg_conf_init (&opkg_conf, args);
-       if (err)
-       {
-               return err;
-       }
-
-       /* we need to do this because of static declarations, 
-        * maybe a good idea to change */
-       cmd = opkg_cmd_find ("upgrade");
-
-       err = opkg_cmd_exec (cmd, &opkg_conf, 0, NULL, NULL);
-       
-       opkg_conf_deinit(&opkg_conf);
-       return (err);
-}
-
-
-int
-opkg_packages_download (args_t * args, const char *name)
-{
-       opkg_cmd_t *cmd;
-       opkg_conf_t opkg_conf;
-       int err;
-
-       /* this error should be handled in application */
-       if (!name || !strlen (name))
-               return (-1);
-
-       err = opkg_conf_init (&opkg_conf, args);
-       if (err)
-       {
-               opkg_print_error_list (&opkg_conf);
-               return err;
-       }
-
-       /* we need to do this because of static declarations,
-        * maybe a good idea to change */
-       cmd = opkg_cmd_find ("download");
-       err = opkg_cmd_exec (cmd, &opkg_conf, 1, &name, NULL);
-
-       opkg_conf_deinit(&opkg_conf);
-       return (err);
-}
-
-
-int
-opkg_package_files(args_t *args, 
-                   const char *name, 
-                   opkg_list_callback cblist,
-                   void *userdata)
-{
-       opkg_cmd_t *cmd;
-       opkg_conf_t opkg_conf;
-       int err;
-
-       /* this error should be handled in application */
-       if (!name || !strlen (name))
-               return (-1);
-
-       err = opkg_conf_init (&opkg_conf, args);
-       if (err)
-       {
-               return err;
-       }
-
-       opkg_cb_list = cblist;
-       
-       /* we need to do this because of static declarations, 
-        * maybe a good idea to change */
-       cmd = opkg_cmd_find ("files");
-
-       err = opkg_cmd_exec (cmd, &opkg_conf, 1, &name, userdata);
-       
-       opkg_cb_list = NULL;
-       opkg_conf_deinit(&opkg_conf);
-       return (err);
-}
-
-
-int 
-opkg_file_search(args_t *args, 
-                const char *file,
-                               opkg_list_callback cblist,
-                void *userdata)
-{
-       opkg_cmd_t *cmd;
-       opkg_conf_t opkg_conf;
-       int err;
-       
-       /* this error should be handled in application */
-       if (!file || !strlen (file))
-               return (-1);
-
-       err = opkg_conf_init (&opkg_conf, args);
-       if (err)
-       {
-               return err;
-       }
-
-       opkg_cb_list = cblist;
-
-       /* we need to do this because of static declarations, 
-        * maybe a good idea to change */
-       cmd = opkg_cmd_find ("search");
-       err = opkg_cmd_exec (cmd, &opkg_conf, 1, &file, userdata);
-       
-       opkg_cb_list = NULL;
-       opkg_conf_deinit(&opkg_conf);
-       return(err);
-}
-
-
-int 
-opkg_file_what(args_t *args, const char *file, const char* command)
-{
-       opkg_cmd_t *cmd;
-       opkg_conf_t opkg_conf;
-       int err;
-       
-       /* this error should be handled in application */
-       if (!file || !strlen (file))
-               return (-1);
-
-       err = opkg_conf_init (&opkg_conf, args);
-       if (err)
-       {
-               return err;
-       }
-
-       /* we need to do this because of static declarations, 
-        * maybe a good idea to change */
-       cmd = opkg_cmd_find (command);
-       err = opkg_cmd_exec (cmd, &opkg_conf, 1, &file, NULL);
-       
-       opkg_conf_deinit(&opkg_conf);
-       return(err);
-}
-
-#define opkg_package_whatdepends(args,file) 
opkg_file_what(args,file,"whatdepends")
-#define opkg_package_whatrecommends(args, file) 
opkg_file_what(args,file,"whatrecommends")
-#define opkg_package_whatprovides(args, file) 
opkg_file_what(args,file,"whatprovides")
-#define opkg_package_whatconflicts(args, file) 
opkg_file_what(args,file,"whatconflicts")
-#define opkg_package_whatreplaces(args, file) 
opkg_file_what(args,file,"whatreplaces")
-
-
 int default_opkg_message_callback(opkg_conf_t *conf, message_level_t level, 
                                  char *msg)
 {

Modified: trunk/src/target/opkg/libopkg/libopkg.h
===================================================================
--- trunk/src/target/opkg/libopkg/libopkg.h     2008-06-04 15:11:44 UTC (rev 
4474)
+++ trunk/src/target/opkg/libopkg/libopkg.h     2008-06-04 15:34:52 UTC (rev 
4475)
@@ -36,49 +36,12 @@
 typedef int (*opkg_list_callback)(char *name, char *desc, char *version, 
        pkg_state_status_t status, void *userdata);
 typedef void (*opkg_progress_callback)(int complete, int total, void 
*userdata);
-
 extern int opkg_op(int argc, char *argv[]); /* opkglib.c */
-extern int opkg_init (opkg_message_callback mcall, 
-                      opkg_response_callback rcall,
-                                         args_t * args);
 
-extern int opkg_deinit (args_t *args);
-extern int opkg_packages_list(args_t *args, 
-                              const char *packages, 
-                              opkg_list_callback cblist,
-                              void *userdata);
-extern int opkg_packages_status(args_t *args, 
-                                const char *packages, 
-                                opkg_status_callback cbstatus,
-                                                               void *userdata);
-extern int opkg_packages_info(args_t *args,
-                              const char *packages,
-                              opkg_status_callback cbstatus,
-                              void *userdata);
-extern int opkg_packages_install(args_t *args, const char *name);
-extern int opkg_packages_remove(args_t *args, const char *name, int purge);
-extern int opkg_lists_update(args_t *args);
-extern int opkg_packages_upgrade(args_t *args);
-extern int opkg_packages_download(args_t *args, const char *name);
-extern int opkg_package_files(args_t *args,
-                              const char *name,
-                                                         opkg_list_callback 
cblist,
-                                                         void *userdata);
-extern int opkg_file_search(args_t *args,
-                            const char *file,
-                                                       opkg_list_callback 
cblist,
-                                                       void *userdata);
-extern int opkg_package_whatdepends(args_t *args, const char *file);
-extern int opkg_package_whatrecommends(args_t *args, const char *file);
-extern int opkg_package_whatprovides(args_t *args, const char *file);
-extern int opkg_package_whatconflicts(args_t *args, const char *file);
-extern int opkg_package_whatreplaces(args_t *args, const char *file);
-
 extern opkg_message_callback opkg_cb_message; /* opkg_message.c */
 extern opkg_response_callback opkg_cb_response; /* user.c */
 extern opkg_status_callback opkg_cb_status;
 extern opkg_list_callback opkg_cb_list;
 extern opkg_download_progress_callback opkg_cb_download_progress; /* 
opkg_download.c */
 extern opkg_state_changed_callback opkg_cb_state_changed; /* opkg_state.c */
-
 #endif

Modified: trunk/src/target/opkg/libopkg/opkg_cmd.c
===================================================================
--- trunk/src/target/opkg/libopkg/opkg_cmd.c    2008-06-04 15:11:44 UTC (rev 
4474)
+++ trunk/src/target/opkg/libopkg/opkg_cmd.c    2008-06-04 15:34:52 UTC (rev 
4475)
@@ -72,6 +72,7 @@
 static int opkg_compare_versions_cmd(opkg_conf_t *conf, int argc, char **argv);
 static int opkg_print_architecture_cmd(opkg_conf_t *conf, int argc, char 
**argv);
 static int opkg_configure_cmd(opkg_conf_t *conf, int argc, char **argv);
+static int pkg_mark_provides(pkg_t *pkg);
 
 /* XXX: CLEANUP: The usage strings should be incorporated into this
    array for easier maintenance */
@@ -300,36 +301,6 @@
 }
 
 
-/* scan the args passed and cache the local filenames of the packages */
-int opkg_multiple_files_scan(opkg_conf_t *conf, int argc, char **argv)
-{
-     int i;
-     int err;
-    
-     /* 
-      * First scan through package names/urls
-      * For any urls, download the packages and install in database.
-      * For any files, install package info in database.
-      */
-     for (i = 0; i < argc; i ++) {
-         char *filename = argv [i];
-         //char *tmp = basename (tmp);
-         //int tmplen = strlen (tmp);
-
-         //if (strcmp (tmp + (tmplen - strlen (OPKG_PKG_EXTENSION)), 
OPKG_PKG_EXTENSION) != 0)
-         //     continue;
-         //if (strcmp (tmp + (tmplen - strlen (DPKG_PKG_EXTENSION)), 
DPKG_PKG_EXTENSION) != 0)
-         //     continue;
-       
-          opkg_message(conf, OPKG_DEBUG2, "Debug mfs: %s  \n",filename );
-
-         err = opkg_prepare_url_for_install(conf, filename, &argv[i]);
-         if (err)
-           return err;
-     }
-     return 0;
-}
-
 struct opkg_intercept
 {
     char *oldpath;
@@ -338,7 +309,7 @@
 
 typedef struct opkg_intercept *opkg_intercept_t;
 
-opkg_intercept_t opkg_prep_intercepts(opkg_conf_t *conf)
+static opkg_intercept_t opkg_prep_intercepts(opkg_conf_t *conf)
 {
     opkg_intercept_t ctx;
     char *newpath;
@@ -367,7 +338,7 @@
     return ctx;
 }
 
-int opkg_finalize_intercepts(opkg_intercept_t ctx)
+static int opkg_finalize_intercepts(opkg_intercept_t ctx)
 {
     char *cmd;
     DIR *dir;
@@ -415,7 +386,7 @@
    used to end recursion and avoid an infinite loop on graph cycles.
    pkg_vec ordered will finally contain the ordered set of packages.
 */
-int opkg_recurse_pkgs_in_order(opkg_conf_t *conf, pkg_t *pkg, pkg_vec_t *all,
+static int opkg_recurse_pkgs_in_order(opkg_conf_t *conf, pkg_t *pkg, pkg_vec_t 
*all,
                                pkg_vec_t *visited, pkg_vec_t *ordered)
 {
     int j,k,l,m;
@@ -497,7 +468,7 @@
 
 }
 
-int opkg_configure_packages(opkg_conf_t *conf, char *pkg_name)
+static int opkg_configure_packages(opkg_conf_t *conf, char *pkg_name)
 {
     pkg_vec_t *all, *ordered, *visited;
      int i;
@@ -1329,7 +1300,7 @@
      return 0;
 }
 
-int pkg_mark_provides(pkg_t *pkg)
+static int pkg_mark_provides(pkg_t *pkg)
 {
      int provides_count = pkg->provides_count;
      abstract_pkg_t **provides = pkg->provides;

Modified: trunk/src/target/opkg/libopkg/opkg_cmd.h
===================================================================
--- trunk/src/target/opkg/libopkg/opkg_cmd.h    2008-06-04 15:11:44 UTC (rev 
4474)
+++ trunk/src/target/opkg/libopkg/opkg_cmd.h    2008-06-04 15:34:52 UTC (rev 
4475)
@@ -31,13 +31,6 @@
 opkg_cmd_t *opkg_cmd_find(const char *name);
 int opkg_cmd_exec(opkg_cmd_t *cmd, opkg_conf_t *conf, int argc, 
                   const char **argv, void *userdata);
-int opkg_multiple_files_scan (opkg_conf_t *conf, int argc, char *argv[]);
-/* install any packges with state_want == SW_INSTALL */
-int opkg_install_wanted_packages(opkg_conf_t *conf);
-/* ensure that all dependences are satisfied */
-int opkg_configure_packages(opkg_conf_t *conf, char *pkg_name);
-
-int pkg_mark_provides(pkg_t *pkg);
 void opkg_print_error_list (opkg_conf_t *conf);
 
 #endif

Modified: trunk/src/target/opkg/libopkg/opkg_conf.c
===================================================================
--- trunk/src/target/opkg/libopkg/opkg_conf.c   2008-06-04 15:11:44 UTC (rev 
4474)
+++ trunk/src/target/opkg/libopkg/opkg_conf.c   2008-06-04 15:34:52 UTC (rev 
4475)
@@ -138,7 +138,6 @@
        return OPKG_CONF_ERR_LOCK;
      }
 
-
      if (args->tmp_dir)
          tmp_dir_base = args->tmp_dir;
      else 
@@ -153,27 +152,6 @@
          return OPKG_CONF_ERR_TMP_DIR;
      }
 
-     conf->force_depends = 0;
-     conf->force_defaults = 0;
-     conf->force_overwrite = 0;
-     conf->force_downgrade = 0;
-     conf->force_reinstall = 0;
-     conf->force_space = 0;
-     conf->force_removal_of_essential_packages = 0;
-     conf->force_removal_of_dependent_packages = 0;
-     conf->nodeps = 0;
-     conf->offline_root = NULL;
-     conf->offline_root_pre_script_cmd = NULL;
-     conf->offline_root_post_script_cmd = NULL;
-     conf->verbosity = 1;
-     conf->noaction = 0;
-
-     conf->http_proxy = NULL;
-     conf->ftp_proxy = NULL;
-     conf->no_proxy = NULL;
-     conf->proxy_user = NULL;
-     conf->proxy_passwd = NULL;
-
      pkg_hash_init("pkg-hash", &conf->pkg_hash, OPKG_CONF_DEFAULT_HASH_LEN);
      hash_table_init("file-hash", &conf->file_hash, 
OPKG_CONF_DEFAULT_HASH_LEN);
      hash_table_init("obs-file-hash", &conf->obs_file_hash, 
OPKG_CONF_DEFAULT_HASH_LEN);




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

Reply via email to