* of such prerequisites, and finally, extend the search to capture
* additional dependencies common to the containing package group.
*/
+ pkgSpecs *refdata = NULL;
+ pkgXmlNode *refpkg = package;
+
while( package != NULL )
{
/* We have a valid XML entity, which may identify dependencies;
*/
pkgXmlNode *installed = NULL;
+ /* To facilitate resolution of "%" version matching wildcards
+ * in the requirements specification, we need to parse the version
+ * specification for the current dependent package...
+ */
+ if( refdata == NULL )
+ {
+ /* ...but we deferred that until we knew for sure that it would
+ * be needed; it is, so parse it now.
+ */
+ const char *refname;
+ if( (refname = refpkg->GetPropVal( tarname_key, NULL )) != NULL )
+ refdata = new pkgSpecs( refname );
+ }
+
/* Identify the prerequisite package, from its canonical name...
*/
pkgActionItem wanted; pkgXmlNode *selected;
- pkgSpecs req( wanted.SetRequirements( dep ) );
+ pkgSpecs req( wanted.SetRequirements( dep, refdata ) );
/*
* (Both the package name, and subsystem if specified, must match)...
*/
*/
package = package->GetParent();
}
+ delete refdata;
}
void pkgXmlDocument::Schedule( unsigned long action, const char* name )