The MinGW.OSDN Installation Manager Tool
Revision | b6cf428474c310b6315e862084c6c338cad6fee1 (tree) |
---|---|
Zeit | 2012-12-15 00:55:18 |
Autor | Keith Marshall <keithmarshall@user...> |
Commiter | Keith Marshall |
Implement some additional permanent debugging support.
@@ -1,5 +1,15 @@ | ||
1 | 1 | 2012-12-14 Keith Marshall <keithmarshall@users.sourceforge.net> |
2 | 2 | |
3 | + Implement some additional permanent debugging support. | |
4 | + | |
5 | + * src/pkgdeps.cpp (pkgXmlDocument::ResolveDependencies): | |
6 | + [DEBUG_TRACE_DEPENDENCIES]: Enable DMH digest mode for messages. | |
7 | + | |
8 | + * src/tarproc.cpp (pkgTarArchiveInstaller::ProcessDataStream): | |
9 | + [DEBUG_TRACE_TRANSACTIONS]: Add logging of installed file path names. | |
10 | + | |
11 | +2012-12-14 Keith Marshall <keithmarshall@users.sourceforge.net> | |
12 | + | |
3 | 13 | Insert a missing snprintf format effector. |
4 | 14 | |
5 | 15 | * src/pkgnget.cpp (pkgDownloadMeterGUI::Update): Add omitted '%' |
@@ -281,6 +281,13 @@ pkgXmlDocument::ResolveDependencies( pkgXmlNode* package, pkgActionItem* rank ) | ||
281 | 281 | |
282 | 282 | while( package != NULL ) |
283 | 283 | { |
284 | + /* Collect any debugging messages, relating to this dependency, | |
285 | + * into a single message digest. | |
286 | + */ | |
287 | + DEBUG_INVOKE_IF( DEBUG_REQUEST( DEBUG_TRACE_DEPENDENCIES ), | |
288 | + dmh_control( DMH_BEGIN_DIGEST ) | |
289 | + ); | |
290 | + | |
284 | 291 | /* We have a valid XML entity, which may identify dependencies; |
285 | 292 | * check if it includes any "requires" specification... |
286 | 293 | */ |
@@ -527,6 +534,14 @@ pkgXmlDocument::ResolveDependencies( pkgXmlNode* package, pkgActionItem* rank ) | ||
527 | 534 | */ |
528 | 535 | dep = dep->FindNextAssociate( requires_key ); |
529 | 536 | } |
537 | + | |
538 | + /* Flush out any digest of debugging messages, which may | |
539 | + * have been collected, in respect of this dependency. | |
540 | + */ | |
541 | + DEBUG_INVOKE_IF( DEBUG_REQUEST( DEBUG_TRACE_DEPENDENCIES ), | |
542 | + dmh_control( DMH_END_DIGEST ) | |
543 | + ); | |
544 | + | |
530 | 545 | /* Also consider any dependencies which may be common to |
531 | 546 | * all releases, or all components, of the current package; |
532 | 547 | * we do this by walking back through the XML hierarchy, |
@@ -697,6 +697,17 @@ int pkgTarArchiveInstaller::ProcessDataStream( const char *pathname ) | ||
697 | 697 | */ |
698 | 698 | commit_saved_entity( pathname, octval( header.field.mtime ) ); |
699 | 699 | installed->AddEntry( filename_key, pathname + sysroot_len ); |
700 | + | |
701 | + /* Additionally, when the appropriate level of debug | |
702 | + * tracing has been enabled, report the installation of | |
703 | + * this file to the diagnostic log. | |
704 | + * | |
705 | + * FIXME: this would be a good place to add reporting | |
706 | + * of installation, in verbose execution mode. | |
707 | + */ | |
708 | + DEBUG_INVOKE_IF( DEBUG_REQUEST( DEBUG_TRACE_TRANSACTIONS ), | |
709 | + dmh_printf( " %s\n", pathname ) | |
710 | + ); | |
700 | 711 | } |
701 | 712 | return status; |
702 | 713 | } |