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. r4395 - trunk/src/target/opkg/libopkg ([EMAIL PROTECTED])
2. r4396 - trunk/src/target/opkg/libopkg ([EMAIL PROTECTED])
3. r4397 - trunk/src/target/opkg/tests ([EMAIL PROTECTED])
4. org.openmoko.dev: 1603a42461b9e752b88d648861fab5c00f96c73b
([EMAIL PROTECTED])
5. org.openmoko.dev: 1603a42461b9e752b88d648861fab5c00f96c73b
([EMAIL PROTECTED])
6. org.openmoko.dev: 4abf05437729877aa1f291f8ba69fa0ab4ac0505
([EMAIL PROTECTED])
7. org.openmoko.dev: 4abf05437729877aa1f291f8ba69fa0ab4ac0505
([EMAIL PROTECTED])
--- Begin Message ---
Author: thomas
Date: 2008-04-24 13:03:31 +0200 (Thu, 24 Apr 2008)
New Revision: 4395
Modified:
trunk/src/target/opkg/libopkg/opkg.c
Log:
opkg: implement new opkg_upgrade_package and opkg_upgrade_all functions
Modified: trunk/src/target/opkg/libopkg/opkg.c
===================================================================
--- trunk/src/target/opkg/libopkg/opkg.c 2008-04-23 15:40:38 UTC (rev
4394)
+++ trunk/src/target/opkg/libopkg/opkg.c 2008-04-24 11:03:31 UTC (rev
4395)
@@ -406,13 +406,80 @@
int
opkg_upgrade_package (opkg_t *opkg, const char *package_name,
opkg_progress_callback_t progress_callback, void *user_data)
{
- return 1;
+ pkg_t *pkg;
+
+ opkg_assert (opkg != NULL);
+ opkg_assert (package_name != NULL);
+
+ progress (0);
+
+ pkg_info_preinstall_check (opkg->conf);
+
+ if (opkg->conf->restrict_to_default_dest)
+ {
+ pkg = pkg_hash_fetch_installed_by_name_dest (&opkg->conf->pkg_hash,
+ package_name,
+ opkg->conf->default_dest);
+ if (pkg == NULL)
+ {
+ /* XXX: Error: Package not installed in default_dest */
+ return 1;
+ }
+ }
+ else
+ {
+ pkg = pkg_hash_fetch_installed_by_name (&opkg->conf->pkg_hash,
+ package_name);
+ }
+
+ if (!pkg)
+ {
+ /* XXX: Error: Package not installed */
+ return 1;
+ }
+
+ progress (25);
+
+ opkg_upgrade_pkg (opkg->conf, pkg);
+ progress (75);
+
+ opkg_configure_packages (opkg->conf, NULL);
+ progress (100);
+ return 0;
}
int
opkg_upgrade_all (opkg_t *opkg, opkg_progress_callback_t progress_callback,
void *user_data)
{
- return 1;
+ pkg_vec_t *installed;
+ int err = 0;
+ int i;
+ pkg_t *pkg;
+
+ opkg_assert (opkg != NULL);
+ progress (0);
+
+ installed = pkg_vec_alloc ();
+ pkg_info_preinstall_check (opkg->conf);
+
+ pkg_hash_fetch_all_installed (&opkg->conf->pkg_hash, installed);
+ for (i = 0; i < installed->len; i++)
+ {
+ pkg = installed->pkgs[i];
+ err += opkg_upgrade_pkg (opkg->conf, pkg);
+ progress (100 * i / installed->len);
+ }
+ pkg_vec_free (installed);
+
+ if (err)
+ return 1;
+
+ err = opkg_configure_packages (opkg->conf, NULL);
+ if (err)
+ return 1;
+
+ progress (100);
+ return 0;
}
int
--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2008-04-24 13:04:07 +0200 (Thu, 24 Apr 2008)
New Revision: 4396
Modified:
trunk/src/target/opkg/libopkg/opkg.c
Log:
opkg: minor white space and indent fixes
Modified: trunk/src/target/opkg/libopkg/opkg.c
===================================================================
--- trunk/src/target/opkg/libopkg/opkg.c 2008-04-24 11:03:31 UTC (rev
4395)
+++ trunk/src/target/opkg/libopkg/opkg.c 2008-04-24 11:04:07 UTC (rev
4396)
@@ -40,8 +40,8 @@
};
#define opkg_assert(expr) if (!(expr)) { \
- printf ("opkg: file %s: line %d (%s): Assertation '%s' failed",\
- __FILE__, __LINE__, __PRETTY_FUNCTION__, #expr); abort(); }
+ printf ("opkg: file %s: line %d (%s): Assertation '%s' failed",\
+ __FILE__, __LINE__, __PRETTY_FUNCTION__, # expr); abort (); }
#define progress(percent) if (progress_callback) progress_callback (opkg,
percent, user_data);
@@ -98,12 +98,12 @@
int
curl_progress_cb (struct _curl_cb_data *cb_data,
- double t, /* dltotal */
- double d, /* dlnow */
- double ultotal,
- double ulnow)
+ double t, /* dltotal */
+ double d, /* dlnow */
+ double ultotal,
+ double ulnow)
{
- int p = (t) ? d*100/t : 0;
+ int p = (t) ? d * 100 / t : 0;
static int prev = -1;
/* prevent the same value being sent twice (can occur due to rounding) */
@@ -114,9 +114,9 @@
if (t < 1)
return 0;
- (cb_data->cb) (cb_data->opkg,
- cb_data->start_range + (d/t * ((cb_data->finish_range -
cb_data->start_range))),
- cb_data->user_data);
+ (cb_data->cb)(cb_data->opkg,
+ cb_data->start_range + (d / t * ((cb_data->finish_range -
cb_data->start_range))),
+ cb_data->user_data);
return 0;
}
--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2008-04-24 13:05:21 +0200 (Thu, 24 Apr 2008)
New Revision: 4397
Modified:
trunk/src/target/opkg/tests/libopkg_test.c
Log:
opkg: Add upgrade and upgrade_all functions to libopkg_test
Improve progress display in libopkg_test
Modified: trunk/src/target/opkg/tests/libopkg_test.c
===================================================================
--- trunk/src/target/opkg/tests/libopkg_test.c 2008-04-24 11:04:07 UTC (rev
4396)
+++ trunk/src/target/opkg/tests/libopkg_test.c 2008-04-24 11:05:21 UTC (rev
4397)
@@ -5,7 +5,8 @@
void
progress_callback (opkg_t *opkg, int percent, void *data)
{
- printf ("%s %d\n", (char*) data, percent);
+ printf ("\r%s %3d%%", (char*) data, percent);
+ fflush (stdout);
}
@@ -22,16 +23,19 @@
opkg_read_config_files (opkg);
err = opkg_update_package_lists (opkg, progress_callback, "Updating...");
+ printf ("\nopkg_update_package_lists returned %d\n", err);
- printf ("opkg_update_package_lists returned %d\n", err);
-
err = opkg_install_package (opkg, "aspell", progress_callback,
"Installing...");
+ printf ("\nopkg_install_package returned %d\n", err);
- printf ("opkg_install_package returned %d\n", err);
+ err = opkg_upgrade_package (opkg, "aspell", progress_callback,
"Upgrading...");
+ printf ("\nopkg_upgrade_package returned %d\n", err);
+ err = opkg_upgrade_all (opkg, progress_callback, "Upgrading all...");
+ printf ("\nopkg_upgrade_package returned %d\n", err);
+
err = opkg_remove_package (opkg, "aspell", progress_callback, "Removing...");
+ printf ("\nopkg_remove_package returned %d\n", err);
- printf ("opkg_remove_package returned %d\n", err);
-
opkg_free (opkg);
}
--- End Message ---
--- Begin Message ---
revision: 1603a42461b9e752b88d648861fab5c00f96c73b
date: 2008-04-25T04:22:40
author: [EMAIL PROTECTED]
branch: org.openmoko.dev
changelog:
task-openmoko-games: add kobodeluxe
manifest:
format_version "1"
new_manifest [8734ab8f6d8fd8e62fa6a39a6389aa74deed8f78]
old_revision [5a2ef2d38d37f776b966e6bc678e4d309015e3b5]
patch "packages/tasks/task-openmoko-games.bb"
from [7136c47512f8e4dd2fd33f9a11c541660b9e081a]
to [6e11d79b18daaa4b8c1f79a5c0a2cce2148d37c2]
#
#
# patch "packages/tasks/task-openmoko-games.bb"
# from [7136c47512f8e4dd2fd33f9a11c541660b9e081a]
# to [6e11d79b18daaa4b8c1f79a5c0a2cce2148d37c2]
#
============================================================
--- packages/tasks/task-openmoko-games.bb
7136c47512f8e4dd2fd33f9a11c541660b9e081a
+++ packages/tasks/task-openmoko-games.bb
6e11d79b18daaa4b8c1f79a5c0a2cce2148d37c2
@@ -1,7 +1,7 @@ LICENSE = "MIT"
DESCRIPTION = "Openmoko: Games for the Openmoko Linux Distribution"
SECTION = "openmoko/base"
LICENSE = "MIT"
-PR = "r71"
+PR = "r71.01"
inherit task
@@ -11,4 +11,5 @@ RDEPENDS_task-openmoko-games = "\
DESCRIPTION_task-openmoko-games = "Openmoko: Games"
RDEPENDS_task-openmoko-games = "\
oh-puzzles \
+ kobodeluxe \
"
--- End Message ---
--- Begin Message ---
revision: 1603a42461b9e752b88d648861fab5c00f96c73b
date: 2008-04-25T04:22:40
author: [EMAIL PROTECTED]
branch: org.openmoko.dev
changelog:
task-openmoko-games: add kobodeluxe
manifest:
format_version "1"
new_manifest [8734ab8f6d8fd8e62fa6a39a6389aa74deed8f78]
old_revision [5a2ef2d38d37f776b966e6bc678e4d309015e3b5]
patch "packages/tasks/task-openmoko-games.bb"
from [7136c47512f8e4dd2fd33f9a11c541660b9e081a]
to [6e11d79b18daaa4b8c1f79a5c0a2cce2148d37c2]
#
#
# patch "packages/tasks/task-openmoko-games.bb"
# from [7136c47512f8e4dd2fd33f9a11c541660b9e081a]
# to [6e11d79b18daaa4b8c1f79a5c0a2cce2148d37c2]
#
============================================================
--- packages/tasks/task-openmoko-games.bb
7136c47512f8e4dd2fd33f9a11c541660b9e081a
+++ packages/tasks/task-openmoko-games.bb
6e11d79b18daaa4b8c1f79a5c0a2cce2148d37c2
@@ -1,7 +1,7 @@ LICENSE = "MIT"
DESCRIPTION = "Openmoko: Games for the Openmoko Linux Distribution"
SECTION = "openmoko/base"
LICENSE = "MIT"
-PR = "r71"
+PR = "r71.01"
inherit task
@@ -11,4 +11,5 @@ RDEPENDS_task-openmoko-games = "\
DESCRIPTION_task-openmoko-games = "Openmoko: Games"
RDEPENDS_task-openmoko-games = "\
oh-puzzles \
+ kobodeluxe \
"
--- End Message ---
--- Begin Message ---
revision: 4abf05437729877aa1f291f8ba69fa0ab4ac0505
date: 2008-04-25T03:37:45
author: [EMAIL PROTECTED]
branch: org.openmoko.dev
changelog:
classpath: update preferred versions to 0.97.1.
Thanks to Robert Schuster <[EMAIL PROTECTED]>
* added classpath-native_0.97.1.bb
manifest:
format_version "1"
new_manifest [28ce6c5a0ed30ae05e68798ba666cb638e9af3c0]
old_revision [9e2f0e0407b56c34484181bacd2d2f6af701e0d5]
add_file "packages/classpath/classpath-native_0.97.1.bb"
content [4b052ebae756323751932779865b45cf50a920fa]
patch "conf/distro/include/preferred-om-2008-versions.inc"
from [c70b5347213d7bf32f261eaa409d0f26bf5bfbc1]
to [95067f1922a700da3388e53d3ea5dbefa243d72b]
#
#
# add_file "packages/classpath/classpath-native_0.97.1.bb"
# content [4b052ebae756323751932779865b45cf50a920fa]
#
# patch "conf/distro/include/preferred-om-2008-versions.inc"
# from [c70b5347213d7bf32f261eaa409d0f26bf5bfbc1]
# to [95067f1922a700da3388e53d3ea5dbefa243d72b]
#
============================================================
--- packages/classpath/classpath-native_0.97.1.bb
4b052ebae756323751932779865b45cf50a920fa
+++ packages/classpath/classpath-native_0.97.1.bb
4b052ebae756323751932779865b45cf50a920fa
@@ -0,0 +1,3 @@
+require classpath-native.inc
+
+PR = "r0"
============================================================
--- conf/distro/include/preferred-om-2008-versions.inc
c70b5347213d7bf32f261eaa409d0f26bf5bfbc1
+++ conf/distro/include/preferred-om-2008-versions.inc
95067f1922a700da3388e53d3ea5dbefa243d72b
@@ -162,10 +162,10 @@ PREFERRED_VERSION_clamsmtp ?= "1.8"
PREFERRED_VERSION_ckermit ?= "211"
PREFERRED_VERSION_clamav ?= "0.91.1"
PREFERRED_VERSION_clamsmtp ?= "1.8"
-PREFERRED_VERSION_classpath ?= "0.20"
-PREFERRED_VERSION_classpath-gtk ?= "0.93"
-PREFERRED_VERSION_classpath-minimal ?= "0.95"
-PREFERRED_VERSION_classpath-minimal-native ?= "0.95"
+PREFERRED_VERSION_classpath ?= "0.97.1"
+PREFERRED_VERSION_classpath-gtk ?= "0.97.1"
+PREFERRED_VERSION_classpath-minimal ?= "0.97.1"
+PREFERRED_VERSION_classpath-native ?= "0.97.1"
PREFERRED_VERSION_clearsilver ?= "0.10.3"
PREFERRED_VERSION_clish ?= "0.7.1"
PREFERRED_VERSION_cmake-native ?= "2.4.7"
--- End Message ---
--- Begin Message ---
revision: 4abf05437729877aa1f291f8ba69fa0ab4ac0505
date: 2008-04-25T03:37:45
author: [EMAIL PROTECTED]
branch: org.openmoko.dev
changelog:
classpath: update preferred versions to 0.97.1.
Thanks to Robert Schuster <[EMAIL PROTECTED]>
* added classpath-native_0.97.1.bb
manifest:
format_version "1"
new_manifest [28ce6c5a0ed30ae05e68798ba666cb638e9af3c0]
old_revision [9e2f0e0407b56c34484181bacd2d2f6af701e0d5]
add_file "packages/classpath/classpath-native_0.97.1.bb"
content [4b052ebae756323751932779865b45cf50a920fa]
patch "conf/distro/include/preferred-om-2008-versions.inc"
from [c70b5347213d7bf32f261eaa409d0f26bf5bfbc1]
to [95067f1922a700da3388e53d3ea5dbefa243d72b]
#
#
# add_file "packages/classpath/classpath-native_0.97.1.bb"
# content [4b052ebae756323751932779865b45cf50a920fa]
#
# patch "conf/distro/include/preferred-om-2008-versions.inc"
# from [c70b5347213d7bf32f261eaa409d0f26bf5bfbc1]
# to [95067f1922a700da3388e53d3ea5dbefa243d72b]
#
============================================================
--- packages/classpath/classpath-native_0.97.1.bb
4b052ebae756323751932779865b45cf50a920fa
+++ packages/classpath/classpath-native_0.97.1.bb
4b052ebae756323751932779865b45cf50a920fa
@@ -0,0 +1,3 @@
+require classpath-native.inc
+
+PR = "r0"
============================================================
--- conf/distro/include/preferred-om-2008-versions.inc
c70b5347213d7bf32f261eaa409d0f26bf5bfbc1
+++ conf/distro/include/preferred-om-2008-versions.inc
95067f1922a700da3388e53d3ea5dbefa243d72b
@@ -162,10 +162,10 @@ PREFERRED_VERSION_clamsmtp ?= "1.8"
PREFERRED_VERSION_ckermit ?= "211"
PREFERRED_VERSION_clamav ?= "0.91.1"
PREFERRED_VERSION_clamsmtp ?= "1.8"
-PREFERRED_VERSION_classpath ?= "0.20"
-PREFERRED_VERSION_classpath-gtk ?= "0.93"
-PREFERRED_VERSION_classpath-minimal ?= "0.95"
-PREFERRED_VERSION_classpath-minimal-native ?= "0.95"
+PREFERRED_VERSION_classpath ?= "0.97.1"
+PREFERRED_VERSION_classpath-gtk ?= "0.97.1"
+PREFERRED_VERSION_classpath-minimal ?= "0.97.1"
+PREFERRED_VERSION_classpath-native ?= "0.97.1"
PREFERRED_VERSION_clearsilver ?= "0.10.3"
PREFERRED_VERSION_clish ?= "0.7.1"
PREFERRED_VERSION_cmake-native ?= "2.4.7"
--- End Message ---
_______________________________________________
commitlog mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/commitlog