r4416 - in trunk/src/target/opkg: . libopkg
thomas at docs.openmoko.org
thomas at docs.openmoko.org
Thu May 8 13:37:05 CEST 2008
Author: thomas
Date: 2008-05-08 13:37:04 +0200 (Thu, 08 May 2008)
New Revision: 4416
Modified:
trunk/src/target/opkg/configure.ac
trunk/src/target/opkg/libopkg/opkg.c
trunk/src/target/opkg/libopkg/opkg.h
Log:
opkg: add more attributes to opkg_package_t
Modified: trunk/src/target/opkg/configure.ac
===================================================================
--- trunk/src/target/opkg/configure.ac 2008-05-08 08:25:20 UTC (rev 4415)
+++ trunk/src/target/opkg/configure.ac 2008-05-08 11:37:04 UTC (rev 4416)
@@ -1,6 +1,6 @@
# Process this file with autoconf to produce a configure script
AC_INIT(libopkg/libopkg.c)
-AM_INIT_AUTOMAKE([opkg], [0.1.1])
+AM_INIT_AUTOMAKE([opkg], [0.1.2])
AM_CONFIG_HEADER(libopkg/config.h)
AC_CANONICAL_HOST
Modified: trunk/src/target/opkg/libopkg/opkg.c
===================================================================
--- trunk/src/target/opkg/libopkg/opkg.c 2008-05-08 08:25:20 UTC (rev 4415)
+++ trunk/src/target/opkg/libopkg/opkg.c 2008-05-08 11:37:04 UTC (rev 4416)
@@ -45,7 +45,7 @@
__FILE__, __LINE__, __PRETTY_FUNCTION__, # expr); abort (); }
#define progress(d, p) d.percentage = p; if (progress_callback) progress_callback (opkg, &d, user_data);
-#define OLD_PKG_TO_NEW(pkg) opkg_package_new_with_values (pkg->name, pkg->version, pkg->architecture, pkg->description, pkg->tags, (pkg->state_status == SS_INSTALLED));
+#define OLD_PKG_TO_NEW(pkg) opkg_package_new_with_values (pkg->name, pkg->version, pkg->architecture, pkg->description, pkg->tags, pkg->url, (pkg->size ? atoi (pkg->size) : 0), (pkg->state_status == SS_INSTALLED));
/** Private Functions ***/
@@ -145,7 +145,7 @@
opkg_package_t *
opkg_package_new_with_values (const char *name, const char *version,
- const char *arch, const char *desc, const char *tags, int installed)
+ const char *arch, const char *desc, const char *tags, const char *url, int size, int installed)
{
opkg_package_t *package;
package = opkg_package_new ();
@@ -157,6 +157,9 @@
package->architecture = sstrdup (arch);
package->description = sstrdup (desc);
package->tags = sstrdup (tags);
+ package->url = sstrdup (url);
+
+ package->size = size;
package->installed = (installed != 0);
return package;
@@ -170,6 +173,7 @@
free (p->architecture);
free (p->description);
free (p->tags);
+ free (p->url);
free (p);
}
Modified: trunk/src/target/opkg/libopkg/opkg.h
===================================================================
--- trunk/src/target/opkg/libopkg/opkg.h 2008-05-08 08:25:20 UTC (rev 4415)
+++ trunk/src/target/opkg/libopkg/opkg.h 2008-05-08 11:37:04 UTC (rev 4416)
@@ -37,6 +37,8 @@
char *repository;
char *description;
char *tags;
+ char *url;
+ int size;
int installed;
};
@@ -48,7 +50,7 @@
};
opkg_package_t* opkg_package_new ();
-opkg_package_t* opkg_package_new_with_values (const char *name, const char *version, const char *arch, const char *desc, const char *tags, int installed);
+opkg_package_t* opkg_package_new_with_values (const char *name, const char *version, const char *arch, const char *desc, const char *tags, const char *url, int size, int installed);
void opkg_package_free (opkg_package_t *package);
opkg_t* opkg_new ();
More information about the commitlog
mailing list