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. r4096 - branches/src/target/kernel/2.6.24.x/patches
([EMAIL PROTECTED])
2. r4097 - trunk/src/target/opkg/libopkg ([EMAIL PROTECTED])
--- Begin Message ---
Author: werner
Date: 2008-02-21 09:37:05 +0100 (Thu, 21 Feb 2008)
New Revision: 4096
Modified:
branches/src/target/kernel/2.6.24.x/patches/s3c_mci.patch
Log:
http://moko.mwester.net/s3cmci_diff_from_svn4082.patch by Mike Westerhof
Changing the structure of the loops slightly: "while
((condition1) && fifo--)" is a bad idea if you need to ensure that fifo
doesn't go below zero when the loop exits (follow the code with the case
where we have an unaligned buffer, and need to read or write 1 byte).
s3c_mci.patch:
- drivers/mmc/host/s3cmci.c (do_pio_read, do_pio_write): don't decrement
"fifo" past zero
Modified: branches/src/target/kernel/2.6.24.x/patches/s3c_mci.patch
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/s3c_mci.patch 2008-02-21
06:50:13 UTC (rev 4095)
+++ branches/src/target/kernel/2.6.24.x/patches/s3c_mci.patch 2008-02-21
08:37:05 UTC (rev 4096)
@@ -89,7 +89,7 @@
===================================================================
--- /dev/null
+++ linux-2.6.24/drivers/mmc/host/s3cmci.c
-@@ -0,0 +1,1411 @@
+@@ -0,0 +1,1419 @@
+/*
+ * linux/drivers/mmc/s3cmci.h - Samsung S3C MCI driver
+ *
@@ -343,8 +343,10 @@
+ host->pio_count += fifo;
+
+ /* we might have an unaligned start of data */
-+ while (((unsigned long)host->pio_ptr & 0x03) && fifo--)
++ while (((unsigned long)host->pio_ptr & 0x03) && fifo) {
+ *(host->pio_ptr++) = readb(host->base +
host->sdidata_b);
++ fifo--;
++ }
+
+ /* and a major chunk of data in the middle */
+ for (; fifo >= 4; fifo -=4) {
@@ -353,8 +355,10 @@
+ }
+
+ /* as well as some non-modulo-four trailer */
-+ while (fifo)
++ while (fifo) {
+ *(host->pio_ptr++) = readb(host->base +
host->sdidata_b);
++ fifo--;
++ }
+ }
+
+ if (!host->pio_bytes) {
@@ -407,8 +411,10 @@
+ host->pio_count += fifo;
+
+ /* we might have an unaligned start of data */
-+ while ((unsigned long)host->pio_ptr & 0x03)
++ while (((unsigned long)host->pio_ptr & 0x03) && fifo) {
+ writeb(*(host->pio_ptr++), host->base +
host->sdidata_b);
++ fifo--;
++ }
+
+ /* and a major chunk of data in the middle */
+ for (; fifo >= 4; fifo -=4) {
@@ -417,8 +423,10 @@
+ }
+
+ /* as well as some non-modulo-four trailer */
-+ while (fifo--)
++ while (fifo) {
+ writeb(*(host->pio_ptr++), host->base +
host->sdidata_b);
++ fifo--;
++ }
+ }
+
+ enable_imask(host, S3C2410_SDIIMSK_TXFIFOHALF);
@@ -1579,7 +1587,7 @@
===================================================================
--- linux-2.6.24.orig/drivers/mmc/host/Kconfig
+++ linux-2.6.24/drivers/mmc/host/Kconfig
-@@ -130,3 +130,14 @@
+@@ -130,3 +130,14 @@ config MMC_SPI
If unsure, or if your system has no SPI master driver, say N.
@@ -1598,7 +1606,7 @@
===================================================================
--- linux-2.6.24.orig/drivers/mmc/host/Makefile
+++ linux-2.6.24/drivers/mmc/host/Makefile
-@@ -17,4 +17,4 @@
+@@ -17,4 +17,4 @@ obj-$(CONFIG_MMC_OMAP) += omap.o
obj-$(CONFIG_MMC_AT91) += at91_mci.o
obj-$(CONFIG_MMC_TIFM_SD) += tifm_sd.o
obj-$(CONFIG_MMC_SPI) += mmc_spi.o
@@ -1626,7 +1634,7 @@
===================================================================
--- linux-2.6.24.orig/arch/arm/mach-s3c2412/s3c2412.c
+++ linux-2.6.24/arch/arm/mach-s3c2412/s3c2412.c
-@@ -214,5 +214,8 @@
+@@ -214,5 +214,8 @@ int __init s3c2412_init(void)
{
printk("S3C2412: Initialising architecture\n");
@@ -1639,7 +1647,7 @@
===================================================================
--- linux-2.6.24.orig/arch/arm/mach-s3c2440/s3c2440.c
+++ linux-2.6.24/arch/arm/mach-s3c2440/s3c2440.c
-@@ -46,6 +46,9 @@
+@@ -46,6 +46,9 @@ int __init s3c2440_init(void)
s3c_device_wdt.resource[1].start = IRQ_S3C2440_WDT;
s3c_device_wdt.resource[1].end = IRQ_S3C2440_WDT;
@@ -1661,7 +1669,7 @@
static struct sys_device s3c2442_sysdev = {
.cls = &s3c2442_sysclass,
-@@ -30,5 +31,8 @@
+@@ -30,5 +31,8 @@ int __init s3c2442_init(void)
{
printk("S3C2442: Initialising architecture\n");
--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2008-02-21 11:28:30 +0100 (Thu, 21 Feb 2008)
New Revision: 4097
Modified:
trunk/src/target/opkg/libopkg/opkg_remove.c
Log:
opkg: implement removal of auto-installed packages
Modified: trunk/src/target/opkg/libopkg/opkg_remove.c
===================================================================
--- trunk/src/target/opkg/libopkg/opkg_remove.c 2008-02-21 08:37:05 UTC (rev
4096)
+++ trunk/src/target/opkg/libopkg/opkg_remove.c 2008-02-21 10:28:30 UTC (rev
4097)
@@ -161,6 +161,61 @@
return 0;
}
+static int remove_autoinstalled (opkg_conf_t *conf, pkg_t *pkg)
+{
+ /*
+ * find and remove packages that were autoinstalled and are orphaned by the
removal of pkg
+ */
+
+ char *buffer, *d_str;
+ int i;
+
+ for (i = 0; i < pkg->depends_count; ++i)
+ {
+ int x = 0;
+ pkg_t *p;
+ d_str = pkg->depends_str[i];
+ buffer = malloc (strlen (d_str) + 1);
+ if (!buffer)
+ {
+ fprintf(stderr,"%s Unable to allocate memory.\n", __FUNCTION__);
+ return -1;
+ }
+
+ while (d_str[x] != '\0' && d_str[x] != ' ')
+ {
+ buffer[x] = d_str[x];
+ ++x;
+ }
+ buffer[x] = '\0';
+ buffer = realloc (buffer, strlen (buffer) + 1);
+ p = pkg_hash_fetch_installed_by_name (&conf->pkg_hash, buffer);
+
+ /* if the package is not installed, this could have been a circular
+ * depenancy and the package has already been removed */
+ if (!p)
+ return -1;
+
+ if (p->auto_installed)
+ {
+ int deps;
+ abstract_pkg_t **dependents;
+
+ deps = pkg_has_installed_dependents(conf, NULL, p, &dependents);
+ if (deps == 0)
+ {
+ printf ("%s was autoinstalled but is now orphaned\n", buffer);
+ opkg_remove_pkg(conf, p,0);
+ }
+ else
+ printf ("%s was autoinstalled and is still required by %d installed
packages\n", buffer, deps);
+ }
+ free (buffer);
+ }
+
+ return 0;
+}
+
int opkg_remove_pkg(opkg_conf_t *conf, pkg_t *pkg,int message)
{
/* Actually, when "message == 1" I have been called from an upgrade, and not
from a normal remove
@@ -170,9 +225,6 @@
int err;
abstract_pkg_t *parent_pkg = NULL;
- if (conf->autoremove)
- printf ("autoremove is enabled, but not yet implemented\n");
-
if (pkg->essential && !message) {
if (conf->force_removal_of_essential_packages) {
fprintf(stderr, "WARNING: Removing essential package %s under
your coercion.\n"
@@ -252,6 +304,13 @@
if (parent_pkg)
parent_pkg->state_status = SS_NOT_INSTALLED;
+
+ /* remove autoinstalled packages that are orphaned by the removal of this
one */
+ if (conf->autoremove)
+ remove_autoinstalled (conf, pkg);
+
+
+
return 0;
}
--- End Message ---
_______________________________________________
commitlog mailing list
commitlog@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/commitlog