# HG changeset patch # User Kristian H?gsberg # Date 1191123035 14400 # Node ID aedfc8f9522745fc7b9b74c98b82a53b421850cf # Parent 7eea400e19db399070acb2e0b1c58c24b7d5b62b Get version flags for requires in rpmdb importer. diff -r 7eea400e19db -r aedfc8f95227 import.c --- a/import.c Sat Sep 29 19:25:38 2007 -0400 +++ b/import.c Sat Sep 29 23:30:35 2007 -0400 @@ -283,6 +283,7 @@ void *p; char *string; char **list; + unsigned int *flags; }; struct razor_set * @@ -292,7 +293,8 @@ rpmdbMatchIterator iter; Header h; int_32 type, count, i; - union rpm_entry name, version, release, properties, property_versions; + union rpm_entry name, version, release; + union rpm_entry property_names, property_versions, property_flags; rpmdb db; rpmReadConfigFiles(NULL, NULL); @@ -307,27 +309,29 @@ iter = rpmdbInitIterator(db, 0, NULL, 0); while (h = rpmdbNextIterator(iter), h != NULL) { headerGetEntry(h, RPMTAG_NAME, &type, &name.p, &count); - headerGetEntry(h, RPMTAG_VERSION, &type,&version.p, &count); + headerGetEntry(h, RPMTAG_VERSION, &type, &version.p, &count); headerGetEntry(h, RPMTAG_RELEASE, &type, &release.p, &count); razor_importer_begin_package(importer, name.string, version.string); - headerGetEntry(h, RPMTAG_REQUIRES, &type, - &properties.p, &count); + headerGetEntry(h, RPMTAG_REQUIRENAME, &type, + &property_names.p, &count); headerGetEntry(h, RPMTAG_REQUIREVERSION, &type, &property_versions.p, &count); + headerGetEntry(h, RPMTAG_REQUIREFLAGS, &type, + &property_flags.p, &count); for (i = 0; i < count; i++) razor_importer_add_requires(importer, - properties.list[i], + property_names.list[i], property_versions.list[i]); - headerGetEntry(h, RPMTAG_PROVIDES, &type, - &properties.p, &count); + headerGetEntry(h, RPMTAG_PROVIDENAME, &type, + &property_names.p, &count); headerGetEntry(h, RPMTAG_PROVIDEVERSION, &type, &property_versions.p, &count); for (i = 0; i < count; i++) razor_importer_add_provides(importer, - properties.list[i], + property_names.list[i], property_versions.list[i]); razor_importer_finish_package(importer);