The MinGW.org Installation Manager Tool
Révision | 69410fbd83c01c585518227314ff53c7d1c96222 (tree) |
---|---|
l'heure | 2013-10-18 13:20:14 |
Auteur | Keith Marshall <keithmarshall@user...> |
Commiter | Keith Marshall |
Don't attempt to resolve dependencies for unidentified packages.
@@ -1,5 +1,17 @@ | ||
1 | 1 | 2013-10-18 Keith Marshall <keithmarshall@users.sourceforge.net> |
2 | 2 | |
3 | + Don't attempt to resolve dependencies for unidentified packages. | |
4 | + | |
5 | + * src/pkgdeps.cpp (pkgXmlDocument::ResolveDependencies): | |
6 | + [selected == NULL]: Current dependency is unresolved; do not make any | |
7 | + recursive call for this unidentified requirement. This avoids posting | |
8 | + misleading "can't get 'tarname' for non-release element <<<unknown>>>" | |
9 | + diagnostic messages, where the subsequent "unresolved dependency" | |
10 | + message is sufficient; include dmhmsgs.h, and add... | |
11 | + (PKGMSG_SPECIFICATION_ERROR): ...this preamble instead. | |
12 | + | |
13 | +2013-10-18 Keith Marshall <keithmarshall@users.sourceforge.net> | |
14 | + | |
3 | 15 | Implement foundation for future NLS enabled diagnostics. |
4 | 16 | |
5 | 17 | * src/dmhmsgs.h: New file; it declares the NLS capable DMH interface. |
@@ -30,6 +30,7 @@ | ||
30 | 30 | #include <string.h> |
31 | 31 | |
32 | 32 | #include "dmh.h" |
33 | +#include "dmhmsgs.h" | |
33 | 34 | #include "debug.h" |
34 | 35 | |
35 | 36 | #include "pkginfo.h" |
@@ -501,10 +502,13 @@ pkgXmlDocument::ResolveDependencies( pkgXmlNode* package, pkgActionItem* rank ) | ||
501 | 502 | |
502 | 503 | /* Regardless of the action scheduled, we must recursively |
503 | 504 | * consider further dependencies of the resolved prerequisite; |
505 | + * (but note that attempting to do this would be pointless if | |
506 | + * the prerequisite package could not be identified). | |
507 | + * | |
504 | 508 | * FIXME: do we need to do this, when performing a removal? |
505 | 509 | * Right now, I (KDM) don't think so... |
506 | 510 | */ |
507 | - if( (request & ACTION_INSTALL) != 0 ) | |
511 | + if( (selected != NULL) && ((request & ACTION_INSTALL) != 0) ) | |
508 | 512 | ResolveDependencies( selected, rank ); |
509 | 513 | } |
510 | 514 |
@@ -518,6 +522,7 @@ pkgXmlDocument::ResolveDependencies( pkgXmlNode* package, pkgActionItem* rank ) | ||
518 | 522 | const char *requestor = refpkg->GetPropVal( tarname_key, value_unknown ); |
519 | 523 | |
520 | 524 | dmh_control( DMH_BEGIN_DIGEST ); |
525 | + dmh_notify( DMH_ERROR, PKGMSG_SPECIFICATION_ERROR ); | |
521 | 526 | dmh_notify( DMH_ERROR, "%s: requires...\n", requestor ); |
522 | 527 | for( int i = 0; i < sizeof( key ) / sizeof( char* ); i++ ) |
523 | 528 | if( (ref = dep->GetPropVal( key[i], NULL )) != NULL ) |