The MinGW.org Installation Manager Tool
修订版 | 6fdbd5bcaaf3f5c5c6ac0fdeac2a9635f00b0a4f (tree) |
---|---|
时间 | 2011-06-13 04:38:11 |
作者 | Keith Marshall <keithmarshall@user...> |
Commiter | Keith Marshall |
Don't require -vv to report progress of update operation.
@@ -1,3 +1,11 @@ | ||
1 | +2011-06-12 Keith Marshall <keithmarshall@users.sourceforge.net> | |
2 | + | |
3 | + Don't require -vv to report progress of update operation. | |
4 | + | |
5 | + * src/pkgbind.cpp (pkgRepository::GetPackageList): Eliminate all | |
6 | + basename() calls; `dname' already tells us what it should return. | |
7 | + [update]: Report progress, irrespective of verbosity setting. | |
8 | + | |
1 | 9 | 2011-06-11 Keith Marshall <keithmarshall@users.sourceforge.net> |
2 | 10 | |
3 | 11 | Fix MinGW-Bug #3313806. |
@@ -26,7 +26,6 @@ | ||
26 | 26 | */ |
27 | 27 | #include <stdio.h> |
28 | 28 | #include <stdlib.h> |
29 | -#include <libgen.h> | |
30 | 29 | #include <string.h> |
31 | 30 | #include <unistd.h> |
32 | 31 |
@@ -78,11 +77,13 @@ void pkgRepository::GetPackageList( const char *dname ) | ||
78 | 77 | /* Check for a locally cached copy of the "package-list" file... |
79 | 78 | */ |
80 | 79 | if( force_update || (access( dfile, F_OK ) != 0) ) |
81 | - /* | |
82 | - * When performing an "update", or if no local copy is available... | |
80 | + { | |
81 | + /* When performing an "update", or if no local copy is available... | |
83 | 82 | * Force a "sync", to fetch a copy from the public host. |
84 | 83 | */ |
84 | + dmh_printf( "Update catalogue: %s.xml\n", dname ); | |
85 | 85 | owner->SyncRepository( dname, repository ); |
86 | + } | |
86 | 87 | |
87 | 88 | /* We SHOULD now have a locally cached copy of the package-list; |
88 | 89 | * attempt to merge it into the active profile database... |
@@ -93,11 +94,8 @@ void pkgRepository::GetPackageList( const char *dname ) | ||
93 | 94 | /* We successfully loaded the XML catalogue; refer to its |
94 | 95 | * root element... |
95 | 96 | */ |
96 | - char catname[ 1 + strlen( merge.Value() ) ]; | |
97 | 97 | if( pkgOptions()->Test( OPTION_VERBOSE ) > 1 ) |
98 | - dmh_printf( | |
99 | - "Load catalogue: %s\n", basename( strcpy( catname, merge.Value() )) | |
100 | - ); | |
98 | + dmh_printf( "Load catalogue: %s.xml\n", dname ); | |
101 | 99 | pkgXmlNode *catalogue, *pkglist; |
102 | 100 | if( (catalogue = merge.GetRoot()) != NULL ) |
103 | 101 | { |
@@ -127,10 +125,7 @@ void pkgRepository::GetPackageList( const char *dname ) | ||
127 | 125 | { /* The specified catalogue could not be successfully loaded; |
128 | 126 | * emit a warning diagnostic message, and otherwise ignore it. |
129 | 127 | */ |
130 | - char catname[ 1 + strlen( dfile ) ]; | |
131 | - dmh_notify( DMH_WARNING, | |
132 | - "Load catalogue: FAILED: %s\n", basename( strcpy( catname, dfile )) | |
133 | - ); | |
128 | + dmh_notify( DMH_WARNING, "Load catalogue: FAILED: %s.xml\n", dname ); | |
134 | 129 | } |
135 | 130 | |
136 | 131 | /* However we handled it, the XML file's path name in "dfile" was |