Send commitlog mailing list submissions to
[email protected]
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. r4387 - in trunk/src/target/opkg: libopkg tests
([EMAIL PROTECTED])
2. r4388 - trunk/src/target/opkg/libopkg ([EMAIL PROTECTED])
3. r4389 - trunk/src/target/opkg/libopkg ([EMAIL PROTECTED])
4. r4390 - in trunk/src/target/opkg: . libopkg tests
([EMAIL PROTECTED])
5. org.openmoko.dev: 9976528c1857260d5146b487856e07a754b12dd0
([EMAIL PROTECTED])
6. org.openmoko.dev: 9976528c1857260d5146b487856e07a754b12dd0
([EMAIL PROTECTED])
7. org.openmoko.dev: 262a1eb4ef461caa8e0fd85a487b2145d7c35614
([EMAIL PROTECTED])
--- Begin Message ---
Author: thomas
Date: 2008-04-22 12:53:38 +0200 (Tue, 22 Apr 2008)
New Revision: 4387
Modified:
trunk/src/target/opkg/libopkg/opkg.c
trunk/src/target/opkg/libopkg/opkg.h
trunk/src/target/opkg/tests/libopkg_test.c
Log:
opkg: add progress callbacks to libopkg api
libopkg: fix opkg_install_package()
Modified: trunk/src/target/opkg/libopkg/opkg.c
===================================================================
--- trunk/src/target/opkg/libopkg/opkg.c 2008-04-22 02:50:50 UTC (rev
4386)
+++ trunk/src/target/opkg/libopkg/opkg.c 2008-04-22 10:53:38 UTC (rev
4387)
@@ -243,59 +243,72 @@
}
int
-opkg_install_package (opkg_t *opkg, char *package_name)
+opkg_install_package (opkg_t *opkg, const char *package_name,
opkg_progress_callback_t progress_callback, void *user_data)
{
int err;
+ char *package_id;
+ progress_callback (opkg, 0, user_data);
+
+ /* download the package */
+ opkg_prepare_url_for_install (opkg->conf, package_name, &package_id);
+ progress_callback (opkg, 50, user_data);
+
+ /* ... */
pkg_info_preinstall_check (opkg->conf);
+ /* unpack the package */
if (opkg->conf->multiple_providers)
{
- err = opkg_install_multi_by_name (opkg->conf, package_name);
+ err = opkg_install_multi_by_name (opkg->conf, package_id);
}
else
{
- err = opkg_install_by_name (opkg->conf, package_name);
+ err = opkg_install_by_name (opkg->conf, package_id);
}
+ progress_callback (opkg, 75, user_data);
+
+ /* run configure scripts, etc. */
err = opkg_configure_packages (opkg->conf, NULL);
- if (opkg->conf->noaction)
- return err;
-
+ /* write out status files and file lists */
opkg_conf_write_status_files (opkg->conf);
pkg_write_changed_filelists (opkg->conf);
+ progress_callback (opkg, 100, user_data);
return err;
}
int
-opkg_remove_package (opkg_t *opkg, char *package_name)
+opkg_remove_package (opkg_t *opkg, const char *package_name,
opkg_progress_callback_t progress_callback, void *user_data)
{
return 1;
}
int
-opkg_upgrade_package (opkg_t *opkg, char *package_name)
+opkg_upgrade_package (opkg_t *opkg, const char *package_name,
opkg_progress_callback_t progress_callback, void *user_data)
{
return 1;
}
int
-opkg_upgrade_all (opkg_t *opkg)
+opkg_upgrade_all (opkg_t *opkg, opkg_progress_callback_t progress_callback,
void *user_data)
{
return 1;
}
int
-opkg_update_package_lists (opkg_t *opkg)
+opkg_update_package_lists (opkg_t *opkg, opkg_progress_callback_t
progress_callback, void *user_data)
{
char *tmp;
int err;
char *lists_dir;
pkg_src_list_elt_t *iter;
pkg_src_t *src;
+ int sources_list_count, sources_done;
+ progress_callback (opkg, 0, user_data);
sprintf_alloc (&lists_dir, "%s",
(opkg->conf->restrict_to_default_dest)
@@ -330,6 +343,15 @@
return 1;
}
+ /* cout the number of sources so we can give some progress updates */
+ sources_list_count = 0;
+ sources_done = 0;
+ iter = opkg->conf->pkg_src_list.head;
+ while (iter)
+ {
+ sources_list_count++;
+ iter = iter->next;
+ }
for (iter = opkg->conf->pkg_src_list.head; iter; iter = iter->next)
{
@@ -420,6 +442,9 @@
*/
#endif
free (list_file_name);
+
+ sources_done++;
+ progress_callback (opkg, 100 * sources_done / sources_list_count,
user_data);
}
rmdir (tmp);
free (tmp);
Modified: trunk/src/target/opkg/libopkg/opkg.h
===================================================================
--- trunk/src/target/opkg/libopkg/opkg.h 2008-04-22 02:50:50 UTC (rev
4386)
+++ trunk/src/target/opkg/libopkg/opkg.h 2008-04-22 10:53:38 UTC (rev
4387)
@@ -16,6 +16,7 @@
*/
typedef struct _opkg_t opkg_t;
+typedef void (*opkg_progress_callback_t) (opkg_t *opkg, int percentage, void
*user_data);
opkg_t* opkg_new ();
void opkg_free (opkg_t *opkg);
@@ -23,8 +24,8 @@
void opkg_set_option (opkg_t *opkg, char *option, void *value);
int opkg_read_config_files (opkg_t *opkg);
-int opkg_install_package (opkg_t *opkg, char *package_name);
-int opkg_remove_package (opkg_t *opkg, char *package_name);
-int opkg_upgrade_package (opkg_t *opkg, char *package_name);
-int opkg_upgrade_all (opkg_t *opkg);
-int opkg_update_package_lists (opkg_t *opkg);
+int opkg_install_package (opkg_t *opkg, const char *package_name,
opkg_progress_callback_t callback, void *user_data);
+int opkg_remove_package (opkg_t *opkg, const char *package_name,
opkg_progress_callback_t callback, void *user_data);
+int opkg_upgrade_package (opkg_t *opkg, const char *package_name,
opkg_progress_callback_t callback, void *user_data);
+int opkg_upgrade_all (opkg_t *opkg, opkg_progress_callback_t callback, void
*user_data);
+int opkg_update_package_lists (opkg_t *opkg, opkg_progress_callback_t
callback, void *user_data);
Modified: trunk/src/target/opkg/tests/libopkg_test.c
===================================================================
--- trunk/src/target/opkg/tests/libopkg_test.c 2008-04-22 02:50:50 UTC (rev
4386)
+++ trunk/src/target/opkg/tests/libopkg_test.c 2008-04-22 10:53:38 UTC (rev
4387)
@@ -1,6 +1,14 @@
#include <opkg.h>
#include <stdlib.h>
+#include <stdio.h>
+void
+progress_callback (opkg_t *opkg, int percent, void *data)
+{
+ printf ("%s %d\n", (char*) data, percent);
+}
+
+
int
main (int argc, char **argv)
{
@@ -13,9 +21,13 @@
opkg_read_config_files (opkg);
- err = opkg_update_package_lists (opkg);
+ err = opkg_update_package_lists (opkg, progress_callback, "Updating...");
printf ("opkg_update_package_lists returned %d\n", err);
+ err = opkg_install_package (opkg, "aspell", progress_callback,
"Installing...");
+
+ printf ("opkg_install_package returned %d\n", err);
+
opkg_free (opkg);
}
--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2008-04-22 13:12:13 +0200 (Tue, 22 Apr 2008)
New Revision: 4388
Modified:
trunk/src/target/opkg/libopkg/opkg_download.c
Log:
libopkg: remove default progress bar
Modified: trunk/src/target/opkg/libopkg/opkg_download.c
===================================================================
--- trunk/src/target/opkg/libopkg/opkg_download.c 2008-04-22 10:53:38 UTC
(rev 4387)
+++ trunk/src/target/opkg/libopkg/opkg_download.c 2008-04-22 11:12:13 UTC
(rev 4388)
@@ -58,23 +58,6 @@
opkg_cb_download_progress (p, url);
return 0;
}
-
- /* skip progress bar if we haven't done started yet
- * this prevents drawing the progress bar if we receive an error such as
- * file not found */
- if (t == 0)
- return 0;
-
- printf ("\r%3d%% |", p);
- for (i = 1; i < 73; i++)
- {
- if (i <= p * 0.73)
- printf ("=");
- else
- printf ("-");
- }
- printf ("|");
- fflush(stdout);
return 0;
}
@@ -88,8 +71,6 @@
opkg_message(conf,OPKG_NOTICE,"Downloading %s\n", src);
- fflush(stdout);
-
if (str_starts_with(src, "file:")) {
int ret;
const char *file_src = src + 5;
@@ -157,10 +138,6 @@
else
return -1;
- /* if no custom progress handler was set, we need to clear the default
progress bar */
- if (!opkg_cb_download_progress)
- printf ("\n");
-
err = file_move(tmp_file_location, dest_file_name);
free(tmp_file_location);
--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2008-04-22 13:14:35 +0200 (Tue, 22 Apr 2008)
New Revision: 4389
Modified:
trunk/src/target/opkg/libopkg/opkg_download.c
Log:
opkg: remove unused variable
Modified: trunk/src/target/opkg/libopkg/opkg_download.c
===================================================================
--- trunk/src/target/opkg/libopkg/opkg_download.c 2008-04-22 11:12:13 UTC
(rev 4388)
+++ trunk/src/target/opkg/libopkg/opkg_download.c 2008-04-22 11:14:35 UTC
(rev 4389)
@@ -42,7 +42,6 @@
double ultotal,
double ulnow)
{
- int i;
int p = (t) ? d*100/t : 0;
if (opkg_cb_download_progress)
--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2008-04-22 18:27:47 +0200 (Tue, 22 Apr 2008)
New Revision: 4390
Modified:
trunk/src/target/opkg/Makefile.am
trunk/src/target/opkg/libopkg/opkg.c
trunk/src/target/opkg/tests/libopkg_test.c
Log:
opkg: fix problems in opkg_install_package and implement opkg_remove_package
Modified: trunk/src/target/opkg/Makefile.am
===================================================================
--- trunk/src/target/opkg/Makefile.am 2008-04-22 11:14:35 UTC (rev 4389)
+++ trunk/src/target/opkg/Makefile.am 2008-04-22 16:27:47 UTC (rev 4390)
@@ -1,4 +1,4 @@
-SUBDIRS = libbb libopkg src
+SUBDIRS = libbb libopkg src tests
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
Modified: trunk/src/target/opkg/libopkg/opkg.c
===================================================================
--- trunk/src/target/opkg/libopkg/opkg.c 2008-04-22 11:14:35 UTC (rev
4389)
+++ trunk/src/target/opkg/libopkg/opkg.c 2008-04-22 16:27:47 UTC (rev
4390)
@@ -25,6 +25,7 @@
#include "opkg_install.h"
#include "opkg_configure.h"
#include "opkg_download.h"
+#include "opkg_remove.h"
#include "sprintf_alloc.h"
#include "file_util.h"
@@ -246,7 +247,7 @@
opkg_install_package (opkg_t *opkg, const char *package_name,
opkg_progress_callback_t progress_callback, void *user_data)
{
int err;
- char *package_id;
+ char *package_id = NULL;
progress_callback (opkg, 0, user_data);
@@ -257,6 +258,9 @@
/* ... */
pkg_info_preinstall_check (opkg->conf);
+ if (!package_id)
+ package_id = strdup (package_name);
+
/* unpack the package */
if (opkg->conf->multiple_providers)
{
@@ -267,23 +271,85 @@
err = opkg_install_by_name (opkg->conf, package_id);
}
+ if (err)
+ return err;
+
progress_callback (opkg, 75, user_data);
/* run configure scripts, etc. */
err = opkg_configure_packages (opkg->conf, NULL);
+ if (err)
+ return err;
/* write out status files and file lists */
opkg_conf_write_status_files (opkg->conf);
pkg_write_changed_filelists (opkg->conf);
progress_callback (opkg, 100, user_data);
- return err;
+ return 0;
}
int
opkg_remove_package (opkg_t *opkg, const char *package_name,
opkg_progress_callback_t progress_callback, void *user_data)
{
- return 1;
+ pkg_t *pkg = NULL;
+ pkg_t *pkg_to_remove;
+
+ if (!opkg)
+ return 1;
+
+ if (!package_name)
+ return 1;
+
+ progress_callback (opkg, 0, user_data);
+
+ pkg_info_preinstall_check (opkg->conf);
+
+ pkg_vec_t *installed_pkgs = pkg_vec_alloc ();
+
+ pkg_hash_fetch_all_installed (&opkg->conf->pkg_hash, installed_pkgs);
+
+ progress_callback (opkg, 25, user_data);
+
+ pkg = pkg_hash_fetch_installed_by_name (&opkg->conf->pkg_hash, package_name);
+
+ if (pkg == NULL)
+ {
+ /* XXX: Error: Package not installed. */
+ return 1;
+ }
+
+ if (pkg->state_status == SS_NOT_INSTALLED)
+ {
+ /* XXX: Error: Package seems to be not installed (STATUS =
NOT_INSTALLED). */
+ return 1;
+ }
+
+ progress_callback (opkg, 75, user_data);
+
+ if (opkg->conf->restrict_to_default_dest)
+ {
+ pkg_to_remove = pkg_hash_fetch_installed_by_name_dest
(&opkg->conf->pkg_hash,
+ pkg->name,
+
opkg->conf->default_dest);
+ }
+ else
+ {
+ pkg_to_remove = pkg_hash_fetch_installed_by_name (&opkg->conf->pkg_hash,
pkg->name );
+ }
+
+
+ progress_callback (opkg, 75, user_data);
+
+ opkg_remove_pkg (opkg->conf, pkg_to_remove, 0);
+
+ /* write out status files and file lists */
+ opkg_conf_write_status_files (opkg->conf);
+ pkg_write_changed_filelists (opkg->conf);
+
+
+ progress_callback (opkg, 100, user_data);
+ return 0;
}
int
Modified: trunk/src/target/opkg/tests/libopkg_test.c
===================================================================
--- trunk/src/target/opkg/tests/libopkg_test.c 2008-04-22 11:14:35 UTC (rev
4389)
+++ trunk/src/target/opkg/tests/libopkg_test.c 2008-04-22 16:27:47 UTC (rev
4390)
@@ -29,5 +29,9 @@
printf ("opkg_install_package returned %d\n", err);
+ err = opkg_remove_package (opkg, "aspell", progress_callback, "Removing...");
+
+ printf ("opkg_remove_package returned %d\n", err);
+
opkg_free (opkg);
}
--- End Message ---
--- Begin Message ---
revision: 9976528c1857260d5146b487856e07a754b12dd0
date: 2008-04-21T04:48:22
author: [EMAIL PROTECTED]
branch: org.openmoko.dev
changelog:
hal-info: add 20080313
manifest:
format_version "1"
new_manifest [897cd4da53acddfc49c8ed250d6bafe0c2ae2e01]
old_revision [54cbcdaa0ddc6f08dc77d1dcf92e5bd4aa7c5896]
add_file "packages/hal/hal-info_20080313.bb"
content [5389659078578f1501bf847f45a6a405058621b7]
#
#
# add_file "packages/hal/hal-info_20080313.bb"
# content [5389659078578f1501bf847f45a6a405058621b7]
#
============================================================
--- packages/hal/hal-info_20080313.bb 5389659078578f1501bf847f45a6a405058621b7
+++ packages/hal/hal-info_20080313.bb 5389659078578f1501bf847f45a6a405058621b7
@@ -0,0 +1,20 @@
+DESCRIPTION = "Hardware Abstraction Layer device information"
+HOMEPAGE = "http://hal.freedesktop.org/"
+SECTION = "unknown"
+LICENSE = "GPL AFL"
+
+SRC_URI = "http://hal.freedesktop.org/releases/${PN}-${PV}.tar.gz"
+S = "${WORKDIR}/${PN}-${PV}"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--disable-recall --disable-video"
+
+do_configure() {
+ gnu-configize
+ libtoolize --force
+ oe_runconf
+}
+
+PACKAGE_ARCH = "all"
+FILES_${PN} += "${datadir}/hal/"
--- End Message ---
--- Begin Message ---
revision: 9976528c1857260d5146b487856e07a754b12dd0
date: 2008-04-21T04:48:22
author: [EMAIL PROTECTED]
branch: org.openmoko.dev
changelog:
hal-info: add 20080313
manifest:
format_version "1"
new_manifest [897cd4da53acddfc49c8ed250d6bafe0c2ae2e01]
old_revision [54cbcdaa0ddc6f08dc77d1dcf92e5bd4aa7c5896]
add_file "packages/hal/hal-info_20080313.bb"
content [5389659078578f1501bf847f45a6a405058621b7]
#
#
# add_file "packages/hal/hal-info_20080313.bb"
# content [5389659078578f1501bf847f45a6a405058621b7]
#
============================================================
--- packages/hal/hal-info_20080313.bb 5389659078578f1501bf847f45a6a405058621b7
+++ packages/hal/hal-info_20080313.bb 5389659078578f1501bf847f45a6a405058621b7
@@ -0,0 +1,20 @@
+DESCRIPTION = "Hardware Abstraction Layer device information"
+HOMEPAGE = "http://hal.freedesktop.org/"
+SECTION = "unknown"
+LICENSE = "GPL AFL"
+
+SRC_URI = "http://hal.freedesktop.org/releases/${PN}-${PV}.tar.gz"
+S = "${WORKDIR}/${PN}-${PV}"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--disable-recall --disable-video"
+
+do_configure() {
+ gnu-configize
+ libtoolize --force
+ oe_runconf
+}
+
+PACKAGE_ARCH = "all"
+FILES_${PN} += "${datadir}/hal/"
--- End Message ---
--- Begin Message ---
revision: 262a1eb4ef461caa8e0fd85a487b2145d7c35614
date: 2008-04-21T07:34:27
author: [EMAIL PROTECTED]
branch: org.openmoko.dev
changelog:
File configure.in of imlib2 was changed in 20080420
The line number was changed, therefore the original
patch didn't work after 20080420.
Add a new patch.
manifest:
format_version "1"
new_manifest [909d2c4c7353420fe61bc2364d583459f82320a2]
old_revision [54cbcdaa0ddc6f08dc77d1dcf92e5bd4aa7c5896]
add_file "packages/efl1/imlib2/remove-local-includes-20080421.patch"
content [6cb1af5e1d744afaed49d06493a112c10cf8210b]
patch "packages/efl1/imlib2_cvs.bb"
from [90324b9d8bfadfca430da3b72c2b1f9c7089ee52]
to [41b7537a6af77e700c6236af3c40b2b7a8d80604]
#
#
# add_file "packages/efl1/imlib2/remove-local-includes-20080421.patch"
# content [6cb1af5e1d744afaed49d06493a112c10cf8210b]
#
# patch "packages/efl1/imlib2_cvs.bb"
# from [90324b9d8bfadfca430da3b72c2b1f9c7089ee52]
# to [41b7537a6af77e700c6236af3c40b2b7a8d80604]
#
============================================================
--- packages/efl1/imlib2/remove-local-includes-20080421.patch
6cb1af5e1d744afaed49d06493a112c10cf8210b
+++ packages/efl1/imlib2/remove-local-includes-20080421.patch
6cb1af5e1d744afaed49d06493a112c10cf8210b
@@ -0,0 +1,15 @@
+Index: imlib2/configure.in
+===================================================================
+--- imlib2.orig/configure.in 2008-04-21 14:28:58.000000000 +0800
++++ imlib2/configure.in 2008-04-21 14:30:07.000000000 +0800
+@@ -191,9 +191,7 @@
+
+ if test "x$have_x" = "xyes"; then
+ AC_PATH_XTRA
+- x_dir=${x_dir:-/usr/X11R6}
+- x_cflags=${x_cflags:--I${x_includes:-$x_dir/include}}
+- x_libs="${x_libs:--L${x_libraries:-$x_dir/lib}} -lX11 -lXext"
++ x_libs="-lX11 -lXext"
+ AC_DEFINE(BUILD_X11, 1, [enabling X11 support])
+ else
+ x_cflags=""
============================================================
--- packages/efl1/imlib2_cvs.bb 90324b9d8bfadfca430da3b72c2b1f9c7089ee52
+++ packages/efl1/imlib2_cvs.bb 41b7537a6af77e700c6236af3c40b2b7a8d80604
@@ -3,11 +3,13 @@ PV = "1.4.1.000+cvs${SRCDATE}"
# can also depend on tiff34, ungif or gif, z, bz2, id3tag
DEPENDS = "freetype libpng jpeg virtual/libx11 libxext"
PV = "1.4.1.000+cvs${SRCDATE}"
-PR = "r0"
+PR = "r0.01"
inherit efl
-SRC_URI += "file://remove-local-includes.patch;patch=1"
+# The original patch was out of date in 20080420
+SRC_URI += "file://remove-local-includes.patch;patch=1;maxdate=20080420 \
+
file://remove-local-includes-20080421.patch;patch=1;mindate=20080420 "
EXTRA_OECONF = "--with-x"
--- End Message ---
_______________________________________________
commitlog mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/commitlog