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. r3934 - trunk/src/target/opkg ([EMAIL PROTECTED])
2. r3935 - trunk/src/target/opkg ([EMAIL PROTECTED])
3. r3936 - trunk/src/target/opkg ([EMAIL PROTECTED])
4. r3937 - branches/src/target/kernel/2.6.24.x/patches
([EMAIL PROTECTED])
--- Begin Message ---
Author: thomas
Date: 2008-01-23 13:14:20 +0100 (Wed, 23 Jan 2008)
New Revision: 3934
Modified:
trunk/src/target/opkg/opkg_cmd.c
Log:
opkg: don't print "Successfully terminated." message
Modified: trunk/src/target/opkg/opkg_cmd.c
===================================================================
--- trunk/src/target/opkg/opkg_cmd.c 2008-01-23 10:49:18 UTC (rev 3933)
+++ trunk/src/target/opkg/opkg_cmd.c 2008-01-23 12:14:20 UTC (rev 3934)
@@ -153,12 +153,11 @@
result = (cmd->fun)(conf, argc, argv);
- if ( result == 0 ) {
- opkg_message(conf, OPKG_NOTICE, "Successfully terminated.\n");
- } else {
- opkg_message(conf, OPKG_NOTICE, "An error ocurred, return value:
%d.\n", result);
+ if ( result != 0 ) {
+ opkg_message(conf, OPKG_NOTICE, "An error ocurred, return value:
%d.\n", result);
}
+
if ( error_list ) {
reverse_error_list(&error_list);
--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2008-01-23 13:34:44 +0100 (Wed, 23 Jan 2008)
New Revision: 3935
Modified:
trunk/src/target/opkg/pkg_parse.c
Log:
opkg: apply "1-pkg-parse--Optimize-inefficient-parsing.patch" from OpenEmbedded
pkg_parse: Optimize inefficient parsing. Instead of expensively probing all
fields in row, dispatch based on the first letter of the field. Tests show ~12
times reduction in number of calls to low-level parsing functions.
Modified: trunk/src/target/opkg/pkg_parse.c
===================================================================
--- trunk/src/target/opkg/pkg_parse.c 2008-01-23 12:14:20 UTC (rev 3934)
+++ trunk/src/target/opkg/pkg_parse.c 2008-01-23 12:34:44 UTC (rev 3935)
@@ -241,87 +241,116 @@
for (lines = *raw; *lines; lines++) {
/* fprintf(stderr, "PARSING %s\n", *lines);*/
- if(isGenericFieldType("Package:", *lines))
- pkg->name = parseGenericFieldType("Package", *lines);
- else if(isGenericFieldType("Architecture:", *lines))
- pkg->architecture = parseGenericFieldType("Architecture", *lines);
- else if(isGenericFieldType("Filename:", *lines))
- pkg->filename = parseGenericFieldType("Filename", *lines);
- else if(isGenericFieldType("Section:", *lines))
- pkg->section = parseGenericFieldType("Section", *lines);
- else if(isGenericFieldType("MD5sum:", *lines))
- pkg->md5sum = parseGenericFieldType("MD5sum", *lines);
- /* The old opkg wrote out status files with the wrong case for MD5sum,
- let's parse it either way */
- else if(isGenericFieldType("MD5Sum:", *lines))
- pkg->md5sum = parseGenericFieldType("MD5Sum", *lines);
- else if(isGenericFieldType("Size:", *lines))
- pkg->size = parseGenericFieldType("Size", *lines);
- else if(isGenericFieldType("Source:", *lines))
- pkg->source = parseGenericFieldType("Source", *lines);
- else if(isGenericFieldType("Installed-Size:", *lines))
- pkg->installed_size = parseGenericFieldType("Installed-Size",
*lines);
- else if(isGenericFieldType("Installed-Time:", *lines)) {
- char *time_str = parseGenericFieldType("Installed-Time", *lines);
- pkg->installed_time = strtoul(time_str, NULL, 0);
- } else if(isGenericFieldType("Priority:", *lines))
- pkg->priority = parseGenericFieldType("Priority", *lines);
- else if(isGenericFieldType("Essential:", *lines)) {
- char *essential_value;
- essential_value = parseGenericFieldType("Essential", *lines);
- if (strcmp(essential_value, "yes") == 0) {
- pkg->essential = 1;
- }
- free(essential_value);
- }
- else if(isGenericFieldType("Status", *lines))
- parseStatus(pkg, *lines);
- else if(isGenericFieldType("Version", *lines))
- parseVersion(pkg, *lines);
- else if(isGenericFieldType("Maintainer", *lines))
- pkg->maintainer = parseGenericFieldType("Maintainer", *lines);
- else if(isGenericFieldType("Conffiles", *lines)){
- parseConffiles(pkg, *lines);
- reading_conffiles = 1;
- }
- else if(isGenericFieldType("Description", *lines)) {
- pkg->description = parseGenericFieldType("Description", *lines);
- reading_conffiles = 0;
- reading_description = 1;
- }
-
- else if(isGenericFieldType("Provides", *lines)){
+ switch (**lines) {
+ case 'P':
+ if(isGenericFieldType("Package:", *lines))
+ pkg->name = parseGenericFieldType("Package", *lines);
+ else if(isGenericFieldType("Priority:", *lines))
+ pkg->priority = parseGenericFieldType("Priority", *lines);
+ else if(isGenericFieldType("Provides", *lines)){
/* Here we add the internal_use to align the off by one problem between
provides_str and provides */
- provide = (char * ) malloc(strlen(*lines)+ 35 ); /* Preparing the
space for the new opkg_internal_use_only */
- if ( alterProvidesLine(*lines,provide) ){
- return EINVAL;
- }
- pkg->provides_str = parseDependsString( provide,
&pkg->provides_count);
+ provide = (char * ) malloc(strlen(*lines)+ 35 ); /* Preparing
the space for the new opkg_internal_use_only */
+ if ( alterProvidesLine(*lines,provide) ){
+ return EINVAL;
+ }
+ pkg->provides_str = parseDependsString( provide,
&pkg->provides_count);
/* Let's try to hack a bit here.
The idea is that if a package has no Provides, we would add one generic, to
permit the check of dependencies
in alot of other places. We will remove it before writing down the status
database */
- pkg_false_provides=0;
- free(provide);
- }
+ pkg_false_provides=0;
+ free(provide);
+ }
+ else if(isGenericFieldType("Pre-Depends", *lines))
+ pkg->pre_depends_str = parseDependsString(*lines,
&pkg->pre_depends_count);
+ break;
- else if(isGenericFieldType("Depends", *lines))
- pkg->depends_str = parseDependsString(*lines, &pkg->depends_count);
- else if(isGenericFieldType("Pre-Depends", *lines))
- pkg->pre_depends_str = parseDependsString(*lines,
&pkg->pre_depends_count);
- else if(isGenericFieldType("Recommends", *lines))
- pkg->recommends_str = parseDependsString(*lines,
&pkg->recommends_count);
- else if(isGenericFieldType("Suggests", *lines))
- pkg->suggests_str = parseDependsString(*lines,
&pkg->suggests_count);
- /* Abhaya: support for conflicts */
- else if(isGenericFieldType("Conflicts", *lines))
- pkg->conflicts_str = parseDependsString(*lines,
&pkg->conflicts_count);
- else if(isGenericFieldType("Replaces", *lines))
- pkg->replaces_str = parseDependsString(*lines,
&pkg->replaces_count);
- else if(line_is_blank(*lines)) {
- lines++;
+ case 'A':
+ if(isGenericFieldType("Architecture:", *lines))
+ pkg->architecture = parseGenericFieldType("Architecture",
*lines);
break;
- }
- else if(**lines == ' '){
+
+ case 'F':
+ if(isGenericFieldType("Filename:", *lines))
+ pkg->filename = parseGenericFieldType("Filename", *lines);
+ break;
+
+ case 'S':
+ if(isGenericFieldType("Section:", *lines))
+ pkg->section = parseGenericFieldType("Section", *lines);
+ else if(isGenericFieldType("Size:", *lines))
+ pkg->size = parseGenericFieldType("Size", *lines);
+ else if(isGenericFieldType("Source:", *lines))
+ pkg->source = parseGenericFieldType("Source", *lines);
+ else if(isGenericFieldType("Status", *lines))
+ parseStatus(pkg, *lines);
+ else if(isGenericFieldType("Suggests", *lines))
+ pkg->suggests_str = parseDependsString(*lines,
&pkg->suggests_count);
+ break;
+
+ case 'M':
+ if(isGenericFieldType("MD5sum:", *lines))
+ pkg->md5sum = parseGenericFieldType("MD5sum", *lines);
+ /* The old opkg wrote out status files with the wrong case for
MD5sum,
+ let's parse it either way */
+ else if(isGenericFieldType("MD5Sum:", *lines))
+ pkg->md5sum = parseGenericFieldType("MD5Sum", *lines);
+ else if(isGenericFieldType("Maintainer", *lines))
+ pkg->maintainer = parseGenericFieldType("Maintainer", *lines);
+ break;
+
+ case 'I':
+ if(isGenericFieldType("Installed-Size:", *lines))
+ pkg->installed_size = parseGenericFieldType("Installed-Size",
*lines);
+ else if(isGenericFieldType("Installed-Time:", *lines)) {
+ char *time_str = parseGenericFieldType("Installed-Time",
*lines);
+ pkg->installed_time = strtoul(time_str, NULL, 0);
+ }
+ break;
+
+ case 'E':
+ if(isGenericFieldType("Essential:", *lines)) {
+ char *essential_value;
+ essential_value = parseGenericFieldType("Essential", *lines);
+ if (strcmp(essential_value, "yes") == 0) {
+ pkg->essential = 1;
+ }
+ free(essential_value);
+ }
+ break;
+
+ case 'V':
+ if(isGenericFieldType("Version", *lines))
+ parseVersion(pkg, *lines);
+ break;
+
+ case 'C':
+ if(isGenericFieldType("Conffiles", *lines)){
+ parseConffiles(pkg, *lines);
+ reading_conffiles = 1;
+ }
+ else if(isGenericFieldType("Conflicts", *lines))
+ pkg->conflicts_str = parseDependsString(*lines,
&pkg->conflicts_count);
+ break;
+
+ case 'D':
+ if(isGenericFieldType("Description", *lines)) {
+ pkg->description = parseGenericFieldType("Description", *lines);
+ reading_conffiles = 0;
+ reading_description = 1;
+ }
+ else if(isGenericFieldType("Depends", *lines))
+ pkg->depends_str = parseDependsString(*lines,
&pkg->depends_count);
+ break;
+
+ case 'R':
+ if(isGenericFieldType("Recommends", *lines))
+ pkg->recommends_str = parseDependsString(*lines,
&pkg->recommends_count);
+ else if(isGenericFieldType("Replaces", *lines))
+ pkg->replaces_str = parseDependsString(*lines,
&pkg->replaces_count);
+
+ break;
+
+ case ' ':
if(reading_description) {
/* we already know it's not blank, so the rest of description
*/
pkg->description = realloc(pkg->description,
@@ -332,8 +361,18 @@
}
else if(reading_conffiles)
parseConffiles(pkg, *lines);
+
+ break;
+
+ default:
+ if(line_is_blank(*lines)) {
+ lines++;
+ goto out;
+ }
}
}
+out:;
+
*raw = lines;
/* If the ipk has not a Provides line, we insert our false line */
if ( pkg_false_provides==1)
--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2008-01-23 13:43:55 +0100 (Wed, 23 Jan 2008)
New Revision: 3936
Modified:
trunk/src/target/opkg/pkg_vec.c
Log:
opkg: apply "2-pkg-vec--Optimize-gross-inefficiency.patch" from OpenEmbedded
pkg_vec: Optimize gross inefficiency.
This module tries to implement *unique* vector (without duplicating objects),
and does this by iterating thru all already existing elements. Thus,
complexity of adding N elements was O(N^2). However, there're no grave reasons
to do uniqueness at all:
1. First of all, if feeds are correct, there won't be duplicates.
2. Then, even if there will be, there won't be serious problems like
segfaults.
3. Finally, for quite a few operations vectors is constructed from a
hashtable, thus uniqueness is guaranteed (which reduces possible cases of
non-uniqueness to values of Depends: and friends).
All an all, remove dup check, and make ipkg work order of magnitude faster on
a feed with few thousands of packages.
Modified: trunk/src/target/opkg/pkg_vec.c
===================================================================
--- trunk/src/target/opkg/pkg_vec.c 2008-01-23 12:34:44 UTC (rev 3935)
+++ trunk/src/target/opkg/pkg_vec.c 2008-01-23 12:43:55 UTC (rev 3936)
@@ -104,6 +104,7 @@
int i;
int found = 0;
+#if 0
/* look for a duplicate pkg by name, version, and architecture */
for (i = 0; i < vec->len; i++)
if ((strcmp(pkg->name, vec->pkgs[i]->name) == 0)
@@ -112,6 +113,7 @@
found = 1;
break;
}
+#endif
/* we didn't find one, add it */
if(!found){
@@ -191,6 +193,7 @@
{
int i;
+#if 0
/* look for a duplicate pkg by name */
for(i = 0; i < vec->len; i++)
if (strcmp(pkg->name, vec->pkgs[i]->name) == 0)
@@ -198,12 +201,15 @@
/* we didn't find one, add it */
if(i == vec->len){
+#endif
vec->pkgs =
(abstract_pkg_t **)
realloc(vec->pkgs, (vec->len + 1) * sizeof(abstract_pkg_t *));
vec->pkgs[vec->len] = pkg;
vec->len++;
+#if 0
}
+#endif
}
abstract_pkg_t * abstract_pkg_vec_get(abstract_pkg_vec_t *vec, int i)
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2008-01-23 19:20:27 +0100 (Wed, 23 Jan 2008)
New Revision: 3937
Modified:
branches/src/target/kernel/2.6.24.x/patches/gta02-acc.patch
Log:
Applied funbar-2.6.24-platform-spi-gpio-acc-repair.patch to gta02-acc.patch:
This doesn't actually do anything about the INT problem yet.
The 2.6.24 gpio spi and platform situation was completely
messed up and was a long way from even being able to talk
to the motion sensors.
This patch gets the gpio SPI actually working and both
motion sensors probed and recognized on 2.6.24.
(FUNBAR is like FUBAR with a "Nearly" in there.)
- the gpio cs function only addressed one chip, I
pushed the pin info through platform so it does
both motion sensors
- the spi_board_info chip_select member ain't a
pin ID, it is a chip select index for the
spi master
- nobody set master->num_chipselect, I pushed it
through platform stuff into s3c2410_spigpio_info
- name of the gpio spi driver had changed and the
platform side not updated
Signed-off-by: Andy Green <[EMAIL PROTECTED]>
Modified: branches/src/target/kernel/2.6.24.x/patches/gta02-acc.patch
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/gta02-acc.patch 2008-01-23
12:43:55 UTC (rev 3936)
+++ branches/src/target/kernel/2.6.24.x/patches/gta02-acc.patch 2008-01-23
18:20:27 UTC (rev 3937)
@@ -1,8 +1,8 @@
-Index: linux-2.6.24-rc7/arch/arm/mach-s3c2440/mach-gta02.c
+Index: linux-2.6.24-rc8/arch/arm/mach-s3c2440/mach-gta02.c
===================================================================
---- linux-2.6.24-rc7.orig/arch/arm/mach-s3c2440/mach-gta02.c
-+++ linux-2.6.24-rc7/arch/arm/mach-s3c2440/mach-gta02.c
-@@ -372,8 +372,6 @@
+--- linux-2.6.24-rc8.orig/arch/arm/mach-s3c2440/mach-gta02.c
++++ linux-2.6.24-rc8/arch/arm/mach-s3c2440/mach-gta02.c
+@@ -374,8 +374,6 @@
&s3c_device_usbgadget,
&s3c_device_nand,
&s3c_device_ts,
@@ -11,7 +11,7 @@
>a02_nor_flash,
};
-@@ -517,11 +515,6 @@
+@@ -504,11 +502,6 @@
/* SPI: Accelerometers attached to SPI of s3c244x */
@@ -23,7 +23,7 @@
static const struct lis302dl_platform_data lis302_pdata[] = {
{
.name = "lis302-1 (top)"
-@@ -551,10 +544,55 @@
+@@ -538,10 +531,55 @@
},
};
@@ -81,7 +81,7 @@
};
static struct resource gta02_led_resources[] = {
-@@ -716,7 +754,6 @@
+@@ -784,7 +822,6 @@
s3c_device_usb.dev.platform_data = >a02_usb_info;
s3c_device_nand.dev.platform_data = >a02_nand_info;
s3c_device_sdi.dev.platform_data = >a02_mmc_cfg;
@@ -89,7 +89,7 @@
/* Only GTA02v1 has a SD_DETECT GPIO. Since the slot is not
* hot-pluggable, this is not required anyway */
-@@ -756,6 +793,7 @@
+@@ -824,6 +861,7 @@
break;
}
@@ -97,24 +97,10 @@
platform_device_register(>a01_button_dev);
platform_device_register(>a01_pm_gsm_dev);
-@@ -777,6 +815,13 @@
- s3c2410_gpio_cfgpin(GTA01_GPIO_LCD_RESET, S3C2410_GPIO_OUTPUT);
- s3c2410_gpio_setpin(GTA01_GPIO_LCD_RESET, 1);
-
-+ s3c2410_gpio_cfgpin(S3C2410_GPD12, S3C2410_GPIO_OUTPUT);
-+ s3c2410_gpio_setpin(S3C2410_GPD12, 1);
-+
-+
-+ s3c2410_gpio_cfgpin(S3C2410_GPD13, S3C2410_GPIO_OUTPUT);
-+ s3c2410_gpio_setpin(S3C2410_GPD13, 1);
-+
- /* Make sure the modem can wake us up */
- set_irq_type(GTA02_IRQ_MODEM, IRQT_RISING);
- rc = request_irq(GTA02_IRQ_MODEM, gta02_modem_irq, IRQF_DISABLED,
-Index: linux-2.6.24-rc7/drivers/input/misc/lis302dl.c
+Index: linux-2.6.24-rc8/drivers/input/misc/lis302dl.c
===================================================================
---- linux-2.6.24-rc7.orig/drivers/input/misc/lis302dl.c
-+++ linux-2.6.24-rc7/drivers/input/misc/lis302dl.c
+--- linux-2.6.24-rc8.orig/drivers/input/misc/lis302dl.c
++++ linux-2.6.24-rc8/drivers/input/misc/lis302dl.c
@@ -84,6 +84,7 @@
enum lis302dl_reg_ctrl3 {
--- End Message ---
_______________________________________________
commitlog mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/commitlog