diff options
author | jbj <devnull@localhost> | 2002-06-04 15:06:36 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2002-06-04 15:06:36 +0000 |
commit | 9d880e91429b66f64f4d162a7b50ef5c4c5ac7f3 (patch) | |
tree | ea4413d1fff8fa55fa56bed9cbd4c3b104ed1cc5 /xmlspec/XMLRequires.cpp | |
parent | bf7fc63baa6fe063bc159011e796d88117723bcd (diff) | |
download | librpm-tizen-9d880e91429b66f64f4d162a7b50ef5c4c5ac7f3.tar.gz librpm-tizen-9d880e91429b66f64f4d162a7b50ef5c4c5ac7f3.tar.bz2 librpm-tizen-9d880e91429b66f64f4d162a7b50ef5c4c5ac7f3.zip |
Update from "Jaco Greeff" <jaco@puxedo.org>.
CVS patchset: 5462
CVS date: 2002/06/04 15:06:36
Diffstat (limited to 'xmlspec/XMLRequires.cpp')
-rw-r--r-- | xmlspec/XMLRequires.cpp | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/xmlspec/XMLRequires.cpp b/xmlspec/XMLRequires.cpp index 3840c8ca5..8c6893e9d 100644 --- a/xmlspec/XMLRequires.cpp +++ b/xmlspec/XMLRequires.cpp @@ -2,17 +2,21 @@ #include "XMLAttrs.h" #include "XMLPackage.h" #include "XMLRequires.h" +#include "XMLRPMWrap.h" #include "XMLSpec.h" +// rpm includes +#include <rpmlib.h> + using namespace std; // attribute structure for XMLPackageEntry structValidAttrs g_paEntryAttrs[] = { - {0x0000, true, false, "name"}, - {0x0001, false, false, "version"}, - {0x0002, false, false, "cmp"}, - {XATTR_END, false, false, "end"} + {0x0000, true, false, "name", XATTRTYPE_STRING, {"*", NULL}}, + {0x0001, false, false, "version", XATTRTYPE_STRING, {"*", NULL}}, + {0x0002, false, false, "cmp", XATTRTYPE_STRING, {"*", NULL}}, + {XATTR_END, false, false, "end", XATTRTYPE_NONE, {NULL}} }; bool XMLPackageEntry::parseCreate(XMLAttrs* pAttrs, @@ -23,9 +27,8 @@ bool XMLPackageEntry::parseCreate(XMLAttrs* pAttrs, return false; // create and return - XMLPackageEntry entry(pAttrs->get("name"), - pAttrs->get("version"), - pAttrs->get("cmp")); + XMLPackageEntry entry(pAttrs->asString("name"), pAttrs->asString("version"), + pAttrs->asString("cmp")); rContainer.addEntry(entry); return true; } @@ -175,3 +178,12 @@ bool XMLPackageContainer::addObsolete(XMLAttrs* pAttrs, return false; return XMLPackageEntry::parseCreate(pAttrs, pSpec->lastPackage().getObsoletes()); } + +bool XMLPackageContainer::structCreate(PackageStruct* pPackage, + Spec pSpec, + XMLSpec* pXSpec) +{ + if (!pXSpec || !pPackage || !pPackage->header) + return false; + return true; +} |