Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 148052 Details for
Bug 228282
Pre requirements not added to Sqlite DB
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
adjusted patch to upstream coding style
yum-metadata-parser_pretags-2.diff (text/x-patch), 5.53 KB, created by
Florian Festi
on 2007-02-14 14:33:20 UTC
(
hide
)
Description:
adjusted patch to upstream coding style
Filename:
MIME Type:
Creator:
Florian Festi
Created:
2007-02-14 14:33:20 UTC
Size:
5.53 KB
patch
obsolete
>Index: db.c >=================================================================== >RCS file: /cvsroot/yum/cvs/yum-metadata-parser/db.c,v >retrieving revision 1.6 >diff -u -r1.6 db.c >--- db.c 10 Jul 2006 16:54:44 -0000 1.6 >+++ db.c 14 Feb 2007 13:59:00 -0000 >@@ -520,9 +520,17 @@ > sqlite3_stmt *handle = NULL; > char *query; > >+ const char *pre_name = ""; >+ const char *pre_value = ""; >+ >+ if (!strcmp (table, "requires")) { >+ pre_name = ", pre"; >+ pre_value = ", ?"; >+ } >+ > query = g_strdup_printf >- ("INSERT INTO %s (name, flags, epoch, version, release, pkgKey) " >- "VALUES (?, ?, ?, ?, ?, ?)", table); >+ ("INSERT INTO %s (name, flags, epoch, version, release, pkgKey%s) " >+ "VALUES (?, ?, ?, ?, ?, ?%s)", table, pre_name, pre_value); > > rc = sqlite3_prepare (db, query, -1, &handle, NULL); > g_free (query); >@@ -542,7 +550,8 @@ > yum_db_dependency_write (sqlite3 *db, > sqlite3_stmt *handle, > gint64 pkgKey, >- Dependency *dep) >+ Dependency *dep, >+ gboolean isRequirement) > { > int rc; > >@@ -553,6 +562,13 @@ > sqlite3_bind_text (handle, 5, dep->release, -1, SQLITE_STATIC); > sqlite3_bind_int (handle, 6, pkgKey); > >+ if (isRequirement) { >+ if (dep->pre) >+ sqlite3_bind_text (handle, 7, "TRUE", -1, SQLITE_TRANSIENT); >+ else >+ sqlite3_bind_text (handle, 7, "FALSE", -1, SQLITE_TRANSIENT); >+ } >+ > rc = sqlite3_step (handle); > sqlite3_reset (handle); > >Index: db.h >=================================================================== >RCS file: /cvsroot/yum/cvs/yum-metadata-parser/db.h,v >retrieving revision 1.3 >diff -u -r1.3 db.h >--- db.h 10 Jul 2006 16:54:44 -0000 1.3 >+++ db.h 14 Feb 2007 13:59:00 -0000 >@@ -55,7 +55,8 @@ > void yum_db_dependency_write (sqlite3 *db, > sqlite3_stmt *handle, > gint64 pkgKey, >- Dependency *dep); >+ Dependency *dep, >+ gboolean isRequirement); > > sqlite3_stmt *yum_db_file_prepare (sqlite3 *db, GError **err); > void yum_db_file_write (sqlite3 *db, >Index: package.h >=================================================================== >RCS file: /cvsroot/yum/cvs/yum-metadata-parser/package.h,v >retrieving revision 1.1.1.1 >diff -u -r1.1.1.1 package.h >--- package.h 11 May 2006 17:33:57 -0000 1.1.1.1 >+++ package.h 14 Feb 2007 13:59:00 -0000 >@@ -26,6 +26,7 @@ > char *epoch; > char *version; > char *release; >+ gboolean pre; > } Dependency; > > typedef struct { >Index: sqlitecache.c >=================================================================== >RCS file: /cvsroot/yum/cvs/yum-metadata-parser/sqlitecache.c,v >retrieving revision 1.8 >diff -u -r1.8 sqlitecache.c >--- sqlitecache.c 4 Jan 2007 18:20:51 -0000 1.8 >+++ sqlitecache.c 14 Feb 2007 13:59:00 -0000 >@@ -179,15 +179,29 @@ > } > > static void >-write_deps (sqlite3 *db, sqlite3_stmt *handle, gint64 pkgKey, GSList *deps) >+write_deps (sqlite3 *db, sqlite3_stmt *handle, gint64 pkgKey, >+ GSList *deps) > { > GSList *iter; > > for (iter = deps; iter; iter = iter->next) >- yum_db_dependency_write (db, handle, pkgKey, (Dependency *) iter->data); >+ yum_db_dependency_write (db, handle, pkgKey, (Dependency *) iter->data, >+ FALSE); > } > > static void >+write_requirements (sqlite3 *db, sqlite3_stmt *handle, gint64 pkgKey, >+ GSList *deps) >+{ >+ GSList *iter; >+ >+ for (iter = deps; iter; iter = iter->next) >+ yum_db_dependency_write (db, handle, pkgKey, (Dependency *) iter->data, >+ TRUE); >+} >+ >+ >+static void > write_files (sqlite3 *db, sqlite3_stmt *handle, Package *pkg) > { > GSList *iter; >@@ -204,8 +218,8 @@ > > yum_db_package_write (update_info->db, info->pkg_handle, package); > >- write_deps (update_info->db, info->requires_handle, >- package->pkgKey, package->requires); >+ write_requirements (update_info->db, info->requires_handle, >+ package->pkgKey, package->requires); > write_deps (update_info->db, info->provides_handle, > package->pkgKey, package->provides); > write_deps (update_info->db, info->conflicts_handle, >Index: xml-parser.c >=================================================================== >RCS file: /cvsroot/yum/cvs/yum-metadata-parser/xml-parser.c,v >retrieving revision 1.5 >diff -u -r1.5 xml-parser.c >--- xml-parser.c 15 Jun 2006 17:36:35 -0000 1.5 >+++ xml-parser.c 14 Feb 2007 13:59:00 -0000 >@@ -247,6 +247,7 @@ > const char *tmp_release = NULL; > const char *tmp_epoch = NULL; > const char *tmp_flags = NULL; >+ gboolean tmp_pre = FALSE; > Dependency *dep; > int i; > gboolean ignore = FALSE; >@@ -272,6 +273,8 @@ > tmp_version = value; > else if (!strcmp (attr, "rel")) > tmp_release = value; >+ else if (!strcmp (attr, "pre")) >+ tmp_pre = TRUE; > } > > if (!ignore) { >@@ -287,6 +290,7 @@ > dep->version = g_string_chunk_insert (chunk, tmp_version); > if (tmp_release) > dep->release = g_string_chunk_insert (chunk, tmp_release); >+ dep->pre = tmp_pre; > > *ctx->current_dep_list = g_slist_prepend (*ctx->current_dep_list, > dep);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 228282
:
147985
| 148052