The MinGW.org Installation Manager Tool
Revision | 18469af41a2ad6ce1259fd60501476d8d38ad2dc (tree) |
---|---|
Time | 2013-01-09 20:12:03 |
Author | Keith Marshall <keithmarshall@user...> |
Commiter | Keith Marshall |
Include release tags in GUI displayed package versions.
@@ -1,3 +1,10 @@ | ||
1 | +2013-01-09 Keith Marshall <keithmarshall@users.sourceforge.net> | |
2 | + | |
3 | + Include release tags in GUI displayed package versions. | |
4 | + | |
5 | + * src/pkglist.cpp (pkgVersionString) [ReleaseStatus != NULL]: | |
6 | + Append ReleaseStatus and ReleaseIndex to generated version string. | |
7 | + | |
1 | 8 | 2013-01-08 Keith Marshall <keithmarshall@users.sourceforge.net> |
2 | 9 | |
3 | 10 | Fix enumeration of pending install actions for scheduled upgrades. |
@@ -209,16 +209,30 @@ static char *pkgVersionString( char *buf, pkgSpecs *pkg ) | ||
209 | 209 | * We begin with the concatenation of package version and build ID |
210 | 210 | * fields, retrieved from the pkgSpecs representation... |
211 | 211 | */ |
212 | + const char *pkg_version_tag; | |
212 | 213 | char *update = version_string_copy( buf, pkg->GetPackageVersion() ); |
213 | 214 | update = version_string_copy( update, pkg->GetPackageBuild(), '-' ); |
214 | - if( pkg->GetSubSystemVersion() != NULL ) | |
215 | + if( (pkg_version_tag = pkg->GetSubSystemVersion()) != NULL ) | |
215 | 216 | { |
216 | - /* ...then, we append the sub-system ID, if applicable... | |
217 | + /* ...then, we append the sub-system ID, if applicable. | |
217 | 218 | */ |
218 | 219 | update = version_string_copy( update, pkg->GetSubSystemName(), '-' ); |
219 | - update = version_string_copy( update, pkg->GetSubSystemVersion(), '-' ); | |
220 | + update = version_string_copy( update, pkg_version_tag, '-' ); | |
220 | 221 | update = version_string_copy( update, pkg->GetSubSystemBuild(), '-' ); |
221 | 222 | } |
223 | + if( (pkg_version_tag = pkg->GetReleaseStatus()) != NULL ) | |
224 | + { | |
225 | + /* When the package name also includes a release classification, | |
226 | + * then we also append this to the displayed version number (noting | |
227 | + * that an initial '$' is special, and should be suppressed)... | |
228 | + */ | |
229 | + if( *pkg_version_tag == '$' ) ++pkg_version_tag; | |
230 | + update = version_string_copy( update, pkg_version_tag, '-' ); | |
231 | + /* | |
232 | + * ...followed by any serialisation index for the release... | |
233 | + */ | |
234 | + update = version_string_copy( update, pkg->GetReleaseIndex(), '-' ); | |
235 | + } | |
222 | 236 | /* ...and finally, we return a pointer to the buffer in which |
223 | 237 | * we constructed the fully qualified version string. |
224 | 238 | */ |