Mailinglist Archive: opensuse-commit (1082 mails)
| < Previous | Next > |
commit yum-metadata-parser
- From: root@xxxxxxxxxxxxxxx (h_root)
- Date: Thu, 03 May 2007 23:42:00 +0200
- Message-id: <20070503214201.4E0AB678168@xxxxxxxxxxxxxxx>
Hello community,
here is the log from the commit of package yum-metadata-parser
checked in at Thu May 3 23:42:00 CEST 2007.
--------
--- yum-metadata-parser/yum-metadata-parser.changes 2007-04-06 11:42:08.000000000 +0200
+++ /mounts/work_src_done/STABLE/yum-metadata-parser/yum-metadata-parser.changes 2007-05-03 13:42:36.542075000 +0200
@@ -1,0 +2,11 @@
+Thu May 3 13:40:23 CEST 2007 - cthiel@xxxxxxx
+
+- update to version 1.1.0
+ * setup.py, yum-metadata-parser.spec: bump version to 1.1.0 b/c of the
+ dbversion change
+ * db.c, db.h, package.h, xml-parser.c: Bump database version to 10 build_*
+ and time_* values are stored as ints, rather than text, and
+ checksum_value has been dropped, as this is the same value as pkgId.
+ * xml-parser.c: Reduce some code duplication in xml-parser
+
+-------------------------------------------------------------------
Old:
----
yum-metadata-parser-1.0.4.tar.bz2
New:
----
yum-metadata-parser-1.1.0.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yum-metadata-parser.spec ++++++
--- /var/tmp/diff_new_pack.cz1543/_old 2007-05-03 23:41:39.000000000 +0200
+++ /var/tmp/diff_new_pack.cz1543/_new 2007-05-03 23:41:39.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yum-metadata-parser (Version 1.0.4)
+# spec file for package yum-metadata-parser (Version 1.1.0)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -13,7 +13,7 @@
Name: yum-metadata-parser
BuildRequires: glib2-devel libxml2-devel pkgconfig python-devel sqlite-devel
Summary: A fast metadata parser for yum
-Version: 1.0.4
+Version: 1.1.0
Release: 1
Source: %{name}-%{version}.tar.bz2
Patch: %{name}-1.0-quiet.patch
@@ -56,6 +56,14 @@
%{py_sitedir}/*
%changelog
+* Thu May 03 2007 - cthiel@xxxxxxx
+- update to version 1.1.0
+ * setup.py, yum-metadata-parser.spec: bump version to 1.1.0 b/c of the
+ dbversion change
+ * db.c, db.h, package.h, xml-parser.c: Bump database version to 10 build_*
+ and time_* values are stored as ints, rather than text, and
+ checksum_value has been dropped, as this is the same value as pkgId.
+ * xml-parser.c: Reduce some code duplication in xml-parser
* Fri Apr 06 2007 - cthiel@xxxxxxx
- update to version 1.0.4
* db.c: Create a pkgKey index for provides, requires, conflicts, and
++++++ yum-metadata-parser-1.0.4.tar.bz2 -> yum-metadata-parser-1.1.0.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-metadata-parser-1.0.4/ChangeLog new/yum-metadata-parser-1.1.0/ChangeLog
--- old/yum-metadata-parser-1.0.4/ChangeLog 2007-04-04 06:10:02.000000000 +0200
+++ new/yum-metadata-parser-1.1.0/ChangeLog 2007-04-27 15:42:16.000000000 +0200
@@ -1,3 +1,24 @@
+2007-04-27 09:30 skvidal
+
+ * setup.py, yum-metadata-parser.spec:
+ bump version to 1.1.0 b/c of the dbversion change
+
+2007-04-10 18:30 jbowes
+
+ * db.c, db.h, package.h, xml-parser.c: Bump database version to 10
+
+ build_* and time_* values are stored as ints, rather than text, and
+ checksum_value has been dropped, as this is the same value as
+ pkgId.
+
+2007-04-07 19:52 jbowes
+
+ * xml-parser.c: Reduce some code duplication in xml-parser
+
+2007-04-04 00:07 skvidal
+
+ * ChangeLog: merge changelog
+
2007-04-04 00:07 skvidal
* setup.py, yum-metadata-parser.spec:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-metadata-parser-1.0.4/db.c new/yum-metadata-parser-1.1.0/db.c
--- old/yum-metadata-parser-1.0.4/db.c 2007-04-04 06:08:35.000000000 +0200
+++ new/yum-metadata-parser-1.1.0/db.c 2007-04-11 07:20:10.000000000 +0200
@@ -163,7 +163,7 @@
int rc;
const char *sql;
- sql = "CREATE TABLE db_info (dbversion TEXT, checksum TEXT)";
+ sql = "CREATE TABLE db_info (dbversion INTEGER, checksum TEXT)";
rc = sqlite3_exec (db, sql, NULL, NULL, NULL);
if (rc != SQLITE_OK) {
g_set_error (err, YUM_DB_ERROR, YUM_DB_ERROR,
@@ -324,23 +324,22 @@
" summary TEXT,"
" description TEXT,"
" url TEXT,"
- " time_file TEXT,"
- " time_build TEXT,"
+ " time_file INTEGER,"
+ " time_build INTEGER,"
" rpm_license TEXT,"
" rpm_vendor TEXT,"
" rpm_group TEXT,"
" rpm_buildhost TEXT,"
" rpm_sourcerpm TEXT,"
- " rpm_header_start TEXT,"
- " rpm_header_end TEXT,"
+ " rpm_header_start INTEGER,"
+ " rpm_header_end INTEGER,"
" rpm_packager TEXT,"
- " size_package TEXT,"
- " size_installed TEXT,"
- " size_archive TEXT,"
+ " size_package INTEGER,"
+ " size_installed INTEGER,"
+ " size_archive INTEGER,"
" location_href TEXT,"
" location_base TEXT,"
- " checksum_type TEXT,"
- " checksum_value TEXT)";
+ " checksum_type TEXT)";
rc = sqlite3_exec (db, sql, NULL, NULL, NULL);
if (rc != SQLITE_OK) {
@@ -372,7 +371,7 @@
"CREATE TABLE files ("
" name TEXT,"
" type TEXT,"
- " pkgKey TEXT)";
+ " pkgKey INTEGER)";
rc = sqlite3_exec (db, sql, NULL, NULL, NULL);
if (rc != SQLITE_OK) {
g_set_error (err, YUM_DB_ERROR, YUM_DB_ERROR,
@@ -388,7 +387,7 @@
" epoch TEXT,"
" version TEXT,"
" release TEXT,"
- " pkgKey TEXT %s)";
+ " pkgKey INTEGER %s)";
const char *deps[] = { "requires", "provides", "conflicts", "obsoletes", NULL };
int i;
@@ -468,9 +467,9 @@
" url, time_file, time_build, rpm_license, rpm_vendor, rpm_group,"
" rpm_buildhost, rpm_sourcerpm, rpm_header_start, rpm_header_end,"
" rpm_packager, size_package, size_installed, size_archive,"
- " location_href, location_base, checksum_type, checksum_value) "
+ " location_href, location_base, checksum_type) "
"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,"
- " ?, ?, ?, ?, ?, ?, ?, ?)";
+ " ?, ?, ?, ?, ?, ?, ?)";
rc = sqlite3_prepare (db, query, -1, &handle, NULL);
if (rc != SQLITE_OK) {
@@ -498,23 +497,22 @@
sqlite3_bind_text (handle, 7, p->summary, -1, SQLITE_STATIC);
sqlite3_bind_text (handle, 8, p->description, -1, SQLITE_STATIC);
sqlite3_bind_text (handle, 9, p->url, -1, SQLITE_STATIC);
- sqlite3_bind_text (handle, 10, p->time_file, -1, SQLITE_STATIC);
- sqlite3_bind_text (handle, 11, p->time_build, -1, SQLITE_STATIC);
+ sqlite3_bind_int (handle, 10, p->time_file);
+ sqlite3_bind_int (handle, 11, p->time_build);
sqlite3_bind_text (handle, 12, p->rpm_license, -1, SQLITE_STATIC);
sqlite3_bind_text (handle, 13, p->rpm_vendor, -1, SQLITE_STATIC);
sqlite3_bind_text (handle, 14, p->rpm_group, -1, SQLITE_STATIC);
sqlite3_bind_text (handle, 15, p->rpm_buildhost, -1, SQLITE_STATIC);
sqlite3_bind_text (handle, 16, p->rpm_sourcerpm, -1, SQLITE_STATIC);
- sqlite3_bind_text (handle, 17, p->rpm_header_start, -1, SQLITE_STATIC);
- sqlite3_bind_text (handle, 18, p->rpm_header_end, -1, SQLITE_STATIC);
+ sqlite3_bind_int (handle, 17, p->rpm_header_start);
+ sqlite3_bind_int (handle, 18, p->rpm_header_end);
sqlite3_bind_text (handle, 19, p->rpm_packager, -1, SQLITE_STATIC);
- sqlite3_bind_text (handle, 20, p->size_package, -1, SQLITE_STATIC);
- sqlite3_bind_text (handle, 21, p->size_installed, -1, SQLITE_STATIC);
- sqlite3_bind_text (handle, 22, p->size_archive, -1, SQLITE_STATIC);
+ sqlite3_bind_int (handle, 20, p->size_package);
+ sqlite3_bind_int (handle, 21, p->size_installed);
+ sqlite3_bind_int (handle, 22, p->size_archive);
sqlite3_bind_text (handle, 23, p->location_href, -1, SQLITE_STATIC);
sqlite3_bind_text (handle, 24, p->location_base, -1, SQLITE_STATIC);
sqlite3_bind_text (handle, 25, p->checksum_type, -1, SQLITE_STATIC);
- sqlite3_bind_text (handle, 26, p->checksum_value, -1, SQLITE_STATIC);
rc = sqlite3_step (handle);
sqlite3_reset (handle);
@@ -822,7 +820,7 @@
"CREATE TABLE changelog ("
" pkgKey INTEGER,"
" author TEXT,"
- " date TEXT,"
+ " date INTEGER,"
" changelog TEXT)";
rc = sqlite3_exec (db, sql, NULL, NULL, NULL);
if (rc != SQLITE_OK) {
@@ -900,7 +898,7 @@
sqlite3_bind_int (handle, 1, p->pkgKey);
sqlite3_bind_text (handle, 2, entry->author, -1, SQLITE_STATIC);
- sqlite3_bind_text (handle, 3, entry->date, -1, SQLITE_STATIC);
+ sqlite3_bind_int (handle, 3, entry->date);
sqlite3_bind_text (handle, 4, entry->changelog, -1, SQLITE_STATIC);
rc = sqlite3_step (handle);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-metadata-parser-1.0.4/db.h new/yum-metadata-parser-1.1.0/db.h
--- old/yum-metadata-parser-1.0.4/db.h 2007-03-13 15:43:57.000000000 +0100
+++ new/yum-metadata-parser-1.1.0/db.h 2007-04-11 07:20:10.000000000 +0200
@@ -22,7 +22,7 @@
#include <sqlite3.h>
#include "package.h"
-#define YUM_SQLITE_CACHE_DBVERSION 9
+#define YUM_SQLITE_CACHE_DBVERSION 10
#define YUM_DB_ERROR yum_db_error_quark()
GQuark yum_db_error_quark (void);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-metadata-parser-1.0.4/package.h new/yum-metadata-parser-1.1.0/package.h
--- old/yum-metadata-parser-1.0.4/package.h 2007-03-13 15:43:57.000000000 +0100
+++ new/yum-metadata-parser-1.1.0/package.h 2007-04-11 07:20:10.000000000 +0200
@@ -36,7 +36,7 @@
typedef struct {
char *author;
- char *date;
+ gint64 date;
char *changelog;
} ChangelogEntry;
@@ -51,23 +51,22 @@
char *summary;
char *description;
char *url;
- char *time_file;
- char *time_build;
+ gint64 time_file;
+ gint64 time_build;
char *rpm_license;
char *rpm_vendor;
char *rpm_group;
char *rpm_buildhost;
char *rpm_sourcerpm;
- char *rpm_header_start;
- char *rpm_header_end;
+ gint64 rpm_header_start;
+ gint64 rpm_header_end;
char *rpm_packager;
- char *size_package;
- char *size_installed;
- char *size_archive;
+ gint64 size_package;
+ gint64 size_installed;
+ gint64 size_archive;
char *location_href;
char *location_base;
char *checksum_type;
- char *checksum_value;
GSList *requires;
GSList *provides;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-metadata-parser-1.0.4/PKG-INFO new/yum-metadata-parser-1.1.0/PKG-INFO
--- old/yum-metadata-parser-1.0.4/PKG-INFO 2007-04-04 06:12:53.000000000 +0200
+++ new/yum-metadata-parser-1.1.0/PKG-INFO 2007-04-27 15:42:42.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: yum-metadata-parser
-Version: 1.0.4
+Version: 1.1.0
Summary: A fast YUM meta-data parser
Home-page: UNKNOWN
Author: UNKNOWN
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-metadata-parser-1.0.4/setup.py new/yum-metadata-parser-1.1.0/setup.py
--- old/yum-metadata-parser-1.0.4/setup.py 2007-04-04 06:08:51.000000000 +0200
+++ new/yum-metadata-parser-1.1.0/setup.py 2007-04-27 15:31:36.000000000 +0200
@@ -23,7 +23,7 @@
'sqlitecache.c'])
setup (name = 'yum-metadata-parser',
- version = '1.0.4',
+ version = '1.1.0',
description = 'A fast YUM meta-data parser',
py_modules = ['sqlitecachec'],
ext_modules = [module])
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-metadata-parser-1.0.4/xml-parser.c new/yum-metadata-parser-1.1.0/xml-parser.c
--- old/yum-metadata-parser-1.0.4/xml-parser.c 2007-03-13 15:43:57.000000000 +0100
+++ new/yum-metadata-parser-1.1.0/xml-parser.c 2007-04-11 07:20:10.000000000 +0200
@@ -105,6 +105,26 @@
}
static void
+parse_version_info(const char **attrs, Package *p)
+{
+ int i;
+ const char *attr;
+ const char *value;
+
+ for (i = 0; attrs && attrs[i]; i++) {
+ attr = attrs[i];
+ value = attrs[++i];
+
+ if (!strcmp (attr, "epoch"))
+ p->epoch = g_string_chunk_insert (p->chunk, value);
+ else if (!strcmp (attr, "ver"))
+ p->version = g_string_chunk_insert (p->chunk, value);
+ else if (!strcmp (attr, "rel"))
+ p->release = g_string_chunk_insert (p->chunk, value);
+ }
+}
+
+static void
primary_parser_package_start (PrimarySAXContext *ctx,
const char *name,
const char **attrs)
@@ -123,17 +143,7 @@
}
else if (!strcmp (name, "version")) {
- for (i = 0; attrs && attrs[i]; i++) {
- attr = attrs[i];
- value = attrs[++i];
-
- if (!strcmp (attr, "epoch"))
- p->epoch = g_string_chunk_insert (p->chunk, value);
- else if (!strcmp (attr, "ver"))
- p->version = g_string_chunk_insert (p->chunk, value);
- else if (!strcmp (attr, "rel"))
- p->release = g_string_chunk_insert (p->chunk, value);
- }
+ parse_version_info(attrs, p);
}
else if (!strcmp (name, "checksum")) {
@@ -152,9 +162,9 @@
value = attrs[++i];
if (!strcmp (attr, "file"))
- p->time_file = g_string_chunk_insert (p->chunk, value);
+ p->time_file = strtol(value, NULL, 10);
else if (!strcmp (attr, "build"))
- p->time_build = g_string_chunk_insert (p->chunk, value);
+ p->time_build = strtol(value, NULL, 10);
}
}
@@ -164,11 +174,11 @@
value = attrs[++i];
if (!strcmp (attr, "package"))
- p->size_package = g_string_chunk_insert (p->chunk, value);
+ p->size_package = strtol(value, NULL, 10);
else if (!strcmp (attr, "installed"))
- p->size_installed = g_string_chunk_insert (p->chunk, value);
+ p->size_installed = strtol(value, NULL, 10);
else if (!strcmp (attr, "archive"))
- p->size_archive = g_string_chunk_insert (p->chunk, value);
+ p->size_archive = strtol(value, NULL, 10);
}
}
@@ -203,9 +213,9 @@
value = attrs[++i];
if (!strcmp (attr, "start"))
- p->rpm_header_start = g_string_chunk_insert (p->chunk, value);
+ p->rpm_header_start = strtol(value, NULL, 10);
else if (!strcmp (attr, "end"))
- p->rpm_header_end = g_string_chunk_insert (p->chunk, value);
+ p->rpm_header_end = strtol(value, NULL, 10);
}
}
@@ -356,10 +366,9 @@
ctx->text_buffer->str,
ctx->text_buffer->len);
else if (!strcmp (name, "checksum"))
- p->checksum_value = p->pkgId =
- g_string_chunk_insert_len (p->chunk,
- ctx->text_buffer->str,
- ctx->text_buffer->len);
+ p->pkgId = g_string_chunk_insert_len (p->chunk,
+ ctx->text_buffer->str,
+ ctx->text_buffer->len);
else if (!strcmp (name, "summary"))
p->summary = g_string_chunk_insert_len (p->chunk,
ctx->text_buffer->str,
@@ -556,6 +565,26 @@
/*****************************************************************************/
+static void
+parse_package (const char **attrs, Package *p)
+{
+ int i;
+ const char *attr;
+ const char *value;
+
+ for (i = 0; attrs && attrs[i]; i++) {
+ attr = attrs[i];
+ value = attrs[++i];
+
+ if (!strcmp (attr, "pkgid"))
+ p->pkgId = g_string_chunk_insert (p->chunk, value);
+ if (!strcmp (attr, "name"))
+ p->name = g_string_chunk_insert (p->chunk, value);
+ else if (!strcmp (attr, "arch"))
+ p->arch = g_string_chunk_insert (p->chunk, value);
+ }
+}
+
typedef enum {
FILELIST_PARSER_TOPLEVEL = 0,
FILELIST_PARSER_PACKAGE,
@@ -582,28 +611,12 @@
const char **attrs)
{
if (!strcmp (name, "package")) {
- Package *p;
- int i;
- const char *attr;
- const char *value;
-
g_assert (ctx->current_package == NULL);
ctx->state = FILELIST_PARSER_PACKAGE;
- ctx->current_package = p = package_new ();
-
- for (i = 0; attrs && attrs[i]; i++) {
- attr = attrs[i];
- value = attrs[++i];
-
- if (!strcmp (attr, "pkgid"))
- p->pkgId = g_string_chunk_insert (p->chunk, value);
- if (!strcmp (attr, "name"))
- p->name = g_string_chunk_insert (p->chunk, value);
- else if (!strcmp (attr, "arch"))
- p->arch = g_string_chunk_insert (p->chunk, value);
- }
+ ctx->current_package = package_new ();
+ parse_package (attrs, ctx->current_package);
}
else if (ctx->count_fn && !strcmp (name, "filelists")) {
@@ -639,17 +652,7 @@
ctx->want_text = TRUE;
if (!strcmp (name, "version")) {
- for (i = 0; attrs && attrs[i]; i++) {
- attr = attrs[i];
- value = attrs[++i];
-
- if (!strcmp (attr, "epoch"))
- p->epoch = g_string_chunk_insert (p->chunk, value);
- else if (!strcmp (attr, "ver"))
- p->version = g_string_chunk_insert (p->chunk, value);
- else if (!strcmp (attr, "rel"))
- p->release = g_string_chunk_insert (p->chunk, value);
- }
+ parse_version_info(attrs, p);
}
else if (!strcmp (name, "file")) {
@@ -869,28 +872,12 @@
const char **attrs)
{
if (!strcmp (name, "package")) {
- Package *p;
- int i;
- const char *attr;
- const char *value;
-
g_assert (ctx->current_package == NULL);
ctx->state = OTHER_PARSER_PACKAGE;
- ctx->current_package = p = package_new ();
-
- for (i = 0; attrs && attrs[i]; i++) {
- attr = attrs[i];
- value = attrs[++i];
-
- if (!strcmp (attr, "pkgid"))
- p->pkgId = g_string_chunk_insert (p->chunk, value);
- if (!strcmp (attr, "name"))
- p->name = g_string_chunk_insert (p->chunk, value);
- else if (!strcmp (attr, "arch"))
- p->arch = g_string_chunk_insert (p->chunk, value);
- }
+ ctx->current_package = package_new ();
+ parse_package (attrs, ctx->current_package);
}
else if (ctx->count_fn && !strcmp (name, "otherdata")) {
@@ -926,17 +913,7 @@
ctx->want_text = TRUE;
if (!strcmp (name, "version")) {
- for (i = 0; attrs && attrs[i]; i++) {
- attr = attrs[i];
- value = attrs[++i];
-
- if (!strcmp (attr, "epoch"))
- p->epoch = g_string_chunk_insert (p->chunk, value);
- else if (!strcmp (attr, "ver"))
- p->version = g_string_chunk_insert (p->chunk, value);
- else if (!strcmp (attr, "rel"))
- p->release = g_string_chunk_insert (p->chunk, value);
- }
+ parse_version_info(attrs, p);
}
else if (!strcmp (name, "changelog")) {
@@ -950,8 +927,7 @@
ctx->current_entry->author =
g_string_chunk_insert_const (p->chunk, value);
else if (!strcmp (attr, "date"))
- ctx->current_entry->date =
- g_string_chunk_insert_const (p->chunk, value);
+ ctx->current_entry->date = strtol(value, NULL, 10);
}
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yum-metadata-parser-1.0.4/yum-metadata-parser.spec new/yum-metadata-parser-1.1.0/yum-metadata-parser.spec
--- old/yum-metadata-parser-1.0.4/yum-metadata-parser.spec 2007-04-04 06:09:31.000000000 +0200
+++ new/yum-metadata-parser-1.1.0/yum-metadata-parser.spec 2007-04-27 15:31:22.000000000 +0200
@@ -2,7 +2,7 @@
Summary: A fast metadata parser for yum
Name: yum-metadata-parser
-Version: 1.0.4
+Version: 1.1.0
Release: 1%{?dist}
Source0: %{name}-%{version}.tar.gz
License: GPL
@@ -40,6 +40,9 @@
%{python_sitelib_platform}/sqlitecachec.pyo
%changelog
+* Fri Apr 27 2007 Seth Vidal <skvidal at linux.duke.edu>
+- split out 1.1.0 for dbversion 10
+
* Wed Apr 4 2007 Seth Vidal <skvidal at linux.duke.edu>
- 1.0.4
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx
| < Previous | Next > |