OSDN Git Service

f52a34dbec6c840060590c179afd3df9f577fa18
[mingw/mingw-get.git] / ChangeLog
1 2020-06-22  Keith Marshall  <keith@users.osdn.me>
2
3         Do not dereference nullptr in package directory trees.
4
5         * src/pkglist.h (pkgDirectory::Insert, pkgDirectory::InOrder):
6         Delegate them to static class methods, with inline wrappers passing
7         "this" pointer explicitly, thus obviating any need for...
8         [this != NULL]: ...this invalid comparison.
9
10         * src/pkgshow.cpp (pkgDirectory::Insert, pkgDirectory::InOrder):
11         Modify them, reimplementing as the requisite static class methods.
12         (pkgDirectoryViewer::Dispatch): Reorganize process flow.
13
14 2020-06-22  Keith Marshall  <keith@users.osdn.me>
15
16         Ignore spin wait requests with no designated referrer.
17
18         * src/pkgstat.h (pkgSpinWait::UpdateIndex) [this]: Cannot test for
19         nullptr, since C++ specifies result as "undefined behaviour"; test...
20         [referrer]: ...this predesignated static class property instead.
21
22 2020-06-22  Keith Marshall  <keith@users.osdn.me>
23
24         Support options interpretation from an unborn options object.
25
26         * src/pkgopts.h (pkgOpts::Test, pkgOpts::IsSet, pkgOpts::GetValue)
27         (pkgOpts::GetString, pkgOpts::SetFlags): Delegate then to static class
28         methods, with inline wrappers passing "this" pointer explicitly.
29
30         * src/pkgopts.cpp (pkgOpts::Test, pkgOpts::IsSet, pkgOpts::GetValue)
31         (pkgOpts::GetString, pkgOpts::SetFlags): Implement the static methods.
32         (pkgPreferenceEvaluator::PresetScriptHook) [! pkgOptions()]: Do not
33         evaluate pkgOptions()->IsSet(); assume that it would implicitly return
34         false, thus suppressing all dependent processing, including subsequent
35         evaluation of pkgOptions()->GetString().
36
37 2020-06-21  Keith Marshall  <keith@users.osdn.me>
38
39         Declare functions as void when return value is immaterial.
40
41         * src/pkginet.h (pkgDownloadMeter::Update): Declare it as a pure
42         virtual void function, rather than as pure virtual int.
43
44         * src/pkginet.cpp (pkgDownloadMeterTTY::Update)
45         * src/pkgnget.cpp (pkgDownloadMeterGUI::Update): Amend derivative
46         implementations to match; do not return anything.
47
48 2020-06-21  Keith Marshall  <keith@users.osdn.me>
49
50         Ensure non-void functions always return explicit values.
51
52         * src/guimain.cpp (WinMain): Remove explicit EXIT_FAILURE returns from
53         individual exception handlers; relocate it to the default execution
54         path, to which all such handlers will fall through.
55
56         * src/dmhguix.cpp (dmhTypeGUI::notify) [DMH_COMPILE_DIGEST]: Return
57         number of bytes added to message queue; fall through, to return zero,
58         on failure to extend the queue.
59
60 2020-06-20  Keith Marshall  <keith@users.osdn.me>
61
62         Simplify numeric argument interpreter function.
63
64         * src/clistub.c (xatoi) [input != NULL]: Delegate to...
65         (strtol): ...this standard library function; hence delete redundant
66         local implementation, within the NULL pointer rejection guard.
67
68 2020-06-19  Keith Marshall  <keith@users.osdn.me>
69
70         Accommodate C++11 string constant conflation limitations.
71
72         * src/dllhook.cpp (MSG_INTERNAL_ERROR)
73         * src/pkgexec.cpp (LUA_LIBEXEC_PATH): Insert white space, to separate
74         adjacent string constants in conflated text.
75
76 2020-06-19  Keith Marshall  <keith@users.osdn.me>
77
78         Force "C" linkage for setup key definitions.
79
80         * src/setup.cpp (uri_key, mirror_key, value_none): Wrap them...
81         (BEGIN_C_DECLS, END_C_DECLS): ...between these.
82
83 2020-06-19  Keith Marshall  <keith@users.osdn.me>
84
85         Support all-static linking with recent GCC versions.
86
87         * Makefile.in (LDFLAGS): Add "-static" unconditionally.
88         (LIBS, SETUP_TOOL_LIBS): Remove all "-Wl,-Bstatic" and "-Wl,-Bdynamic"
89         references; the latter, in particular, appears to induce dynamic
90         linking of libstdc++-6.dll, overriding "--static-libstdc++".
91
92 2020-06-12  Keith Marshall  <keith@users.osdn.me>
93
94         Use XML templates to adapt to download host changes.
95
96         * configure.ac (MINGW_PACKAGE_DIST_URL): Update to OSDN host URL.
97
98         * xml/profile.xml: Rename it as...
99         * xml/profile.xml.in: ...this; replace hard-coded repository URL...
100         (%PACKAGE_LIST_URL%/%F.xml.lzma): ...this template.
101
102         * xml/setup.xml: Likewise, rename it as...
103         * xml/setup.xml.in: ...this, with corresponding URL update.
104
105         * Makefile.in (install-profile): Modify procedure, using...
106         (%.xml: %.xml.in): ...this new pattern rule, to generate installed XML
107         files, from source templates.
108
109         * src/setup.rc (STRINGTABLE) <ID_DOWNLOAD_HOST_URI>: Remove trailing
110         "?download" qualifier.
111
112 2020-06-11  Keith Marshall  <keith@users.osdn.me>
113
114         Discontinue formal use of the build-aux submodule.
115
116         * .gitmodules .hgsub: Files are obsolete; delete them.
117         * .gitignore .hgignore (build-aux): Add to SCM exclusion list.
118
119         * aclocal.m4 (build_aux_prefix): New macro; define it.  This provides
120         a mechanism for informally locating an external, separately maintained
121         implementation of the requisite "build-aux" module; use it in...
122         (aux_include): ...this new macro; define, and use it, to access those
123         "build-aux" M4 macros which are required at configure generation time.
124         (MINGW_AC_CONFIG_AUX_DIR, MINGW_AC_CONFIG_AUX_DIRS): New macros;
125         define them.  Together, they implement a replacement for the standard
126         AC_CONFIG_AUX_DIR macro, but offering extended path search capability,
127         at configure run time, in addition to defining...
128         (buildauxdir): ...this new AC_SUBST variable.
129
130         * configure.ac (build_alias): Define it using...
131         (ac_aux_dir): ...this autoconf path reference, defined by using...
132         (MINGW_AC_CONFIG_AUX_DIR): ...this, instead of...
133         (AC_CONFIG_AUX_DIR): ...this.
134
135         * Makefile.in (buildauxdir): Use it, for M4 file references.
136
137 2020-06-02  Keith Marshall  <keith@users.osdn.me>
138
139         Do not use .hgtags for repository tag tracking.
140
141         * .hgtags: Delete file; it serves no purpose within a git repository,
142         and may actually interfere with tag inheritance, when cloning from git
143         into hg.
144
145 2017-09-05  Keith Marshall  <keith@users.osdn.me>
146
147         mingw-get-0.6.3-mingw32-pre-20170905-1 posted on OSDN.net
148
149         * All files (r0-6-3-beta-20170905-1): Tag assigned.
150
151 2017-09-04  Keith Marshall  <keith@users.osdn.me>
152
153         Improve probability of establishing successful URL connections.
154
155         * src/pkginet.cpp (pkgInternetAgent::OpenURL): Add...
156         (INTERNET_FLAG_KEEP_CONNECTION, INTERNET_FLAG_IGNORE_CERT_CN_INVALID)
157         (INTERNET_FLAG_IGNORE_CERT_DATE_INVALID, INTERNET_FLAG_PRAGMA_NOCACHE)
158         (INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS)
159         (INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP): ...these flags, when calling
160         the InternetOpenUrl() function.
161
162 2017-09-01  Keith Marshall  <keith@users.osdn.me>
163
164         Increment version for first OSDN hosted release.
165
166         * VERSION.m4 (VERSION_PATCH): Increment to 3; thus...
167         (__VERSION__): ...this is auto-incremented to 0.6.3
168
169 2013-11-26  Keith Marshall  <keithmarshall@users.sourceforge.net>
170
171         Conflate name and class columns in GUI package list.
172
173         * src/pkglist.cpp (AppWindowMaker::InitPackageListView): Remove...
174         <ID_PKGTYPE_COLUMN_HEADING>: ...column with this heading; add its width
175         allocation to the original pixel count alloted for the width of...
176         <ID_PKGNAME_COLUMN_HEADING>: ...this column.
177         (pkgListViewMaker::UpdateItem): Conflate content of original name and
178         class columns into first column; renumber successive columns.
179
180 2013-10-18  Keith Marshall  <keithmarshall@users.sourceforge.net>
181
182         Don't attempt to resolve dependencies for unidentified packages.
183
184         * src/pkgdeps.cpp (pkgXmlDocument::ResolveDependencies):
185         [selected == NULL]: Current dependency is unresolved; do not make any
186         recursive call for this unidentified requirement.  This avoids posting
187         misleading "can't get 'tarname' for non-release element <<<unknown>>>"
188         diagnostic messages, where the subsequent "unresolved dependency"
189         message is sufficient; include dmhmsgs.h, and add...
190         (PKGMSG_SPECIFICATION_ERROR): ...this preamble instead.
191
192 2013-10-18  Keith Marshall  <keithmarshall@users.sourceforge.net>
193
194         Implement foundation for future NLS enabled diagnostics.
195
196         * src/dmhmsgs.h: New file; it declares the NLS capable DMH interface.
197         * src/dmhmsgs.c: New file; it implements rudimentary NLS hooks, (but
198         currently does not direct them to any NLS provider), together with an
199         initial subset of a default (compiled in) message catalogue.
200
201         * Makefile.in (CORE_DLL_OBJECTS): Add dmhmsgs.$OBJEXT
202
203         * src/pkgname.cpp (pkgArchiveName): Modify diagnostics, to use...
204         (PKGMSG_SPECIFICATION_ERROR): ...this dmhmsgs.h declared message.
205
206 2013-10-15  Keith Marshall  <keithmarshall@users.sourceforge.net>
207
208         Add automated build time configuration management.
209
210         * Makefile.in (Makefile): Add regeneration rules, depending on...
211         (VERSION.m4, configure.ac, aclocal.m4, missing.m4, makeopts.m4):
212         ...these, if modified by the package maintainer, directed via...
213         (config.status, configure): ...these, regenerated as required.
214
215 2013-10-04  Keith Marshall  <keithmarshall@users.sourceforge.net>
216
217         mingw-get-0.6.2-mingw32-beta-20131004-1 released.
218
219         * VERSION.m4 (VERSION_PATCH): Increment it.
220         * srcdist-doc/NEWS.in: Release notes updated.
221         * All files (r0-6-2-beta-20131004-1): Tag assigned.
222
223 2013-10-03  Keith Marshall  <keithmarshall@users.sourceforge.net>
224
225         Propagate RELEASE_CLASS setting from mingw-get-setup.
226
227         * configure.ac (CLI_RELEASE_CLASS, GUI_RELEASE_CLASS): Adopt...
228         (RELEASE_CLASS) [defined]: ...this as default value.
229
230 2013-10-02  Keith Marshall  <keithmarshall@users.sourceforge.net>
231
232         Support group affiliation with component package granularity.
233
234         * src/pkglist.cpp (pkgXmlNode::IsVisibleClass): Make it synonymous
235         with IsVisibleGroupMember(); this is a temporary adjustment, pending
236         the planned implementation of component class visibility filtering.
237         (pkgListViewMaker::Dispatch): Defer consideration of visibility until
238         traversal of component package directories, except in the particular
239         case of packages which lack defined components.
240
241 2013-10-01  Keith Marshall  <keithmarshall@users.sourceforge.net>
242
243         Correct processing of package group associations.
244
245         * src/pkgtree.cpp (AppWindowMaker::IsPackageGroupAffiliate): Iterate
246         over "affiliate_key" elements in FindNextAssociate() calls; original
247         implementation was incorrectly iterating over "group_key" elements.
248
249 2013-09-21  Keith Marshall  <keithmarshall@users.sourceforge.net>
250
251         Reorder controls within "Apply Changes" dialogue.
252
253         * src/guimain.rc (IDD_APPLY_APPROVE): Move definition of the "Okay to
254         proceed?" GROUPBOX, and its contained PUSHBUTTONs, to the top; we want
255         it to get the default focus.
256
257 2013-09-21  Keith Marshall  <keithmarshall@users.sourceforge.net>
258
259         Reimplement wsh.lua in C/C++; (cf. MinGW-Bug #2057).
260
261         * src/pkgexec.cpp (LUA_INLINE): New function attribute definition.
262         (init_lua_path): Use it, reproducing the original function attributes.
263         (lua_isstringarg): New LUA_INLINE helper function; implement it.
264         (lua_wsh_libexec_path): New function; it implements wsh.libexec_path
265         (lua_wsh_execute): New function; it implements wsh.execute
266         (luaload_wsh): New function; it wraps references to lua_wsh_execute()
267         and lua_wsh_libexec_path() to provide the wsh module implementation.
268         (pkgXmlNode::DispatchScript): Preload it into the Lua interpreter.
269
270         * scripts/libexec/setup.lua (M.argwrap): New method; implement it.
271         (M.shlink, M.unlink): Use it to collect their arguments into a single
272         string, to be passed as the command to be invoked by wsh.execute
273
274         * scripts/libexec/wsh.lua: File is no longer required; delete it.
275         * Makefile.in (LIBEXEC_SCRIPTS): Remove reference to it.
276
277 2013-09-20  Keith Marshall  <keithmarshall@users.sourceforge.net>
278
279         Establish default preferences for GUI; (cf. MinGW-Feature #2036)
280
281         * src/pkgbase.h (pkgXmlDocument::EstablishPreferences): Adjust its
282         prototype; add argument identifying prospective client classification.
283
284         * src/pkgopts.cpp (client_key): New XML property keyword; define it.
285         (pkgXmlDocument::EstablishPreferences): Implement filter, based on new
286         client classification argument, to restrict preference selection to a
287         matching client class specification.
288
289         * src/climain.cpp (dbase.EstablishPreferences): Filter on class "cli".
290         * src/guiexec.cpp (pkgData->EstablishPreferences): Likewise, on "gui".
291
292         * xml/profile.xml (preferences): Add client="cli" attribute for the
293         existing specification; add another for client="gui".
294
295 2013-09-20  Keith Marshall  <keithmarshall@users.sourceforge.net>
296
297         Force canonical comparison of shell links; (cf. MinGW-Bug #2054)
298
299         * scripts/libexec/unlink.js [FileExists(filename) && (chklink != "")]:
300         The value of 'chklink' may not be canonical; instantiate an (unsaved)
301         link reference from it, then compare the canonicalized reference from
302         within it, to the reference within 'filename', thus avoiding possible
303         lexical mismatch between canonical and non-canonical forms.
304
305 2013-09-19  Keith Marshall  <keithmarshall@users.sourceforge.net>
306
307         Correct LUA_PATH assignment for GUI; (cf. MinGW-Bug #2052)
308
309         * src/pkgexec.cpp (LUA_LIBEXEC_PATH): New manifest string; define it.
310         (init_lua_path) <LUA_PATH>: Use it; add guimain.exe app directory.
311
312 2013-09-19  Keith Marshall  <keithmarshall@users.sourceforge.net>
313
314         Handle meta-package removal correctly; (cf. MinGW-Bug #2051)
315
316         * src/pkgunst.cpp (pkgRemove) [archive == none]: Ensure the pending
317         action flag is cleared; previously this was done during manifest clean
318         up, and since a meta-package has no manifest, it was overlooked.
319
320 2013-09-10  Keith Marshall  <keithmarshall@users.sourceforge.net>
321
322         mingw-get-0.6.1-mingw32-beta-20130910-1 released.
323
324         * srcdist-doc/NEWS.in: Release notes updated.
325         * All files (r0-6-1-beta-20130910-1): Tag assigned.
326
327 2013-09-10  Keith Marshall  <keithmarshall@users.sourceforge.net>
328
329         Fix MinGW-Bug #2026.
330
331         * src/dmhguix.cpp (DMH_PTY_GUARDBYTES): New manifest constant.
332         (dmhTypePTY::printf) [buffer full]: Use it; it defines a reserved byte
333         count, at end of buffer, where expansion or scroll out is triggered;
334         use memcpy() for scroll out, but avoid overlapping regions.
335         (dmhTypePTY::printf) [output == '\r']: Handle it.
336
337         * src/tarproc.cpp (create_output_stream): Improve diagnostic messages;
338         discriminate between file collision and other privilege violations.
339         (pkgArchiveProcessor::ExtractFile): Don't return a zero status code,
340         when the output stream could not be successfully opened, so that...
341         (pkgTarArchiveInstaller::ProcessDataStream): ...we may avoid writing a
342         spurious manifest entry here.
343
344 2013-09-06  Keith Marshall  <keithmarshall@users.sourceforge.net>
345
346         Update version, pre-empting subsequent release.
347
348         * VERSION.m4 (VERSION_PATCH): Bump from zero to 1.
349
350 2013-09-04  Keith Marshall  <keithmarshall@users.sourceforge.net>
351
352         mingw-get-0.6.0-mingw32-beta-20130904-1 released.
353
354         * srcdist-doc/NEWS.in srcdist-doc/README.in: Release notes updated.
355         * srcdist-doc/INSTALL.in: Installation instructions updated.
356         * All files (r0-6-0-beta-20130904-1): Tag assigned.
357
358 2013-08-26  Keith Marshall  <keithmarshall@users.sourceforge.net>
359
360         Implement retry throttling for failed internet connections.
361
362         * src/pkginet.h (INTERNET_RETRY_ATTEMPTS): New macro; define it.
363         (INTERNET_RETRY_INTERVAL, INTERNET_DELAY_FACTOR): Likewise.
364
365         * src/pkginet.cpp (INTERNET_RETRY_REQUESTER): New typedef.
366         (pkgInternetAgent::connection_delay, pkgInternetAgent::delay_factor):
367         (pkgInternetAgent::retries, pkgInternetAgent::retry_interval): New
368         private member variables; declare them.
369         (pkgInternetAgent::OpenURL): Use them; they must be initialised by...
370         (pkgInternetAgent::SetRetryOptions): ...this new method; implement it.
371         (pkgActionItem::DownloadSingleArchive): Invoke it.
372         (pkgXmlDocument::SyncRepository): Likewise.
373
374 2013-08-24  Keith Marshall  <keithmarshall@users.sourceforge.net>
375
376         Reassign default URL for download of setup tool components.
377
378         * aclocal.m4 (PACKAGE_DIST_DOMAIN, PACKAGE_DIST_DIR): New precious
379         variables; declare them as such, and assign default values by using...
380         (MINGW_AC_PACKAGE_DIST_URL): ...this new macro; implement it.
381
382         * configure.ac (MINGW_AC_PACKAGE_DIST_URL): Use it.
383         * Makefile.in (TAG_SCRIPT): Capture assigned URL; substitute it...
384         (PACKAGE_DIST_URL): ...for this replacement text marker...
385         * src/setup.rc (ID_DOWNLOAD_HOST_URI): ...here.
386
387 2013-08-21  Keith Marshall  <keithmarshall@users.sourceforge.net>
388
389         Simplify guimain.exe duplicate instance prevention.
390
391         * src/guimain.cpp (WinMain): Delegate requisite checking to...
392         (WTK::RaiseAppWindow): ...this external toolkit function.
393
394 2013-08-13  Keith Marshall  <keithmarshall@users.sourceforge.net>
395
396         Install licence as standard setup component.
397
398         * src/guimain.h src/setup.rc (ID_PACKAGE_GUI_DISTNAME): Macro
399         no longer required; delete definition.
400
401         * src/setup.cpp (pkgSetup::DoFirstTimeInstallation):
402         <pkgSetupAction> [ID_PACKAGE_GUI_DISTNAME]: Delete reference.
403         <pkgSetupAction> [ID_PACKAGE_BASE_DISTNAME]: Update reference; repeat
404         to explicitly address each of "bin", "gui", and "lic" components.
405
406         * Makefile.in (TAG_SCRIPT) [PACKAGE_GUI_DISTNAME]: Delete reference.
407         (TAG_SCRIPT) [PACKAGE_BASE_DISTNAME]: Redefine as template.
408
409 2013-08-13  Keith Marshall  <keithmarshall@users.sourceforge.net>
410
411         More dialogue box adjustments.
412
413         * src/guimain.rc: Generally clean up white-space distribution.
414         (All dialogue templates): Use WS_TABSTOP consistently.
415
416 2013-08-13  Keith Marshall  <keithmarshall@users.sourceforge.net>
417
418         Circumvent Windows-7 "Program Compatibility Assistant" misbehaviour.
419
420         * src/manifest.rc (assembly) <compatibility>: Add <supportedOS>
421         declarations for each of Vista, Win7, and (tentatively) Win8.
422
423 2013-07-30  Keith Marshall  <keithmarshall@users.sourceforge.net>
424
425         Minor modification to "about" dialogue dismissal button.
426
427         * src/guimain.rc (IDD_HELP_ABOUT) <DEFPUSHBUTTON>: Change label text
428         to "Dismiss"; add WS_TABSTOP style.
429
430 2013-07-30  Keith Marshall  <keithmarshall@users.sourceforge.net>
431
432         Match "about" dialogue caption to main window.
433
434         * src/guimain.rc (IDM_HELP_ABOUT) <MENUITEM>: Match it to...
435         (IDD_HELP_ABOUT) <CAPTION>: ...this; make it representative of...
436         (ID_MAIN_WINDOW_CAPTION): ...this.
437
438 2013-07-30  Keith Marshall  <keithmarshall@users.sourceforge.net>
439
440         Implement "icon legend" display as "help" menu item.
441
442         * src/guimain.rc (IDM_HELP_LEGEND): Make menu item active; define
443         template for the dialogue box which it is to call out.
444
445         * src/guiexec.cpp (AppWindowMaker::OnCommand) [IDM_HELP_LEGEND]: New
446         case handler; implement dialogue box call out, as a variation on...
447         [IDM_HELP_ABOUT]: ...this; modify it accordingly.
448
449 2013-07-30  Keith Marshall  <keithmarshall@users.sourceforge.net>
450
451         Avoid discarding pending changes when catalogue is updated.
452
453         * src/guimain.h (IDD_CONFIRMATION): New manifest constant; define it.
454         (AppWindowMaker::ConfirmActionDialogue): New static method; declare it.
455         (AppWindowMaker::ConfirmActionRequest): New method; declare it.
456
457         * src/guimain.rc (IDD_CONFIRMATION): Implement new dialogue template.
458
459         * src/guiexec.cpp (pkgConfirmAction, pkgConfirmActionClient): New
460         static variables; they are used as pseudo-arguments, together with...
461         (DIALOGUE_DISPATCH, DIALOGUE_RESPONSE, DIALOGUE_CHKSTATE): ...these
462         new macros; define them; they facilitate the implementation of...
463         (AppWindowMaker::ConfirmActionDialogue): ...this; implement it.
464         (AppWindowMaker::ConfirmActionRequest): Implement it; use it...
465         (AppWindowMaker::OnCommand) [IDM_REPO_UPDATE]: ...here, and...
466
467         * src/pkgdata.cpp (AppWindowMaker::OnClose): ...here.
468
469 2013-07-26  Keith Marshall  <keithmarshall@users.sourceforge.net>
470
471         Make a minor GUI layout adjustment.
472
473         * src/pkgview.cpp (VSASH_INIT_POS): Increment from 0.30 to 0.35; this
474         sets the initial height of the package list pane to be 35% of the main
475         window height, which, at the default initial window size, neatly fits
476         the entire "Basic Setup" package group, without scrolling, on my
477         1366x768 pixel Win7-VM display.
478
479 2013-07-25  Keith Marshall  <keithmarshall@users.sourceforge.net>
480
481         Implement setup tool installer "plugin".
482
483         * src/setup.h (SETUP_HOOK_RUN_INSTALLER): Define request code.
484
485         * src/dllhook.cpp (run_basic_system_installer): Implement handler...
486         (setup_hook) [SETUP_HOOK_RUN_INSTALLER]: ...and invoke it.
487         (setup_hook) [default]: Collect diagnostics in common message digest.
488         (AppWindowMaker::SetupHookInvoked): Define and initialise it; in this
489         context, which does not conflict with prior definition in guimain.exe,
490         it must always remain true.
491
492         * src/setup.cpp (SetupTool) [constructor]: Invoke...
493         (SetupTool::DispatchSetupHookRequest): ...this, on user's request...
494         (SETUP_HOOK_RUN_INSTALLER): ...with this action code; this replaces...
495         (SetupTool::RunInstalledProgram): ...one reference instance for this
496         external program fork, leaving only one such reference remaining;
497         declare it to be "inline".
498
499         * Makefile.in (GUIMAIN_LIB_OBJECTS): New macro; define it.  It
500         abstracts a subset of the object modules originally enumerated...
501         (GUIMAIN_OBJECTS): ...here, whence use it; also incorporate into...
502         (SETUP_DLL_OBJECTS): ...this.
503         (SETUP_DLL_LIBS): Make it equivalent to...
504         (GUIMAIN_LIBS): ...this.
505         (mingw-get-setup-0.dll): Use...
506         (GUI_LDFLAGS): ...this, to specify linking options, rather than...
507         (LDFLAGS): ...this.
508
509 2013-07-25  Keith Marshall  <keithmarshall@users.sourceforge.net>
510
511         Add "Basic Setup" as a built-in standard package group.
512
513         * src/guimain.h (AppWindowMaker::SetupToolInvoked): New private
514         static member variable; declare it.
515
516         * src/guimain.cpp (AppWindowMaker::SetupToolInvoked): Define and
517         initialise it; this instance is specific to guimain.exe, where it
518         must always remain false.
519
520         * src/pkgtree.cpp (PKG_AFFILIATE_ALL): New constant; define it.
521         (load_package_group_hierarchy): Use it to specify those groups which
522         have all packages as affiliates, rather than just first root group.
523         (group_attributes): New static inline function; implement it, then...
524         (is_affiliated) [PKG_AFFILIATE_ALL]: ...use it to identify groups
525         which are specified as having all packages as affiliates.
526         (AppWindowMaker::InitPackageTreeView): Construct a temporary XML
527         specification for the "Basic Setup" package group, thence add it to
528         the package tree view; mark it as default group selection when...
529         [AppWindowMaker::SetupToolInvoked]: ...this is true.
530
531 2013-07-14  Keith Marshall  <keithmarshall@users.sourceforge.net>
532
533         Implement GUI filtering of package list by group selection.
534
535         * src/pkgbase.h (pkgXmlNode::IsVisibleGroupMember):
536         (pkgXmlNode::IsVisibleClass): New inline methods; declare them.
537         (pkgXmlNode::MapPackageGroupHierarchy): New inline method; declare it.
538         (pkgXmlNode::SetPackageGroupHierarchyMapper): Likewise; it sets up...
539         (pkgXmlNode::PackageGroupHierarchyMapper): ...this new private static
540         function pointer; declare it as a function reference, in terms of...
541         (pkgXmlNode::GroupHierarchyMapper): ...this new typedef; define it.
542
543         * src/guimain.h (AppWindowMaker::PackageTreeView): Make it static.
544         (AppWindowMaker::IsPackageGroupAffiliate): Declare new static method.
545
546         * src/pkgbind.cpp (pkgRepository::GetPackageList): Make it invoke...
547         (pkgXmlNode::MapPackageGroupHierarchy): ...this; implement it.
548
549         * src/pkglist.cpp (pkgXmlNode::IsVisibleGroupMember): Implement it.
550         (pkgXmlNode::IsVisibleClass): Likewise; just provide a stub, for now.
551         (pkgListViewMaker::Dispatch): Use them to filter package list content.
552         (AppWindowMaker::UpdatePackageList): Redraw main window when done.
553
554         * src/pkgtree.cpp [_WIN32_IE >= 0x0400]: Require this.
555         (AppWindowMaker::PackageTreeView): Define and initialise it.
556         (AppWindowMaker::InitPackageTreeView): Extend implementation; use...
557         (map_package_group_hierarchy_recursive, load package_group_hierarchy):
558         (is_existing_group, map_package_group_hierarchy): ...these; implement
559         them locally, as file scoped static helper functions.
560         (select_key): New static local string constant; define it.
561         (pkgInitCategoryTreeGraft): Use it; also have it invoke...
562         (pkgXmlNode::SetPackageGroupHierarchyMapper): ...this; implement it.
563         (AppWindowMaker::IsPackageGroupAffiliate): Implement it; it uses...
564         (is_affiliated, is_child_affiliate): ...these helpers; provide them as
565         locally implemented, file scoped static functions.
566
567         * src/pkgdata.cpp (AppWindowMaker::OnNotify): Add handler for...
568         [ID_PACKAGE_TREEVIEW && TVN_SELCHANGED]: ...this notification.
569
570 2013-07-12  Keith Marshall  <keithmarshall@users.sourceforge.net>
571
572         Correct a static string buffer aliasing issue.
573
574         * src/setup.cpp (SetupTool::setup_dll): New inline method; it ensures
575         that the buffer within approot_path() refers to the setup helper DLL.
576         (SetupTool::InitialiseSetupHookAPI): Use it, when loading the DLL.
577         (SetupTool::SetupTool): Use it again, when subsequently calling...
578         (_wunlink): ...this; it is now the preferred API, replacing...
579         (DeleteFileW): ...this; do not blindly assume that...
580         (SetupTool::dll_name): ...this remains unchanged between references;
581         it is an alias for the static buffer within approot_path().
582
583 2013-07-12  Keith Marshall  <keithmarshall@users.sourceforge.net>
584
585         Add a custom profile for use by the setup tool.
586
587         * xml/setup.xml: New file.
588
589 2013-07-03  Keith Marshall  <keithmarshall@users.sourceforge.net>
590
591         Improve handling of workspace clean-up requests.
592
593         * Makefile.in (mostlyclean): New rule; it replaces...
594         (clean): ...original intent delegated to 'mostlyclean'; retained and
595         augmented to remove all content specified by 'mostlyclean', plus...
596         (version.c, verinfo.h): ...these additional generated files.
597         (distclean): Modified; 'version.c' now removed by 'clean'.
598
599 2013-07-03  Keith Marshall  <keithmarshall@users.sourceforge.net>
600
601         Correct an omission from the source code distribution.
602
603         * Makefile.in (BUILD_AUX_FILES): Add makeopts.m4; this was omitted
604         from the 2013-04-10 modification to fix MinGW-Bug #1601.
605
606 2013-07-03  Keith Marshall  <keithmarshall@users.sourceforge.net>
607
608         Incorporate foundation for setup tool implementation.
609
610         * src/setup.cpp: New file; it implements the setup program.
611         * src/setup.rc: New file; it implements setup program resources.
612         
613         * src/dllhook.cpp: New file; it implements a DLL bridging API to
614         facilitate invocation of mingw-get-0.dll functions from the setup
615         program, after both DLLs have been explicitly loaded at run time.
616
617         * src/setup.h: New file; it declares the interface between the
618         setup program and the preceding mingw-get bridging DLL.
619
620         * src/guimain.h: Add filter to exclude declarations specific to...
621         [IMPLEMENTATION_LEVEL == PACKAGE_BASE_COMPONENT]: ...this case, when
622         included by compilation units specific to the setup tool components.
623         (ID_MAIN_DIALOGUE_CAPTION, ID_DOWNLOAD_HOST_URI): New resource IDs.
624         (ID_PACKAGE_BASE_DISTNAME, ID_PACKAGE_DATA_DISTNAME): Likewise.
625         (ID_PACKAGE_GUI_DISTNAME): Likewise; define them.
626
627         * Makefile.in (all): Respecify it, in terms of...
628         (all-core, all-setup): ...these new rules; define them, and also...
629         (all-setup-exe, all-setup-dll): ...these, to force building of...
630         (mingw-get-setup.$EXEEXT, mingw-get-setup-0.dll): ...these binaries.
631         (setup.res.$OBJEXT): Specify prerequisites, as for guimain.res.$OBJEXT
632         (SETUP_TOOL_OBJECTS, SETUP_TOOL_LIBS): New macros; define them.
633         (SETUP_DLL_OBJECTS, SETUP_DLL_LIBS, SETUP_DISTNAME): Likewise.
634         (TAG_SCRIPT): Add resource script substitution definitions for...
635         (ID_PACKAGE_BASE_DISTNAME, ID_PACKAGE_DATA_DISTNAME): ...these...
636         (ID_PACKAGE_GUI_DISTNAME): ...and this.
637
638 2013-07-01  Keith Marshall  <keithmarshall@users.sourceforge.net>
639
640         Add subprocess argument vector construction helpers.
641
642         * src/argwrap.c src/argwrap.h: New files; they implement an API for
643         construction of argument vectors, with appropriate quoting, to be
644         passed to MS-Windows exec'd subprocesses.  Rewritten from scratch,
645         without reference to any prior GPL licensed implementation, with MIT
646         style licence, these provide the foundation for a possible future
647         libmingwex.a implementation; they are included here, since no such
648         implementation is currently available.
649
650 2013-06-28  Keith Marshall  <keithmarshall@users.sourceforge.net>
651
652         Avoid inadvertent overwrite of existing files.
653
654         * src/mkpath.c (_O_NEWFILE): Conditionally specify attributes...
655         [IMPLEMENTATION_LEVEL == SETUP_TOOL_COMPONENT]: ...as they were...
656         [IMPLEMENTATION_LEVEL != SETUP_TOOL_COMPONENT]: ...else, include
657         _O_EXCL in the specified set; exclude _O_TRUNC.
658
659         * src/tarproc.cpp (dmh_notify_extraction_failed): New static inline
660         function; it encapsulates the diagnostic message factored out from...
661         (pkgArchiveProcessor::ExtractFile): ...here, whence use it.
662         (create_output_stream): Also used in this new static inline function;
663         it adds an appropriate diagnostic wrapper around set_output_stream(),
664         when _O_EXCL prevents overwrite of an existing file.
665         (pkgArchiveProcessor::SetOutputStream): Use it.
666
667 2013-06-27  Keith Marshall  <keithmarshall@users.sourceforge.net>
668
669         Improve diagnostics for tar archive processing faults.
670
671         * src/pkgproc.h (TAR_ARCHIVE_FORMAT_ERROR): New constant; define it.
672         (TAR_ARCHIVE_DATA_READ_ERROR, TAR_ARCHIVE_DATA_WRITE_ERROR): Likewise.
673
674         * src/tarproc.cpp (dmh_notify_archive_data_exhausted): New static
675         inline function; implement it.
676         (pkgTarArchiveProcessor::GetArchiveEntry) [short header]: Use it.
677         (pkgArchiveProcessor::ExtractFile) [TAR_ARCHIVE_DATA_READ_ERROR]:
678         Likewise, use it here; also explicitlycheck for, and diagnose...
679         [TAR_ARCHIVE_DATA_WRITE_ERROR]: ...this; also add a further catch all
680         case, to diagnose any other unexpected condition.
681         (pkgTarArchiveProcessor::GetArchiveEntry) [bad checksum]: Diagnose it.
682         (pkgTarArchiveProcessor::Process): Return appropriate status codes.
683         (pkgTarArchiveProcessor::ProcessEntityData): Likewise.
684
685 2013-06-24  Keith Marshall  <keithmarshall@users.sourceforge.net>
686
687         Facilitate version synchronisation for mingw-get-setup.
688
689         * VERSION.m4: New file.
690         * configure.ac: Include it, and...
691         (AC_INIT): ...use it.
692
693 2013-06-21  Keith Marshall  <keithmarshall@users.sourceforge.net>
694
695         Keep version strings clean when release class is unspecified.
696
697         * Makefile.in (RC_SCRIPT, VERSION_SCRIPT): Simplify; assign specified
698         release class to local variable; delegate release tag generation to...
699         (TAG_SCRIPT): ...this; check release class variable is not an empty
700         string, before inserting it into the generated release tag.
701
702 2013-06-20  Keith Marshall  <keithmarshall@users.sourceforge.net>
703
704         Rework defective assignment of product version resources.
705
706         * Makefile.in (BUILD_TAG): Avoid creating an empty build.tag file.
707         (PACKAGE_VERINFO_SCRIPT): Ensure that the build tag is generated as a
708         string of non-zero length.  Do not assume that it comprises only two
709         elements; extract the final two, as the third and fourth elements
710         of the product version meta-data record.
711
712 2013-06-19  Keith Marshall  <keithmarshall@users.sourceforge.net>
713
714         Rework defective package build time-stamping logic.
715
716         * Makefile.in (%.time): Make it explicitly touch its target; the
717         2013-05-15 changes, to reduce redundancy, didn't work as expected.
718         (%.tag): Add a side effect; make it also explicitly touch %.time.
719         (%.tagged.time): This is now redundant; remove it.
720
721 2013-06-14  Keith Marshall  <keithmarshall@users.sourceforge.net>
722
723         Collect distributable package files in user specified directory.
724
725         * Makefile.in (distdir): New macro; define default as abs_builddir.
726         (srcdist, bindist, licdist): Use it; direct generated tarballs to it.
727         (%.txt.dist): New pattern rule; define, and use it to make a copy...
728         (readme.txt): ...of this, in distdir, when processing...
729         (dist): ...this build objective.
730
731 2013-06-14  Keith Marshall  <keithmarshall@users.sourceforge.net>
732
733         Handle Microsoft's 32-bit vs. 64-bit time_t ambiguity.
734
735         * src/apihook.c: New file; it provides...
736         (have_api): ...this helper; it checks for availability of any specific
737         API function, within a specific system DLL, (MSVCRT.DLL by default).
738
739         * src/tarproc.cpp (have_utime64_api): New inline function; it wraps...
740         (have_api): ...this, to check whether MSVCRT.DLL provides...
741         (commit_saved_entity) [_utime64]: ...this; use if available, else...
742         (commit_saved_entity) [!_utime64]: ...fall back to using...
743         (utime): ...this.
744
745         * Makefile.in (CORE_DLL_OBJECTS): Add apihook.$OBJEXT
746
747 2013-06-13  Keith Marshall  <keithmarshall@users.sourceforge.net>
748
749         Facilitate package extraction and registration at setup time.
750
751         * src/pkgproc.h (IMPLEMENTATION_LEVEL): Add filters to facilitate
752         implementation of distinct setup time archive processing behaviour.
753         (pkgArchiveProcessor::save_on_extract): New property; declare it.
754         (pkgArchiveProcessor::SaveExtractedFiles): New method; implement it.
755         (pkgArchiveProcessor::SetOutputStream): New method; declare it.
756
757         * src/tarproc.cpp (IMPLEMENTATION_LEVEL): Add filters to implement
758         distinct setup time specific archive processing behaviour.
759         (pkgArchiveProcessor::SetOutputStream): Implement it.
760         (pkgTarArchiveExtractor::ProcessDataStream): Use it.
761         (pkgTarArchiveInstaller::ProcessDataStream): Likewise.
762
763 2013-06-13  Keith Marshall  <keithmarshall@users.sourceforge.net>
764
765         Implement some GUI progress metering dialogue enhancements.
766
767         * src/pkgbase.h (pkgProgressMeter): Don't pre-empt private features
768         of derived progress metering classes; hence, we no longer need this...
769         (AppWindowMaker): ...as a forward class declaration; delete it.
770
771         * src/guimain.rc (IDD_REPO_UPDATE): Resize, and adjust layout.
772         (IDD_PROGRESS_VAL, IDD_PROGRESS_MAX, IDD_PROGRESS_PCT): Add these
773         dialogue box progress counter display elements.
774
775         * src/pkgbind.cpp (pkgRepository::GetPackageList): Adjust style of
776         progress status messages, to suit reporting via GUI dialogue box or
777         CLI console, as appropriate.
778
779         * src/guiexec.cpp (ProgressMeterMaker): Redefine class, in terms of...
780         (PROGRESS_METER_CLASS): ...this new generic class name macro.
781         Reimplement private members, previously inherited from base class;
782         adjust class constructor to ensure that they are initialised.
783         Delete explicit destructor; a default destructor is now sufficient.
784         (ProgressMeterMaker::SetRange, ProgressMeterMaker::SetValue):
785         (ProgressMeterMaker::Annotate): Factor out; reimplement them...
786
787         * src/pmihook.cpp: ...in this new file, as generalised methods of...
788         (PROGRESS_METER_CLASS): ...the class named by this macro.
789         (PROGRESS_METER_CLASS::PutVal): New private method; implement it.
790
791 2013-05-31  Keith Marshall  <keithmarshall@users.sourceforge.net>
792
793         Avoid a potential macro definition conflict.
794
795         * src/pkgbase.h (strcasecmp) [__MINGW32__]: Use string.h definition.
796
797 2013-05-15  Keith Marshall  <keithmarshall@users.sourceforge.net>
798
799         Streamline build-time dependency tracking procedures.
800
801         * Makefile.in (DEPFLAGS): Adjust for simultaneous .o/.d generation.
802         (RC_DEPFLAGS): New macro; define dependency generation flags for the
803         resource compiler, which can't handle the new DEPFLAGS methodology.
804         (%.c, %.cpp, %.rc): Simplify $OBJEXT generation procedures.
805         (%.time): Remove redundantly replicated build-time procedure from...
806         (%.tagged.time): ...this; just make it a prerequisite.
807
808 2013-05-15  Keith Marshall  <keithmarshall@users.sourceforge.net>
809
810         Add resources for specification of product version.
811
812         * src/verinfo.rc src/verinfo.h.in: New files; included by...
813         * src/guimain.rc: ...this, whence also specify version information...
814         (VERINFO_FILE_NAME, VERINFO_INTERNAL_NAME, VERINFO_FILE_DESCRIPTION):
815         (VERINFO_FILE_VERSION, VERINFO_FILE_VERSION_STRING): ...per these new
816         manifest constant macros; define them, with propagation to...
817         (ID_MAIN_WINDOW_CAPTION): ...this; keep it consistent.
818
819         * Makefile.in (TAG_SCRIPT): Include invocation for...
820         (PACKAGE_VERINFO_SCRIPT): ...this new macro; defined to interpret...
821         (PACKAGE_VERINFO_PRODUCT_VERSION): ...this new substitution template;
822         it is used in src/verinfo.h.in, whence verinfo.h is generated.
823         (RC_INCLUDES): Add current working directory, for...
824         (verinfo.h): ...this; add rule and dependencies to generate it.
825
826 2013-05-14  Keith Marshall  <keithmarshall@users.sourceforge.net>
827
828         Make application manifest resource definition reusable.
829
830         * src/manifest.rc: New file; factor content from...
831         * src/guimain.rc: ...here, whence include it.
832
833 2013-05-08  Keith Marshall  <keithmarshall@users.sourceforge.net>
834
835         Extend DMH services to delay-loaded DLL clients.
836
837         * src/dmhcore.h (dmh_bind): New function; declare it.
838         * src/dmhcore.cpp (dmh_bind): Implement it; it provides an API through
839         which the setup tool makes its existing DMH services available to post
840         install hooks in mingw-get-0.dll, which cannot be loaded until after
841         the providing package has been downloaded and unpacked.
842
843 2013-05-08  Keith Marshall  <keithmarshall@users.sourceforge.net>
844
845         Avoid unnecessary command line globbing in GUI applications.
846
847         * src/guimain.cpp src/guistub.cpp (_CRT_glob): Declare as extern "C";
848         initialise to zero, so overriding the runtime start-up default.
849
850         * src/rites.c [! IMPLEMENT_INITIATION_RITES] (_CRT_glob): Initialise
851         to zero here too; lastrites.exe doesn't need globbing either.
852
853 2013-05-04  Keith Marshall  <keithmarshall@users.sourceforge.net>
854
855         Address some GCC-4.7 string initialisation warnings.
856
857         * src/pkglist.cpp (AppWindowMaker::InitPackageListView): Declare all
858         headings[].text initialisers as 'const'; cast to 'char *' as required.
859         (pkgListViewMaker::Dispatch): Ditto, when inserting the 'const' empty
860         string into the list, as a component class value.
861
862         * src/pkgdata.cpp (AppWindowMaker::InitPackageTabControl): Declare all
863         TabLegend[] initialisers as 'const'; cast to 'char *' as required.
864
865 2013-05-02  Keith Marshall  <keithmarshall@users.sourceforge.net>
866
867         Correct a spin wait thread synchronisation issue.
868
869         * src/pkgnget.cpp (pkgDownloadMeterGUI::SpinWait): Handle stop
870         requests explicitly; acknowledge when waiting thread has stopped.
871         (pkgDownloadMeterGUI::SpinWaitAction): Raise explicit stop requests;
872         wait for acknowledgement that waiting thread has stopped.
873
874 2013-04-23  Keith Marshall  <keithmarshall@users.sourceforge.net>
875
876         Select compressed data streaming filters for use by setup tool.
877
878         * src/pkgstrm.cpp [IMPLEMENTATION_LEVEL != PACKAGE_BASE_COMPONENT]:
879         Exclude the implementations of all decompression filters, except...
880         (pkgXzArchiveStream): ...this, together with its requisite methods...
881         (pkgArchiveStream, pkgLzmaArchiveStream): ...from these.
882
883 2013-04-23  Keith Marshall  <keithmarshall@users.sourceforge.net>
884
885         Adapt internet download agent for use by setup tool.
886
887         * src/pkgbase.h: More code rearrangement, exposing...
888         (safe_strcmp): ...this in any implementation context, controlled...
889         [USES_SAFE_STRCMP && ! HAVE_SAFE_STRCMP]: ...by this; when true...
890         (HAVE_SAFE_STRCMP): ...define this to 1, (must be non-zero).
891         [IMPLEMENTATION_LEVEL == PACKAGE_BASE_COMPONENT]: Ensure that...
892         (USES_SAFE_STRCMP): ...this is defined to 1, (i.e. non-zero).
893         (EXTERN_C): Relocate macro definition...
894         * src/pkgimpl.h: ...to here; add complementary implementation of...
895         (BEGIN_C_DECLS, END_C_DECLS): ...these new macros; define them.
896
897         * src/pkginet.h (pkgDownloadMeter::SpinWait): New static method;
898         declare it as inline, to be implemented elsewhere, delegating to...
899         (pkgDownloadMeter::SpinWaitAction): ...this new protected virtual
900         method; declare and implement it inline, as a "do nothing" base
901         class method, to be optionally overridden in a derived class.
902
903         * src/pkginet.cpp (pkgDownloadMeter::SpinWait): Implement it.
904         (pkgInternetAgent::OpenURL): Use it to invoke SpinWaitAction().
905         (USES_SAFE_STRCMP): Define as 1; (safe_strcmp() is required).
906         [IMPLEMENTATION_LEVEL != PACKAGE_BASE_COMPONENT]: Filter out code
907         which may not be required in more specialised contexts, then...
908         [IMPLEMENTATION_LEVEL == SETUP_TOOL_COMPONENT]: ...add specialised
909         variants specific to this.
910
911         * src/pkgnget.cpp [IMPLEMENTATION_LEVEL != PACKAGE_BASE_COMPONENT]:
912         Filter out code which may not be required in more specialised context.
913         (dmh_setpty): Provide locally declared prototype for external function.
914         (pkgDownloadMeterGUI): Add pseudo-terminal diagnostic message window.
915         (pkgDownloadMeterGUI::SpinWaitAction): Declare and implement GUI
916         specific method specialisation; it invokes a thread, running...
917         (pkgDownloadMeterGUI::SpinWait): ...this new static method overload.
918
919 2013-04-19  Keith Marshall  <keithmarshall@users.sourceforge.net>
920
921         Implement pre-emptive update issue number identification.
922
923         * src/pkgkeys.h (serial_number): Declare function prototype.
924         * src/pkginet.cpp (serial_number): Implementation remains here;
925         promote from static to extern "C".
926
927         * src/pkgbind.cpp (value_assumed_new): New char constant; define it.
928         (pkgRepository::expected_issue): New private member var; declare and...
929         (pkgRepository::pkgRepository): ...initialise it, assuming new.
930         (pkgRepository::GetPackageList): Assign pre-emptively declared issue
931         number, (from package-list references), to 'expected_issue'; compare it
932         with 'current_issue' number recorded within locally stored catalogue.
933         [current_issue >= expected_issue]: Suppress redundant download; adjust
934         diagnostic messages as appropriate.
935
936 2013-04-10  Keith Marshall  <keithmarshall@users.sourceforge.net>
937
938         Fix MinGW-Bug #1601 (on new issues tracker).
939
940         * aclocal.m4 (makeopts.m4): New build-aux module; include it.
941         (MINGW_AC_PROG_LEX): New macro; implement it.
942         
943         * configure.ac (AC_INIT): Make version number tripartite.
944         (MINGW_AC_MAKE_NO_PRINT_DIRECTORY): Use this new makeopts.m4 macro.
945         (MINGW_AC_PROG_LEX): Use it, in place of...
946         (AC_PROG_LEX): ...this.
947
948         * Makefile.in (MAKE): New macro; assign using autoconf's SET_MAKE.
949         (QUIET_MAKE): New macro; derive it from $(MAKE) --no-print-directory.
950         (LEX_COMMAND, LEX_COMMAND_ABORT): New macros; define them.
951         (LEX_MISSING, LEX_MISSING_MESSAGE, LEX_OUTPUT): Likewise.
952         (FORMAT_MESSAGE, MESSAGE_FOLD_WIDTH): Likewise; implemented from...
953         (AWK_CLEAR_LINE_BUFFER, AWK_FLUSH_BUFFER, AWK_PRINT_AND_CLEAR_BUFFER):
954         (AWK_COLLECT_MESSAGE, AWK_COLLECT_BLANK_LINE, AWK_PRINT_LINE_BUFFER):
955         ...this collection of internal helper macros; define them.
956         (%.c: %.l): Replacement for built-in rule; it handles "missing lex" in
957         a manner consistent with expectations of autoconf's AC_PROG_LEX.
958         (execute-command): New phoney build goal; it is used with...
959         (WITH_REQUEST): ...this new macro, to invoke commands recursively.
960
961 2013-03-25  Keith Marshall  <keithmarshall@users.sourceforge.net>
962
963         Adapt DMH for use in setup tool.
964
965         * src/dmh.cpp: File renamed to...
966         * src/dmhcore.cpp: ...this; some code rearranged, to facilitate...
967         [IMPLEMENTATION_LEVEL == PACKAGE_BASE_COMPONENT]: ...marking of code
968         sections which are required in the base package build, but which may
969         be filtered out of the build context for the setup tool.
970         
971         * src/guidmh.cpp: File renamed to this...
972         * src/dmhguix.cpp: ...this; also add marking for...
973         [IMPLEMENTATION_LEVEL == PACKAGE_BASE_COMPONENT]: ...sections which
974         may be filtered out of the build context for the setup tool.
975         (dmhTypePTY::printf): Improve stratagem for output.
976
977         * Makefile.in (CORE_DLL_OBJECTS, GUIMAIN_OBJECTS): Adjust references
978         to renamed source files.
979
980 2013-03-22  Keith Marshall  <keithmarshall@users.sourceforge.net>
981
982         Enable context hooks for build time code filtering.
983
984         * src/pkgimpl.h: New file; it defines...
985         (PACKAGE_BASE_COMPONENT, SETUP_TOOL_COMPONENT): ...these contexts;
986         either of these may be selected, by defining as manifest value for...
987         (IMPLEMENTATION_LEVEL): ...this; default is PACKAGE_BASE_COMPONENT.
988
989         * src/pkgbase.h: Include pkgimpl.h
990         [IMPLEMENTATION_LEVEL != PACKAGE_BASE_COMPONENT]: Occlude content.
991
992 2013-03-21  Keith Marshall  <keithmarshall@users.sourceforge.net>
993
994         Specify additional files for clean-up.
995
996         * Makefile.in (distclean): Additionally specify...
997         (build.tag, build.time): ...these, as removable files.
998
999 2013-03-21  Keith Marshall  <keithmarshall@users.sourceforge.net>
1000
1001         Add a missing distribution dependency.
1002
1003         * Makefile.in (srcdist): Explicitly require...
1004         (pkginfo.c): ...this; previously, it was only an implicit build time
1005         requirement, and may not have persisted until distribution time.
1006
1007 2013-03-21  Keith Marshall  <keithmarshall@users.sourceforge.net>
1008
1009         Implement by-name association of resource scripts with programs.
1010
1011         * src/guidata.rc: Renamed as...
1012         * src/guimain.rc: ...this, reflecting its association with...
1013         * src/guimain.cpp: ...this program source.
1014
1015         * Makefile.in (GUIMAIN_OBJECTS): Update dependency...
1016         (%.$OBJEXT:%.rc): ...replacing use of this pattern rule...
1017         (%.res.$OBJEXT:%.rc): ...with this.
1018
1019 2013-01-18  Keith Marshall  <keithmarshall@users.sourceforge.net>
1020
1021         Make GUI support visual styles in current Windows versions.
1022
1023         * src/guidata.rc: Add an appropriate inline manifest resource.
1024
1025         * src/guiexec.cpp (AppWindowMaker::Invoked): Ensure UpdateWindow() is
1026         called after the initial call to AdjustLayout(); this is required to
1027         ensure that all child windows are properly displayed from the outset.
1028
1029         * src/pkgview.cpp (AppWindowMaker::LayoutEngine):
1030         [ID_PACKAGE_DATASHEET]: Adjust the top position of the frame, to make
1031         the border coincide with the bottom border of the tab strip above.
1032
1033 2013-01-12  Keith Marshall  <keithmarshall@users.sourceforge.net>
1034
1035         Merge gui-dev branch head to master; close gui-dev branch.
1036
1037         * configure.ac (AC_INIT): Reset version to 0.6; reset all package
1038         files to state prevailing at gui-dev branch head.
1039
1040 2013-01-11  Keith Marshall  <keithmarshall@users.sourceforge.net>
1041
1042         Create release branch for further r0.5 development.
1043
1044         * configure.ac (AC_INIT): Bump version number to 0.5.1; assign branch
1045         label (mercurial bookmark) as "r0-5-1" for all files; (this is not to
1046         be released, at this time).
1047
1048 2013-01-10  Keith Marshall  <keithmarshall@users.sourceforge.net>
1049
1050         Implement data sheet compiler for list of installed files.
1051
1052         * src/pkgdata.cpp: #include pkgproc.h; it furnishes...
1053         (pkgManifest): ...this class declaration, which is required by...
1054         (DataSheetMaker::DisplayFilesManifest): ...this new private inline
1055         method; declare and implement it; subsequently, invoke it...
1056         (DataSheetMaker::OnPaint) [PKG_DATASHEET_INSTALLED_FILES]: ...here.
1057         (pkgTroffLayoutEngine::WriteLn): Correct a defect in handling of
1058         excess-length unbreakable "words" outside the viewport; previously
1059         they were not dropped from the input queue, resulting in repeated
1060         reprocessing in an infinite loop.
1061
1062 2013-01-09  Keith Marshall  <keithmarshall@users.sourceforge.net>
1063
1064         Include release tags in GUI displayed package versions.
1065
1066         * src/pkglist.cpp (pkgVersionString) [ReleaseStatus != NULL]:
1067         Append ReleaseStatus and ReleaseIndex to generated version string.
1068
1069 2013-01-08  Keith Marshall  <keithmarshall@users.sourceforge.net>
1070
1071         Fix enumeration of pending install actions for scheduled upgrades.
1072
1073         * src/pkgdata.cpp (pkgActionItem::EnumeratePendingActions):
1074         [action == ACTION_UPGRADE && classified == ACTION_INSTALL]: Enumerate
1075         upgrade as a special case of the install classification.
1076
1077 2013-01-08  Keith Marshall  <keithmarshall@users.sourceforge.net>
1078
1079         Implement "Mark All Upgrades" GUI capability.
1080
1081         * src/guimain.h (IDM_REPO_APPLY): Renumbered; make room for...
1082         (IDM_REPO_MARK_UPGRADES): ...this new constant; define it.
1083
1084         * src/guidata.rc (IDM_REPO_MARK_UPGRADES): New option; add it...
1085         (ID_MAIN_WINDOW_WINDOW) [Installation]: ...to this drop-down menu.
1086
1087         * src/pkgbase.h (pkgActionItem::SuppressRedundantUpgrades): New
1088         public inline method; declare it.
1089
1090         * src/guiexec.cpp (AppWindowMaker::OnCommand):
1091         [IDM_REPO_MARK_UPGRADES]: Add case handler for this menu selection.
1092         (pkgActionItem::SuppressRedundantUpgrades): New method; implement it.
1093
1094 2013-01-08  Keith Marshall  <keithmarshall@users.sourceforge.net>
1095
1096         Avoid unnecessary reloading of package list.
1097
1098         * src/guiexec.cpp (AppWindowMaker::OnCommand) [IDM_REPO_APPLY]:
1099         Do not reload package list after processing; update it in place.
1100
1101 2013-01-08  Keith Marshall  <keithmarshall@users.sourceforge.net>
1102
1103         Avoid potential heap corruption in action scheduler.
1104
1105         * src/guiexec.cpp (pkgActionItem::Clear): Factor out; relocate to...
1106         * src/pkgexec.cpp (pkgActionItem::Clear): ...here; this keeps all use
1107         of new and delete operators on the same side of the EXE/DLL boundary
1108         as the constructor and destructor for pkgActionItem objects.
1109         (pkgActionItem::Schedule): Ensure that all min_wanted and max_wanted
1110         references are unique to each allocated pkgActionItem object, so that
1111         the destructor may safely release their associated heap memory blocks.
1112
1113 2013-01-07  Keith Marshall  <keithmarshall@users.sourceforge.net>
1114
1115         Update copyright notification for development in new year.
1116
1117         * configure.ac (YEARS_OF_ISSUE): Add year 2013.
1118
1119         * Makefile.in (version.c, guidata.$OBJEXT): Make them depend on...
1120         (Makefile): ...this, so YEARS_OF_ISSUE propagates to built objects.
1121
1122 2012-12-24  Keith Marshall  <keithmarshall@users.sourceforge.net>
1123
1124         Work around a GUI action scheduling instability.
1125
1126         * src/guimain.h (AppWindowMaker::UpdateDataSheet): Declare new method.
1127         * src/pkgdata.cpp (AppWindowMaker::UpdateDataSheet): Implement it.
1128         (AppWindowMaker::OnNotify): Use it.
1129
1130         * src/guiexec.cpp (AppWindowMaker::OnCommand) [IDD_REPO_APPLY]:
1131         Don't refresh package list view in-place; clear and reload it instead.
1132
1133 2012-12-21  Keith Marshall  <keithmarshall@users.sourceforge.net>
1134
1135         Update distribution build rules.
1136
1137         * Makefile.in (SRCDIST_FILES): Remove version.c.in; this was moved
1138         to src/version.c.in, and is now automatically included via...
1139         (SRCDIST_SUBDIRS): ...this; remove build-aux and build-aux/m4; we want
1140         only selected files from these, as filtered by specification in...
1141         (BUILD_AUX_DIRS, BUILD_AUX_FILES): ...these new macros; define them.
1142         (BLDTAG, SCMTAG, GCMTAG): New release class macros; define them.
1143         (bindist, licdist, srcdist): Use them.
1144
1145 2012-12-21  Keith Marshall  <keithmarshall@users.sourceforge.net>
1146
1147         Update CLI implementation hooks for GUI integration.
1148
1149         * Makefile.in (LIBEXEC_PROGRAMS): Replace gui$EXEEXT with
1150         guistub$EXEEXT; update make goal references accordingly.
1151
1152         * src/rites.c (MINGW_GET_GUI): Redefine to be guimain$EXEEXT.
1153         (MINGW_GET_GFB): Define new fall-back; let it be guistub$EXEEXT.
1154         (RITES_IMPLEMENTATION): Perform rites for MINGW_GET_GUI.
1155
1156         * src/clistub.c (main) [cannot exec MINGW_GET_GUI]: Try
1157         MINGW_GET_GFB instead.
1158
1159 2012-12-21  Keith Marshall  <keithmarshall@users.sourceforge.net>
1160
1161         Rename executive core file for GUI implementation.
1162
1163         * src/guixmld.cpp: File renamed...
1164         * src/guiexec.cpp: ...to this; its function exceeds original intent.
1165         * Makefile.in (GUIMAIN_OBJECTS): Update reference accordingly.
1166
1167 2012-12-20  Keith Marshall  <keithmarshall@users.sourceforge.net>
1168
1169         Create foundation for implementation of package category tree view.
1170
1171         * Makefile.in (GUIMAIN_OBJECTS): Add pkgtree.$OBJEXT reference to...
1172         * src/pkgtree.cpp: ...incorporate this new file; it implements...
1173         (AppWindowMaker::InitPackageTreeView): ...this new class method...
1174         (pkgInitCategoryTreeGraft): ...and this new extern "C" function.
1175
1176         * src/guimain.h (pkgInitCategoryTreeGraft): Declare prototype.
1177         (AppWindowMaker::InitPackageTreeView): New private method; declare it.
1178         (AppWindowMaker::PackageTreeView): New member variable; declare it.
1179
1180         * src/guixmld.cpp (AppWindowMaker::LoadPackageData): Call
1181         pkgInitCategoryTreeGraft(), after loading profile.xml
1182         (AppWindowMaker::Invoked): Call InitPackageTreeView()
1183
1184         * src/pkgview.cpp (AppWindowMaker::LayoutEngine):
1185         [ID_PACKAGE_TREEVIEW]: Handle it.
1186
1187 2012-12-19  Keith Marshall  <keithmarshall@users.sourceforge.net>
1188
1189         Make the "Apply Changes" dialogue "failure-aware".
1190
1191         * src/pkgtask.h (ACTION_APPLY_FAILED): Redefine, in terms of...
1192         (ACTION_INSTALL_FAILED, ACTION_REMOVE_FAILED): New manifest defines.
1193         (ACTION_UNSUCCESSFUL): New manifest constant; define it.
1194
1195         * src/pkgdata.cpp (pkgActionItem::EnumeratePendingActions):
1196         [ACTION_UNSUCCESSFUL]: Make it a special case for enumeration.
1197
1198         * src/guixmld.cpp (pkgApplyChanges): Enumerate...
1199         [ACTION_UNSUCCESSFUL > 0]: ...all such cases; when true...
1200         [IDD_AUTO_CLOSE_OPTION]: ...this; select alternative close-out
1201         messages, as appropriate.
1202         (pkgActionItem::Assert): Factor out; relocate to...
1203         * src/pkgexec.cpp (pkgActionItem::Assert): ...here; this moves its
1204         object code into the mingw-get DLL.
1205
1206         * src/pkgunst.cpp (pkgRemove) [ACTION_REMOVE_FAILED]:
1207         * src/pkginst.cpp (pkgInstall) [ACTION_INSTALL_FAILED]:
1208         Assert as appropriate.
1209
1210 2012-12-19  Keith Marshall  <keithmarshall@users.sourceforge.net>
1211
1212         Improve progress reporting in "Apply Changes" dialogue.
1213
1214         * src/pkgstat.h: New header file; it declares...
1215         (pkgSpinWait): ...this new pure abstract base class; it specifies an
1216         infrastructure for posting arbitrary text to dialogue controls.
1217
1218         * src/pkgexec.cpp (pkgSpinWait): Implement its static elements.
1219         (pkgActionItem::Execute): Dispatch progress reports, handled by...
1220         (pkgSpinWait::Report, pkgSpinWait::Indicator): ...these.
1221
1222         * src/guixmld.cpp (pkgDialogueSpinWait): New class; declare it and
1223         implement locally.  It is derived from, and provides a listener for...
1224         (pkgSpinWait): ...this abstract class.
1225         (pkgApplyChanges): Use it.
1226
1227         * src/tarproc.cpp (pkgTarArchiveInstaller::ProcessDataStream): Call...
1228         (pkgSpinWait::Report): ...this, to report extracted files.
1229
1230         * src/pkgunst.cpp (pkg_unst): Call...
1231         (pkgSpinWait::Report): ...this, to report deleted files.
1232
1233         * src/sysroot.cpp (pkgXmlDocument::UpdateSystemMap): Call...
1234         (pkgSpinWait::Report, pkgSpinWait::Indicator): ...these, to confirm
1235         continuing database update activity.
1236
1237 2012-12-18  Keith Marshall  <keithmarshall@users.sourceforge.net>
1238
1239         Update tab display on right-click in package list view.
1240
1241         * src/pkgdata.cpp (AppWindowMaker::OnNotify) [NM_RCLICK]:
1242         Call DataSheetMaker::DisplayData(), before invoking pop-up menu.
1243
1244 2012-12-17  Keith Marshall  <keithmarshall@users.sourceforge.net>
1245
1246         Add more protection against NULL pointer abuse.
1247
1248         * src/pkgbase.h (pkgActionItem::Reset): Method renamed to...
1249         * src/guixmld.cpp (pkgActionItem::Assert): ...this; also renamed here.
1250         (AppWindowMaker::OnCommand): When calling...
1251         (pkgListViewMaker::MarkScheduledActions): ...this, pass argument as...
1252         (pkgXmlDocument::ClearScheduledActions): ...pointer returned by this.
1253
1254         * src/pkgdata.cpp (AppWindowMaker::MarkSchedule):
1255         [pending_actions == NULL]: Do not propagate invocation request to...
1256         (pkgListViewMaker::MarkScheduledActions): ...this.
1257
1258         * src/pkglist.cpp (pkgListViewMaker::MarkScheduledActions):
1259         [schedule == NULL]: Do nothing.
1260
1261 2012-12-14  Keith Marshall  <keithmarshall@users.sourceforge.net>
1262
1263         Implement some additional permanent debugging support.
1264
1265         * src/pkgdeps.cpp (pkgXmlDocument::ResolveDependencies):
1266         [DEBUG_TRACE_DEPENDENCIES]: Enable DMH digest mode for messages.
1267
1268         * src/tarproc.cpp (pkgTarArchiveInstaller::ProcessDataStream):
1269         [DEBUG_TRACE_TRANSACTIONS]: Add logging of installed file path names.
1270
1271 2012-12-14  Keith Marshall  <keithmarshall@users.sourceforge.net>
1272
1273         Insert a missing snprintf format effector.
1274
1275         * src/pkgnget.cpp (pkgDownloadMeterGUI::Update): Add omitted '%'
1276         format specifier, in "%%", for formatting percentage-complete value.
1277         Rename "size_buf" automatic variable as "buf"; this results in shorter
1278         source lines, and consequently a tidier source code layout.
1279         (pkgDownloadMeterGUI::ResetGUI): Likewise s/size_buf/buf/
1280
1281 2012-12-14  Keith Marshall  <keithmarshall@users.sourceforge.net>
1282
1283         Add a missing header reference.
1284
1285         * src/approot.h: Include stdint.h; this ensures that wchar_t is
1286         properly typedef'd, before attempting to use it.
1287
1288 2012-12-12  Keith Marshall  <keithmarshall@users.sourceforge.net>
1289
1290         Make a clone of the package menu available as a pop-up.
1291
1292         * src/guimain.h (AppWindowMaker::SelectPackageAction): New private
1293         method; declare it.
1294
1295         * src/pkgdata.cpp (AppWindowMaker::SelectPackageAction): Implement it.
1296         (AppWindowMaker::OnNotify) [ID_PACKAGE_LISTVIEW]: Use it.
1297
1298 2012-12-12  Keith Marshall  <keithmarshall@users.sourceforge.net>
1299
1300         Improve conditionally enabled state manipulation for menu items.
1301
1302         * src/guidata.rc (IDM_REPO_APPLY): Set its initial state as GRAYED.
1303
1304         * src/pkgdata.cpp (AppWindowMaker::UpdatePackageMenuBindings):
1305         [IDM_PACKAGE_REINSTALL]: Always leave it GRAYED; this is a temporary
1306         provision, until the GUI is updated to support "reinstall" capability.
1307         [IDM_REPO_APPLY && !(EnumeratePendingActions > 0)]: Make it GRAYED.
1308         [IDM_REPO_APPLY && (EnumeratePendingActions > 0)]: Enable it.
1309
1310 2012-12-11  Keith Marshall  <keithmarshall@users.sourceforge.net>
1311
1312         Implement GUI bindings for processing a schedule of actions.
1313
1314         * src/guimain.h (IDD_DMH_CONSOLE): New resource ID; define it.
1315         (IDD_APPLY_EXECUTE): New dialogue template resource ID; define it.
1316         (AppWindowMaker::ExecuteScheduledActions): New method; declare it.
1317
1318         * src/guidata.rc (IDD_APPLY_EXECUTE): Implement dialogue template.
1319
1320         * src/guixmld.cpp (pkgApplyChanges): New thread function; implement it.
1321         (AppWindowMaker::OnCommand) [IDD_REPO_APPLY]: Use it; it is invoked...
1322         (IDD_APPLY_EXECUTE): ...via this dialogue box, subsequently calling...
1323         (AppWindowMaker::ExecuteScheduledActions): ...this; implement it.
1324
1325         * src/pkgexec.cpp (pkgActionItem::Execute): Add argument; use it.
1326         (pkgActionItem::~pkgActionItem): Unlink chained references.
1327
1328         * src/pkgbase.h (pkgActionItem::Execute): Adjust prototype.
1329
1330 2012-12-11  Keith Marshall  <keithmarshall@users.sourceforge.net>
1331
1332         Do not preserve unnecessary download requests.
1333
1334         * src/pkginet.cpp (pkgActionItem::DownloadArchiveFiles):
1335         [(flags & ACTION_INSTALL) != ACTION_INSTALL]: Actions having no
1336         "install" effect do not require a download; cancel any associated
1337         download request.
1338
1339 2012-12-10  Keith Marshall  <keithmarshall@users.sourceforge.net>
1340
1341         Implement GUI bindings for package download agent.
1342
1343         * src/guimain.h (IDD_PROGRESS_VAL, IDD_PROGRESS_MAX):
1344         (IDD_PROGRESS_PCT): New manifest resource IDs; define them.  They will
1345         be used to identify dialogue controls, to be associated with...
1346         (IDD_APPLY_DOWNLOAD): ...this new dialogue template ID; define it.
1347         (AppWindowMaker::DownloadArchiveFiles): New inline method; declare it.
1348
1349         * src/guidata.rc (IDD_APPLY_DOWNLOAD): Implement dialogue template.
1350
1351         * src/pkgbase.h (pkgActionItem::DownloadArchiveFiles): New public
1352         inline method; declare it.  It overloads an existing private method of
1353         the same name, which it subsequently invokes.
1354
1355         * src/pkginet.h: New header file; it declares...
1356         (pkgInvokeDownload): ...this new extern "C" function prototype, and...
1357         (pkgDownloadMeter): ...this abstract class; it is factored from its
1358         original implementation in pkginet.cpp, augmented by addition of...
1359         (pkgDownloadMeter::primary): New static member variable; declare it.
1360         (pkgDownloadMeter::UseGUI): New public method; implement it inline.
1361         (pkgDownloadMeter::ResetGUI): New public method; declare it, providing
1362         a do-nothing inline default implementation.  Any derived class, which
1363         supports GUI capability, should override this.
1364
1365         * src/pkgnget.cpp: New file; it implements...
1366         (pkgDownloadMeterGUI): New class, derived from pkgDownloadMeter.
1367         (pkgActionItem::DownloadArchiveFiles): New overloaded inline method.
1368         (AppWindowMaker::DownloadArchiveFiles): New inline method.
1369         (pkgInvokeDownload): New dialogue box worker thread handler.
1370
1371         * src/pkginet.cpp: Include pkginet.h; hence...
1372         (pkgDownloadMeter): ...remove redundant class declaration.
1373         (pkgDownloadMeter::primary): Define and initialise it.
1374         (pkgInternetStreamingAgent::Get) [pkgDownloadMeter::UseGUI]: Delegate
1375         progress metering to referenced pkgDownloadMeterGUI class instance.
1376         [! pkgDownloadMeter::UseGUI]: Continue to use the existing built-in
1377         pkgDownloadMeterTTY mechanism.
1378         (pkgActionItem::DownloadSingleArchive) [ACTION_DOWLOAD_FAILED]: Assert
1379         this initially; subsequently clear it on successful completion.
1380         (pkgActionItem::DownloadArchiveFiles): Collect diagnostic messages
1381         into a single DMH_BEGIN_DIGEST ... DMH_END_DIGEST group.
1382
1383         * src/guixmld.cpp: Include pkginet.h; it is required by...
1384         (AppWindowMaker::OnCommand) [IDD_REPO_APPLY]: Use pkgInvokeDownload.
1385
1386         * Makefile.in (GUIMAIN_OBJECTS): Include pkgnget.$OBJEXT
1387
1388 2012-12-08  Keith Marshall  <keithmarshall@users.sourceforge.net>
1389
1390         Implement "Discard" handler for GUI "Apply Changes" dialogue.
1391
1392         * src/pkgbase.h (pkgActionItem::Reset): New public method; declare it.
1393         (pkgActionItem::Clear): New public method; declare two overloaded
1394         variants, of which implement one inline.
1395         (pkgXmlDocument::ClearScheduledActions): New public method; declare
1396         and implement it inline.
1397
1398         * src/pkgtask.h (ACTION_DOWNLOAD_FAILED, ACTION_APPLY_FAILED): New
1399         manifest bit-flag constants; define them.  They provide a mechanism
1400         for blocking the discard event in respect of failed actions.
1401
1402         * src/guixmld.cpp (pkgActionItem::Reset): Implement it.
1403         (pkgActionItem::Clear): Implement second, out-of-line variant.
1404         (ACTION_PRESERVE_FAILED): New local manifest bit-flag constant; define
1405         it as an aggregate of ACTION_DOWNLOAD_FAILED and ACTION_APPLY_FAILED.
1406         (AppWindowMaker::OnCommand) [IDD_REPO_APPLY]: Use them.
1407
1408 2012-12-07  Keith Marshall  <keithmarshall@users.sourceforge.net>
1409
1410         Implement GUI dialogue for "Apply Changes" action approval.
1411
1412         * src/guidata.rc (ID_MAIN_WINDOW_MENU): Rename...
1413         ("&Repository"): ...this drop-down menu entry...
1414         ("&Installation"): ...this; add...
1415         ("&Apply Changes"): ...this new selection.
1416         (IDD_APPLY_APPROVE): New dialogue box resource template; define it.
1417         (SS_CTEXTBOX): New aggregate style convenience macro; define it.
1418         (ES_VT100): Likewise.
1419
1420         * src/guimain.h (IDM_REPO_APPLY): New resource ID; define it.
1421         (IDM_REPO_QUIT): Redefined resource ID; was 302; changed to 312.
1422         (IDD_APPLY_APPROVE, IDD_PROGRESS_TXT): New resource IDs; define them.
1423         (IDD_APPLY_REMOVES_PACKAGES, IDD_APPLY_REMOVES_SUMMARY): Likewise.
1424         (IDD_APPLY_INSTALLS_PACKAGES, IDD_APPLY_INSTALLS_SUMMARY): Likewise.
1425         (IDD_APPLY_UPGRADES_PACKAGES, IDD_APPLY_UPGRADES_SUMMARY): Likewise.
1426         (ID_APPLY, ID_DISCARD, ID_DEFER): New response IDs; define them.
1427         (AppWindowMaker::EnumerateActions): New inline method; declare it.
1428         (AppWindowMaker::DialogueResponse): New inline method; declare and
1429         implement it.
1430
1431         * src/guixmld.cpp (pkglist.h): #included.
1432         (dmh_setpty): Add locally declared prototype.
1433         (AppWindowMaker::EnumerateActions): Implement it.
1434         (pkgActionCount): New static helper function; implement it.
1435         (ACTION_APPLY, APPLIES_TO): New macros; define them.
1436         (FMT_APPLY_REMOVES, FMT_APPLY_INSTALLS, FMT_APPLY_UPGRADES): New
1437         manifest string constants; define them.
1438         (pkgApplyApproved): New static call-back function; implement...
1439         (AppWindowMaker::OnCommand) [IDM_REPO_APPLY]: ...and use it.
1440
1441 2012-12-06  Keith Marshall  <keithmarshall@users.sourceforge.net>
1442
1443         Implement enhanced action item enumeration capability.
1444
1445         * src/pkgbase.h (pkgActionItem::EnumeratePendingActions): New public
1446         method; declare it.  It provides the capability to enumerate scheduled
1447         actions, filtered by action classification; when invoked such that it
1448         selects all actions, it may be used as a replacement for...
1449         (pkgActionItem::Unapplied): ...this; delete declaration.
1450
1451         * src/pkgdata.cpp (pkgActionItem::EnumeratePendingActions): Implement
1452         it; it is derived, with enhancement, from original implementation...
1453         (pkgActionItem::Unapplied): ...of this; delete it, and...
1454         (AppWindowMaker::OnClose): ...update calling reference accordingly.
1455
1456 2012-12-05  Keith Marshall  <keithmarshall@users.sourceforge.net>
1457
1458         Implement PTY display emulation for GUI mode DMH.
1459
1460         * src/dmhcore.h (dmhTypeGeneric::set_console_hook): New public virtual
1461         method; declare it, providing inline default do-nothing implementation.
1462         (dmhTypeGeneric::severity_tag): New protected static method; declare it.
1463         (dmhTypeGeneric::notification_format): New protected static property;
1464         declare it.
1465
1466         * src/dmh.cpp (dmhTypeGeneric::severity_tag): Implement it.
1467         (dmhTypeGeneric::notification_format): Define and initialise it.
1468         (dmhTypeTTY::notify): Use them.
1469         (dmh_setpty): New function; declare prototype and implement it.
1470
1471         * src/guidmh.cpp (dmhTypePTY): New locally implemented class.
1472         (dmhTypeGUI::set_console_hook): New virtual method; declare and
1473         implement it; it stores a dmhTypePTY reference pointer into...
1474         (dmhTypeGUI::console_hook): ...this new private member variable.
1475         (dmhTypeGUI::dmhTypeGUI): Initialise it.
1476         (dmhTypeGUI::notify) [console_hook != NULL]: Delegate to it.
1477         (dmhTypeGUI::printf) [console_hook != NULL]: Likewise.
1478
1479 2012-12-03  Keith Marshall  <keithmarshall@users.sourceforge.net>
1480
1481         Implement generalised API for dialogue boxes with worker threads.
1482
1483         * src/guimain.h (pkgDialogueThread): New typedef; declare it.
1484         (AppWindowMaker::DialogueThread): New static property; declare it.
1485         (AppWindowMaker::DispatchDialogueThread): New method; declare it.
1486
1487         * src/guixmld.cpp: Formatting of several comments adjusted.
1488         (pkgUpdate, pkgInitDataLoad): Defunct functions; replaced by...
1489         (pkgDialogue): ...this new static call-back function; implement it.
1490         (AppWindowMaker::DialogueThread): Instantiate and initialise it.
1491         (AppWindowMaker::DispatchDialogueThread): Implement it.
1492         (AppWindowMaker::Invoked): Use it to invoke pkgInvokeInitDataLoad()...
1493         (AppWindowMaker::OnCommand): ...and pkgInvokeUpdate().
1494
1495 2012-12-03  Keith Marshall  <keithmarshall@users.sourceforge.net>
1496
1497         Consolidate GUI implementation for package list view management.
1498
1499         * src/pkglist.h (pkgListViewMaker::GetTitle): Disused overloaded
1500         method; remove all declarations.
1501         (pkgListViewMaker::GetVersionString): Disused method; remove
1502         declaration.
1503         (pkgListViewMaker::GetItem): New private inline method; declare it.
1504         (pkgListViewMaker::UpdateItem): New private method; declare it.
1505         (pkgListViewMaker::UpdateListView): New public method; declare it.
1506         (pkgListViewMaker::MarkScheduledActions): Likewise.
1507
1508         * src/guimain.h (AppWindowMaker::MarkSchedule): New public inline
1509         method; declare it, but defer implementation to...
1510
1511         * src/pkgdata.cpp (AppWindowMaker::MarkSchedule): ...here; not used
1512         elsewhere, it is derived from, and replaces...
1513         (pkgMarkSchedule): ...this function; factor out redundant code, in
1514         favour of delegation to pkgListViewMaker::MarkScheduledActions(), with
1515         following call to AppWindowMaker::UpdatePackageMenuBindings(); update
1516         calling function references...
1517         (AppWindowMaker::UnmarkSelectedPackage): ...here, and...
1518         (AppWindowMaker::Schedule): ...here.
1519
1520         * src/pkglist.cpp (pkgVersionString): New static function; implement
1521         it as a local replacement for...
1522         (pkgListViewMaker::GetVersionString): ...this defunct class method.
1523         (pkgGetTitle): New overloaded static function; implement two variants,
1524         as local replacements for...
1525         (pkgListViewMaker::GetTitle): ...this defunct overloaded class method.
1526         (pkgListViewMaker::UpdateItem): Implement it; factor code from...
1527         (pkgListViewMaker::InsertItem): ...here, whence use it.
1528         (pkgListViewMaker::MarkScheduledActions): Implement it.
1529         (pkgListViewMaker::UpdateListView): Implement it.
1530         (pkgListViewMaker::pkgListViewMaker): Remove references to...
1531         (LVIF_TEXT): ...this.
1532
1533 2012-11-30  Keith Marshall  <keithmarshall@users.sourceforge.net>
1534
1535         Increase width of window sash bars by 50%.
1536
1537         * src/guimain.h (SASH_BAR_THICKNESS): Increase from 4 to 6; this makes
1538         it easier to grab the sash bars, so they may be dragged; IMO, it also
1539         results in a better appearance.
1540
1541 2012-11-29  Keith Marshall  <keithmarshall@users.sourceforge.net>
1542
1543         Maintain consistent internal vs. external installation records.
1544
1545         * src/pkginst.cpp (pkgInstall): Set "installed" attribute on internal
1546         package reference, to "yes", after installation; CLI didn't need this,
1547         but GUI will do so, for any package revisited in a single session.
1548
1549         * src/pkgunst.cpp (pkgRemove): Similarly, negate "installed" attribute
1550         after package removal.
1551
1552 2012-11-17  Keith Marshall  <keithmarshall@users.sourceforge.net>
1553
1554         Refactor to consolidate three instances of duplicate code.
1555
1556         * src/pkglist.h (pkgGetStatus): New function; declare it.
1557         * src/pkglist.cpp (pkgGetStatus): Implement it; factor out from...
1558         (pkgListViewMaker::InsertItem): ...here, whence use it.
1559         * src/pkgdata.cpp (pkgMarkSchedule): Likewise here...
1560         (DataSheetMaker::DisplayGeneralData): ...and here.
1561
1562 2012-11-16  Keith Marshall  <keithmarshall@users.sourceforge.net>
1563
1564         Add GUI support for install, upgrade, and remove action scheduling.
1565
1566         * src/guimain.h (EXTERN_C): Ensure it is defined.
1567         (pkgActionItem): Add forward declaration of class name.
1568         (pkgMarkSchedule): New EXTERN_C function; declare and prototype it.
1569         (AppWindowMaker::OnClose): New virtual method; declare it.
1570         (AppWindowMaker::Schedule): New public method; declare it.
1571         (AppWindowMaker::UnmarkSelectedPackage): Likewise.
1572
1573         * src/pkgbase.h (pkgActionItem::HasAttribute) [this == NULL]: Add
1574         protective logic; ignore attempts to access non-existent objects.
1575         (pkgActionItem::SelectPackage) [this == NULL]: Likewise.
1576         (pkgActionItem::Selection) [this == NULL]: Likewise.
1577         (pkgActionItem::GetReference): New overloaded public method; declare
1578         prototype variant with argument type of pkgXmlNode*.
1579         (pkgActionItem::Unapplied): New public method; declare it.
1580         (pkgActionItem::CancelScheduledAction): Likewise.
1581         (pkgXmlDocument::Schedule): Change return type from void to
1582         pkgActionItem*; add default argument values.
1583
1584         * src/guixmld.cpp (AppWindowMaker::OnCommand): Add menu case hooks...
1585         [IDM_PACKAGE_INSTALL]: ...to schedule package 'install' action...
1586         [IDM_PACKAGE_UPGRADE]: ...package 'upgrade' action...
1587         [IDM_PACKAGE_REMOVE]: ...package 'remove' action, or...
1588         [IDM_PACKAGE_UNMARK]: ...to cancel any of these scheduling requests.
1589         [IDM_REPO_QUIT]: Correct typo; s/WM_QUIT/WM_CLOSE/ in comment.
1590
1591         * src/pkgdata.cpp (pkgMarkSchedule): Implement it.
1592         (pkgActionItem::CancelScheduledAction): Implement it.
1593         (pkgActionItem::Unapplied): Implement it.
1594         (AppWindowMaker::UpdatePackageMenuBindings): Improve comments.
1595         (AppWindowMaker::UnmarkSelectedPackage): Implement it.
1596         (AppWindowMaker::Schedule): Implement it.
1597         (AppWindowMaker::OnClose): Implement it.
1598
1599         * src/pkgdeps.cpp (pkgActionItem::GetReference): Implement overload.
1600         (pkgXmlDocument::Schedule): Change return type, and return value.
1601         [this == NULL]: Add protective logic; ignore non-existent objects.
1602         [name == NULL]: Do not schedule; just return existing action list.
1603
1604 2012-11-02  Keith Marshall  <keithmarshall@users.sourceforge.net>
1605
1606         Add dynamically enabled state control for package menu items.
1607
1608         * src/guimain.h (AppWindowMaker::UpdatePackageMenuBindings): New
1609         private method; declare it.
1610
1611         * src/pkgdata.cpp (AppWindowMaker::UpdatePackageMenuBindings):
1612         Implement it, and...
1613         (AppWindowMaker::OnNotify): ...use it.
1614
1615 2012-11-01  Keith Marshall  <keithmarshall@users.sourceforge.net>
1616
1617         Avoid excessive inter-word spaces in adjusted text.
1618
1619         * src/pkgdata.cpp (pkgTroffLayoutEngine::WriteLn): Check extent of
1620         padding to be added at each inter-word space, when adjusting text; do
1621         not adjust, if it exceeds 5% of available display pane width.
1622
1623 2012-11-01  Keith Marshall  <keithmarshall@users.sourceforge.net>
1624
1625         Elide unbreakable text which will not fit within display width.
1626
1627         * src/pkgdata.cpp (pkgTroffLayoutEngine::WriteLn): Add logic to detect
1628         over-width unbreakable text; elide characters from the right, to make
1629         it fit within the display width, with trailing ellipsis.
1630
1631 2012-11-01  Keith Marshall  <keithmarshall@users.sourceforge.net>
1632
1633         Add content compiler for package data sheet "general" tab.
1634
1635         * src/pkgbase.h (pkgActionItem::PrintURI): Make it public.  Add a
1636         call-back reference argument, for output function; assign puts() as
1637         default, where previously had hard coded printf() emulating puts()
1638
1639         * src/pkginet.cpp (pkgActionItem::PrintURI): Use call-back hook.
1640
1641         * src/pkgdata.cpp (DataSheetMaker::Display): New static property; it
1642         stores a reference to the active class instance, so static call-back
1643         methods may delegate processing requests to non-static methods.
1644         (DataSheetMaker::Advance): New static property; it is used to instruct
1645         call-back methods to interpose paragraph leading it the output stream.
1646         (DataSheetMaker::FormatRecord): New private method; implement it.
1647         (DataSheetMaker::FormatText): Don't pass "canvas" as an argument; we
1648         can access it directly as a class property.  Update all callers as
1649         necessary, to conform to modified function prototype.
1650         (pkgListSelection): New static function; implement it, and...
1651         (DataSheetMaker::OnPaint): ...use it in switch cases, when calling...
1652         [PKG_DATASHEET_GENERAL]: DataSheetMaker::DisplayGeneralData(), and...
1653         [PKG_DATASHEET_DESCRIPTION]: DataSheetMaker::DisplayDescription().
1654         (DataSheetMaker::DisplayGeneralData): New public method; implement it.
1655         (DataSheetMaker::DisplayPackageURL): New static method; implement it.
1656         (DataSheetMaker::DisplayLicenceURL): Likewise.
1657         (DataSheetMaker::DisplaySourceURL): Likewise.
1658
1659 2012-10-30  Keith Marshall  <keithmarshall@users.sourceforge.net>
1660
1661         Fix error in counting of catalogue files during loading.
1662
1663         * src/pkgbind.cpp (pkgRepository::GetPackageList): Increment count
1664         variable once only, at start of each cycle of the catalogue loading
1665         loop; previous strategy of counting in discrete logic paths could
1666         miss several required increments, particularly in CLI mode.
1667
1668 2012-10-27  Keith Marshall  <keithmarshall@users.sourceforge.net>
1669
1670         Avoid DMH message digest fragmentation when downloading.
1671
1672         * src/dmh.h (DMH_GET_CONTROL_STATE): New macro; define it.
1673         * src/pkginet.cpp (pkgInternetAgent::OpenURL): Use it; do not close
1674         locally opened message digest, when called with one already open.
1675
1676 2012-10-27  Keith Marshall  <keithmarshall@users.sourceforge.net>
1677
1678         Initiate progress metering for catalogue load and update operations.
1679
1680         * src/guidata.rc (IDD_REPO_UPDATE): New dialogue template; define it.
1681         (IDM_REPO_UPDATE): Enable selection from "Repository" drop-down menu.
1682
1683         * src/guimain.h (IDD_REPO_UPDATE, IDD_CLOSE_OPTIONS):
1684         (IDD_AUTO_CLOSE_OPTION, IDD_PROGRESS_BAR, IDD_PROGRESS_MSG): New
1685         resource identification manifest constants; define them.
1686         (pkgXmlNode, pkgProgressMeter): Add forward class declarations.
1687         (AppWindowMaker::AttachedProgressMeter): New private data; define...
1688         (AppWindowMaker::AppWindowMaker): ...and initialise it.
1689         (AppWindowMaker::AttachProgressMeter): New public method; declare it.
1690         (AppWindowMaker::DetachProgressMeter): Likewise.
1691         (AppWindowMaker::LoadPackageData, AppWindowMaker::ClearPackageList):
1692         (AppWindowMaker::UpdatePackageList): Make them public.
1693
1694         * src/pkgbase.h (pkgProgressMeter): New abstract class; declare it.
1695         (AppWindowMaker) [GUIMAIN_H undefined]: Add forward class declaration.
1696         (pkgXmlDocument::progress_meter): New private data member; declare...
1697         (pkgXmlDocument::pkgXmlDocument): ...and initialise it.
1698         (pkgXmlDocument::ProgressMeter, pkgXmlDocument::AttachProgressMeter):
1699         (pkgXmlDocument::DetachProgressMeter): New public inline methods;
1700         implement them.
1701
1702         * src/pkgview.cpp (WTK::GenericDialogue): Delete disused reference.
1703         (AppWindowMaker::OnCommand): Factor out implementation; relocate it...
1704         * src/guixmld.cpp: ...to here; thus it may utilise dependants of...
1705         (ProgressMeterMaker): ...this new locally implemented class.
1706         (AppWindowMaker::AttachProgressMeter): Implement it.
1707         (AppWindowMaker::AttachProgressMeter): Likewise.
1708         (pkgProgressMeter::~pkgProgressMeter): Likewise.
1709         (pkgUpdate, pkgInvokeUpdate): New static functions; implement them.
1710         (AppWindowMaker::Invoked): Replace direct call to LoadPackageData by
1711         an indirect invocation, via a progress metering dialogue box using...
1712         (pkgInitDataLoad): ...this new static callback function, invoking...
1713         (pkgInvokeInitDataLoad): ...this new static thread function, whence...
1714         (AppWindowMaker::LoadPackageData): ...this; add hook-up call to...
1715         (pkgXmlDocument::AttachProgressMeter): ...incorporate this.
1716
1717         * src/pkgbind.cpp (pkgRepository::total, pkgRepository::count): New
1718         private static properties; declare and instantiate them; provide...
1719         (pkgRepository::Reset, pkgRepository::IncrementTotal): ...new public
1720         static methods to manipulate them; declare and implement them inline.
1721         (pkgRepository::GetPackageList): Use them to manage updates to the
1722         pkgProgressMeter class instance, if any, which has been bound to
1723         the controlling pkgXmlDocument class instance, when invoking...
1724         (pkgXmlXmlDocument::BindRepositories): ...this.
1725
1726 2012-10-18  Keith Marshall  <keithmarshall@users.sourceforge.net>
1727
1728         Associate DMH message boxes with active dialogues.
1729
1730         * src/guidmh.cpp (last_active_popup): New static inline function.
1731         (dmhTypeGUI::dispatch_message): Use it.
1732
1733 2012-10-18  Keith Marshall  <keithmarshall@users.sourceforge.net>
1734
1735         Fix Diagnostic Message Handler initialisation logic.
1736
1737         * src/dmh.cpp (dmh_init) [DMH_SUBSYSTEM_GUI]: Correct a logic error;
1738         it previously fell through after any successful initialisation of the
1739         DMH_SUBSYSTEM_GUI handler, replacing it with a DMH_SUBSYSTEM_TTY type
1740         handler.  Also, assign a heap copy of the passed "progname" string
1741         resource, which is volatile, to ensure that the handler retains a
1742         valid reference.
1743
1744 2012-10-11  Keith Marshall  <keithmarshall@users.sourceforge.net>
1745
1746         Implement preliminary GUI mode data sheet compiler.
1747
1748         * src/guimain.h (DataSheetMaker): New class; forward declare it.
1749         (AppWindowMaker::InitPackageTabControl): New private method; declare it.
1750         (AppWindowMaker::DataSheet, AppWindowMaker::PackageTabControl):
1751         (AppWindowMaker::TabDataPane, AppWindowMaker::PackageTabPane): New
1752         private data members; declare them.
1753         (ID_SASH_WINDOW_PANE_CLASS): New string resource identifier; define it.
1754         (ID_PACKAGE_DATASHEET, ID_PACKAGE_TABPANE): New window identifiers;
1755         define them.
1756
1757         * src/guidata.rc (ID_SASH_WINDOW_PANE_CLASS): Specify string resource.
1758
1759         * src/pkgview.cpp (AppWindowMaker::OnSize): Add handler for...
1760         (ID_PACKAGE_TABPANE, ID_PACKAGE_TABCONTROL, ID_PACKAGE_DATASHHET):
1761         ...this group of sash pane child window entities.
1762         (AppWindowMaker::OnNotify): Comment out disused stub implementation.
1763
1764         * src/pkgshow.cpp (pkgUTF8Parser): Factor out class declaration...
1765         (UTF32_MAX, UTF32_OVERFLOW, UTF32_INVALID): ...these definitions...
1766         (utf32_t): ...and this typedef; relocate to, and #include...
1767         * src/pkgdata.h: ...this new header file.
1768
1769         * src/pkgdata.cpp (DataSheetMaker): New class; declare and implement it.
1770         (AppWindowMaker::InitPackageTabControl): Implement it.
1771         (AppWindowMaker::OnNotify): Reimplement it.
1772
1773         * Makefile.in (GUIMAIN_OBJECTS): Add pkgdata.OBJEXT
1774
1775         * src/guixmld.cpp (AppWindowMaker::Invoked): Add call to invoke
1776         AppWindowMaker::InitPackageTabControl()
1777
1778 2012-10-09  Keith Marshall  <keithmarshall@users.sourceforge.net>
1779
1780         Remove a grossly heuristic list view hack.
1781
1782         * src/pkglist.cpp (pkgListViewMaker::GetTitle): Remove code for the
1783         heuristic deletion of any redundant package name prefixes from package
1784         title attributes; by now, all such prefixes should have been removed
1785         from the catalogue, explicitly, at source.
1786
1787 2012-10-08  Keith Marshall  <keithmarshall@users.sourceforge.net>
1788
1789         Implement GUI list view compiler for XML catalogue.
1790
1791         * src/pkgview.cpp (AppWindowMaker::LayoutEngine): Add case handler...
1792         [pane_id == ID_PACKAGE_LISTVIEW]: ...for this window pane class.
1793
1794         * src/guimain.h (ID_PKGLIST_TABLE_HEADINGS):
1795         (ID_PKGNAME_COLUMN_HEADING, ID_PKGTYPE_COLUMN_HEADING):
1796         (ID_INSTVER_COLUMN_HEADING, ID_REPOVER_COLUMN_HEADING):
1797         (ID_PKGDESC_COLUMN_HEADING): New resource identifiers; define them.
1798         (ID_PKGSTATE_AVAILABLE, ID_PKGSTATE_AVAILABLE_NEW):
1799         (ID_PKGSTATE_AVAILABLE_LOCKED, ID_PKGSTATE_AVAILABLE_INSTALL):
1800         (ID_PKGSTATE_INSTALLED_CURRENT, ID_PKGSTATE_INSTALLED_LOCKED):
1801         (ID_PKGSTATE_INSTALLED_OLD, ID_PKGSTATE_UPGRADE, ID_PKGSTATE_REMOVE):
1802         (ID_PKGSTATE_REINSTALL, ID_PKGSTATE_DOWNGRADE, ID_PKGSTATE_BROKEN):
1803         (ID_PKGSTATE_PURGE): New icon resource identifiers; define them.
1804         (AppWindowMaker::InitPackageListView): New private method; declare it.
1805         (AppWindowMaker::UpdatePackageList): New private method; declare it.
1806         (AppWindowMaker::ClearPackageList): New private method; declare and
1807         implement it inline.
1808
1809         * src/guidata.rc (ID_PKGSTATE_AVAILABLE, ID_PKGSTATE_AVAILABLE_NEW):
1810         (ID_PKGSTATE_AVAILABLE_LOCKED, ID_PKGSTATE_AVAILABLE_INSTALL):
1811         (ID_PKGSTATE_INSTALLED_CURRENT, ID_PKGSTATE_INSTALLED_LOCKED):
1812         (ID_PKGSTATE_INSTALLED_OLD, ID_PKGSTATE_UPGRADE, ID_PKGSTATE_REMOVE):
1813         (ID_PKGSTATE_REINSTALL, ID_PKGSTATE_DOWNGRADE, ID_PKGSTATE_BROKEN):
1814         (ID_PKGSTATE_PURGE): New icon resources; implement them.
1815
1816         * icons/state01.ico icons/state02.ico icons/state03.ico:
1817         * icons/state04.ico icons/state05.ico icons/state06.ico:
1818         * icons/state07.ico icons/state08.ico icons/state09.ico:
1819         * icons/state10.ico icons/state11.ico icons/state12.ico:
1820         * icons/state13.ico: New files.  All are cloned from synaptic icons;
1821         see src/guimain.rc for symbolic/functional reference names.
1822
1823         * src/pkglist.h [GUIMAIN_H defined] (pkgListViewMaker): New class;
1824         declare it for use in modules which #include guimain.h
1825
1826         * src/pkglist.cpp: New file; it implements...
1827         (pkgListViewMaker): ...this new class, and its clients...
1828         (AppWindowMaker::InitPackageListView): New method.
1829         (AppWindowMaker::UpdatePackageList): Likewise.
1830
1831         * Makefile.in (GUIMAIN_OBJECTS): Add pkglist.OBJEXT
1832
1833         * src/guixmld.cpp (AppWindowMaker::Invoke): Call InitCommonControls(),
1834         as prerequisite to AppWindowMaker::InitPackageListView(); follow up by
1835         calling AppWindowMaker::AdjustLayout().
1836
1837 2012-10-07  Keith Marshall  <keithmarshall@users.sourceforge.net>
1838
1839         Add GUI initialiser hook for XML catalogue interface.
1840
1841         * src/guimain.h (AppWindowMaker::Invoke): New public method; declare
1842         it; it overrides the generic WTK::MainWindowMaker::Invoke() method, so
1843         providing the initialiser hook which will invoke this...
1844         (AppWindowMaker::LoadPackageData): ...new private method; declare it.
1845
1846         * src/guixmld.cpp: New file.
1847         (AppWindowMaker::Invoke): Implement it.
1848         (AppWindowMaker::LoadPackageData): Likewise.
1849
1850         * Makefile.in (GUIMAIN_OBJECTS): Add guixmld.OBJEXT
1851
1852 2012-09-29  Keith Marshall  <keithmarshall@users.sourceforge.net>
1853
1854         Add initial working GUI mode DMH class implementation.
1855
1856         * src/dmh.h (DMH_SEVERITY_MASK): New manifest constant; define it.
1857         (DMH_DIGEST_MASK, DMH_COMPILE_DIGEST, DMH_DISPATCH_DIGEST): Likewise.
1858         (DMH_BEGIN_DIGEST, DMH_END_DIGEST): Redefine in terms of above.
1859
1860         * src/dmhcore.h: New header file; it declares...
1861         (dmhTypeGeneric): ...this abstract base class, factored from...
1862
1863         * src/dmh.cpp (dmhTypeGeneric): ...here, whence remove it; it is
1864         still required, thus include dmhcore.h so that it remains visible.
1865         (dmh_exception): Remove errant namespace qualifier from constructor.
1866         (dmhTypeGUI): Delete class declaration and original constructor.
1867         (dmh_init): Delete reference to dmhTypeGUI; replace by call to...
1868         (dmh_init_gui): ...this new static function; it is a stub which
1869         invokes a DLL import of the same name, to instantiate a dmhTypeGUI.
1870         (dmhTypeGUI::control, dmhTypeGUI::notify, dmhTypeGUI::printf): Delete
1871         original method stubs.
1872
1873         * src/guidmh.cpp: New file; it reimplements...
1874         (dmhTypeGUI): ...this class; declare it and implement its constructor.
1875         (dmh_init_gui): Provide its DLL exported implementation.
1876         (dmhTypeGUI::dispatch_message): New private method; add it to the
1877         class declaration and implement it; it is a helper method for...
1878         (dmhTypeGUI::control, dmhTypeGUI::notify): ...these; implement them.
1879         (dmhTypeGUI::printf): Provide a replacement stub.
1880
1881         * Makefile.in (GUIMAIN_OBJECTS): Add guidmh.OBJEXT
1882
1883         * src/guimain.h (AppWindowMaker::Create): New method; add it to the
1884         class declaration; it overrides the default Create() method inherited
1885         from WTK::MainWindowMaker
1886
1887         * src/pkgview.cpp (AppWindowMaker::Create): Implement it; it handles
1888         window class registration and dmhTypeGUI initialisation, in addition
1889         to the inherited CreateWindow() behaviour.
1890
1891         * src/guimain.cpp: Include dmh.h
1892         (WinMain): Add catch block for dmh_exception.  Remove window class
1893         registration request; it is now delegated to AppWindowMaker::Create()
1894
1895 2012-09-26  Keith Marshall  <keithmarshall@users.sourceforge.net>
1896
1897         Add .hgignore as tracked file.
1898
1899         * .hgignore: New file.
1900
1901 2012-09-25  Keith Marshall  <keithmarshall@users.sourceforge.net>
1902
1903         Defer generation of version.c until "make" time.
1904
1905         * version.c.in: Move it...
1906         * src/version.c.in: ...to here.
1907         (PACKAGE_NAME, PACKAGE_VERSION, COPYRIGHT_HOLDER, YEARS_OF_ISSUE):
1908         Change substitution field marker character from "@" to "%".
1909
1910         * configure.ac (AC_CONFIG_FILES): Remove version.c
1911
1912         * Makefile.in (TAG_SCRIPT): New macro, factored out from...
1913         (RC_SCRIPT): ...here, whence use it; also use it to implement...
1914         (VERSION_SCRIPT): ...this further new macro; use it in...
1915         (%.c): ...this generic template rule for version.c
1916         (time-stamp, %.time, %.tagged.time, %.tag): New generic build
1917         goals; use them to track package release progression via...
1918         (build.tag): ...this new intermediate; make it a pre-requisite...
1919         (guidata.OBJEXT, version.c): ...of these.
1920
1921 2012-09-21  Keith Marshall  <keithmarshall@users.sourceforge.net>
1922
1923         Implement framework for GUI sash window layout controller.
1924
1925         * configure.ac (AC_INIT): Bump version number to 0.6
1926         (CLI_RELEASE_CLASS): New AC_SUBST variable; default to "beta".
1927         (GUI_RELEASE_CLASS): New AC_SUBST variable; default to "alpha".
1928         (SNAPSHOT_CLASS): Recognise as user specified environent variable
1929         override for both CLI_RELEASE_CLASS and GUI_RELEASE_CLASS.
1930         (RC): New AC_CHECK_TOOL substitution variable name; it replaces...
1931         (WINDRES): ...this, as reference name for the resource compiler.
1932         (MINGW_AC_ASSERT_MISSING): Add AC_CHECK_HEADER traps for missing
1933         "lua-dev" and "wtklite-dev" support.
1934
1935         * Makefile.in (CLI_RELEASE_CLASS, GUI_RELEASE_CLASS): Use them.
1936         (BUILD_TAG, RC_SCRIPT, RC_INCLUDES): New macros; define and use...
1937         (RC): ...with this, to implement new target rule for compiling...
1938         (%.rc): ...resource definition files to %.OBJEXT objects.
1939         (GUIMAIN_OBJECTS, GUIMAIN_LIBS): New macros; define and use...
1940         (guimain.EXEEXT): ...to implement build rule for this.
1941         (LIBEXEC_PROGRAMS): Add guimain.EXEEXT
1942         (lastrites.EXEEXT): Use GUI_LDFLAGS.
1943         
1944         * src/guimain.h src/guimain.cpp src/guidata.rc: New files.
1945         * src/pkgview.cpp: New file.
1946
1947 2012-09-20  Keith Marshall  <keithmarshall@users.sourceforge.net>
1948
1949         Adjust incorrectly resolved 2012-09-14 merge from master.
1950
1951         * src/Makefile.in: Restore lost reference to guistub.cpp
1952
1953 2012-09-14  Keith Marshall  <keithmarshall@users.sourceforge.net>
1954
1955         Implement GUI hooks in "rites of passage" internal API.
1956
1957         * src/pkglock.h: New file; it adds the pkgLock() and pkgRelease()
1958         inline wrapper functions, through which the GUI application acquires
1959         and manages an exclusive access lock for the XML catalogue.
1960
1961         * src/rites.c (lockfile_name): Explicitly cast memory allocated for
1962         the returned name to (char *), so this may be embedded in C++ code.
1963         (pkgInitRites): Factor out lock acquisition failure diagnostics...
1964         (pkgLockFail): ...to this inline helper function; conditionally...
1965         [ifdef GUIMAIN_H]: ...provide one implementation for GUI use...
1966         [ifndef GUIMAIN_H]: ...and an alternative for CLI use.
1967
1968 2012-09-14  Keith Marshall  <keithmarshall@users.sourceforge.net>
1969
1970         Be case agnostic when matching shortcut targets.
1971
1972         * scripts/libexec/unlink.js [ref.TargetPath == chklink]: Apply
1973         toLowerCase() on both sides of the comparison.
1974
1975 2012-09-12  Keith Marshall  <keithmarshall@users.sourceforge.net>
1976
1977         Note relocation of m4 when packaging source distribution.
1978
1979         * Makefile.in (SRCDIST_SUBDIRS): Refer to build-aux/m4, not m4.
1980
1981 2012-09-10  Keith Marshall  <keithmarshall@users.sourceforge.net>
1982
1983         Move guimain.cpp out of the way.
1984
1985         * src/guimain.cpp: Rename file as...
1986         * src/guistub.cpp: ...this; we want to keep current features for now,
1987         but to use the guimain.cpp name for main GUI application development.
1988         * Makefile.in: Adjust references accordingly.
1989
1990 2012-09-09  Keith Marshall  <keithmarshall@users.sourceforge.net>
1991
1992         Fix typo, and update licensing terms for embedded getopt.c
1993
1994         * src/getopt.c: Incorporate MIT/X style licence; update copyright
1995         notice, to reflect chronology of publication; correct degenerate RCS
1996         keyword usage in EOF marker comment.
1997
1998 2012-09-03  Keith Marshall  <keithmarshall@users.sourceforge.net>
1999
2000         Correct omission from copyright notice.
2001
2002         * src/pkgkeys.c: Add year 2012, to reflect 2012-09-02 update.
2003
2004 2012-09-02  Keith Marshall  <keithmarshall@users.sourceforge.net>
2005
2006         Redefine paragraph_key with project global scope.
2007
2008         * src/pkgkeys.h (paragraph_key): Declare it.
2009         * src/pkgkeys.c (paragraph_key): Define it.
2010
2011         * src/pkgshow.cpp (pkgDirectoryViewer::EmitDescription): Delete
2012         function local definition; use global definition instead.
2013
2014 2012-09-02  Keith Marshall  <keithmarshall@users.sourceforge.net>
2015
2016         Correct defect introduced by 2012-08-03 commit.
2017
2018         * src/approot.c (AppPathNameW): Add omitted 'else', so that tail
2019         pointer isn't moved after the APPROOT prefix is truncated.
2020
2021 2012-09-02  Keith Marshall  <keithmarshall@users.sourceforge.net>
2022
2023         Remap Mercurial subrepository reference via local hg-git clone.
2024
2025         * .hgsub (build-aux): Point to ../build-aux; this must be a locally
2026         hosted hg clone of the git origin repository, and it must pre-exist as
2027         a sibling of any created hg clone of the mingw-get repository.
2028
2029         * .hgsubstate: New file, automatically generated by Mercurial.
2030
2031 2012-08-31  Keith Marshall  <keithmarshall@users.sourceforge.net>
2032
2033         Add Mercurial subrepository reference for build-aux.
2034
2035         * .hgsub: New file.
2036
2037 2012-08-03  Keith Marshall  <keithmarshall@users.sourceforge.net>
2038
2039         More code refactoring, to facilitate GUI implementation.
2040
2041         * src/clistub.c (AppPathNameW): Factor out; relocate to...
2042         * src/approot.c: ...this new file; it reproduces the original
2043         implementation, modified to also consider any "libexec" directory in
2044         the executable path as the first child of the APPROOT prefix.  Note
2045         also, that no longer terminates APPROOT with a trailing backslash.
2046
2047         * src/approot.h: New file; it trivially declares the prototype for...
2048         (AppPathNameW): ...this relocated extern "C" function.
2049
2050         * src/clistub.c (main): Adapt usage of AppPathNameW(), to reinstate
2051         trailing backslash on assignment to APPROOT environment variable.
2052
2053         * Makefile.in (CLI_EXE_OBJECTS): New macro; define it as the original
2054         set of prerequisites, with the addition of approot.OBJEXT, for...
2055         (mingw-get.EXEEXT): ...this; use it.
2056
2057         * src/rites.c: Add comment regarding APPROOT usage.
2058
2059 2012-08-02  Earnie Boyd  <earnie@users.sourceforge.net>
2060
2061         Find missing.m4 in build-aux/m4 directory.
2062
2063         * aclocal.m4: Change path  m4/missing.m4 to build-aux/m4/missing.m4.
2064
2065 2012-07-31  Earnie Boyd  <earnie@users.sourceforge.net>
2066
2067         Add build-aux as a submodule.
2068         Move .cvsignore to .gitignore.
2069
2070         * .gitmodules: New file.
2071         * build-aux: New submodule directory.
2072         * .cvsignore: Remove.
2073         * .gitignore: New file.
2074
2075 2012-07-13  Keith Marshall  <keithmarshall@users.sourceforge.net>
2076
2077         Disable globbing of command line arguments.
2078
2079         * src/clistub.c (_CRT_glob): Define and initialise to zero; we don't
2080         need globbing, and it may cause case transliteration of case-sensitive
2081         action keywords, when a file system entity with a case-insensitively
2082         matching name exists.
2083
2084 2012-06-02  Keith Marshall  <keithmarshall@users.sourceforge.net>
2085
2086         Refactor API to facilitate implementation of GUI ListView hooks.
2087
2088         * src/pkgkeys.h (title_key, description_key): Declare them.
2089         * src/pkgkeys.c (title_key, description_key): Define them; relocate...
2090         * src/pkgshow.cpp (pkgDirectoryViewer::EmitDescription): ...from here.
2091         (pkgXmlDocument::CalalogueAllPackages): New public method; factor...
2092         (pkgXmlDocument::DisplayPackageInfo): ...from here, whence use it.
2093         (pkgDirectoryViewerEngine::EnumerateComponents): New private method;
2094         implement as a concrete method of this abstract base class; factor...
2095         (pkgDirectoryViewer::Dispatch): ...from original inline implementation
2096         within this method of the concrete derived class, whence use it.
2097         (pkgDirectoryViewerEngine, pkgDirectory): Factor class declarations...
2098         * src/pkglist.h: ...into this new header file; include it.
2099
2100         * src/pkgbase.h (pkgDirectory): Add forward class declaration.
2101         (pkgXmlDocument::CatalogueAllPackages): Declare it.
2102
2103 2012-05-02  Keith Marshall  <keithmarshall@users.sourceforge.net>
2104
2105         Update help text to document package version selection capability.
2106
2107         * src/clistub.c (help_text): Add description of command line syntax
2108         which may be used to specify an alternative to the default package
2109         version selection, for install and upgrade actions.
2110
2111 2012-05-01  Keith Marshall  <keithmarshall@users.sourceforge.net>
2112
2113         Support options set by preferences assigned within profile.xml
2114
2115         * xml/profile.xml (preferences): New element; add defaults.
2116
2117         * src/pkgopts.h (OPTION_ASSIGNED_FLAGS, OPTION_DESKTOP_ARGS):
2118         (OPTION_START_MENU_ARGS): New enumerated constants; define them.
2119         (OPTION_DESKTOP, OPTION_START_MENU): New manifest constants.
2120         (OPTION_ASSIGNED, mark_option_as_set): New macros; define them.
2121         (pkgOpts::GetValue, pkgOpts::GetString): Restrict look-up index to
2122         least significant 12-bits of full-range index value.
2123         (pkgOpts::IsSet): New inline method; implement it.
2124
2125         * src/clistub.c (main): Reimplement --desktop and --start-menu
2126         options; each now becomes an OPTION_GENERIC optarg string store.
2127         (set_script_hook): Function no longer used; delete it; delegate to...
2128         * src/pkgbase.h (pkgXmlDocument::EstablishPreferences): ...this new
2129         method; declare it, providing its implementation in...
2130         * src/pkgopts.cpp: ...this new file; invoke it...
2131         * src/climain.cpp (climain): ...here.
2132
2133         * Makefile.in (CORE_DLL_OBJECTS): Add pkgopts.$OBJEXT
2134
2135 2012-04-30  Keith Marshall  <keithmarshall@users.sourceforge.net>
2136
2137         Correct sequence of installation/removal progress reporting.
2138
2139         * src/pkgunst.cpp (pkgRemove): Delay output of "removing package ..."
2140         message, until after pre-remove hooks have run; this ensures that any
2141         output from the pre-remove hook scripts appears in correct sequence.
2142
2143         * src/pkginst.cpp (pkgInstall): Likewise, for "installing package ..."
2144         message, in relation to pre-install hooks.
2145
2146 2012-04-26  Keith Marshall  <keithmarshall@users.sourceforge.net>
2147
2148         mingw-get-0.5-beta-20120426-1 released.
2149
2150         * configure.ac (AC_INIT): Version number updated.
2151         * srcdist-doc/NEWS.in: Updated; bug-fix notifications added.
2152         * All files (r0-5-beta-20120426-1): Tag assigned.
2153
2154 2012-04-25  Keith Marshall  <keithmarshall@users.sourceforge.net>
2155
2156         Interim work-around for MinGW-Bug #3520864.
2157
2158         * src/pkgdeps.cpp (pkgXmlDocument::ResolveDependencies):
2159         [DEBUG_TRACE_DEPENDENCIES]: Add request flags to messages reporting
2160         the scheduling of installation activities.
2161
2162         * src/pkgexec.cpp (pkgXmlDocument::Schedule): Add temporary diagnostic
2163         hooks to confirm request flags; bracket them with #if 0 ... #endif.
2164         [ACTION_PRIMARY && pre-scheduled request]: Don't trash request flags
2165         when updating the pre-existing action item data.
2166
2167 2012-04-23  Keith Marshall  <keithmarshall@users.sourceforge.net>
2168
2169         Fix MinGW-Bug #3520488
2170
2171         * src/pkgexec.cpp (action_code): Check for, and reject NULL pointer
2172         passed as action request string; also reject ambiguous abbreviations.
2173
2174         * src/climain.cpp (climain): Discriminate between NULL pointer and
2175         other forms of invalid action keyword matching failures.
2176
2177 2012-04-16  Keith Marshall  <keithmarshall@users.sourceforge.net>
2178
2179         mingw-get-0.5-beta-20120416-1 released.
2180
2181         * configure.ac (AC_INIT): Version number updated.
2182         (YEARS_OF_ISSUE): 2012 added.
2183
2184         * srcdist-doc/NEWS.in: Updated; release notes added.
2185         * All files (r0-5-beta-20120416-1): Tag assigned.
2186
2187 2012-04-16  Keith Marshall  <keithmarshall@users.sourceforge.net>
2188
2189         Assign icon to temporary GUI executable file.
2190
2191         * icons/pkgicon.ico: New file, shamelessly copied from synaptic.
2192
2193         * configure.ac: Add identification for windres; propagate it to...
2194         * Makefile.in: ...here; use it to compile object from icon files...
2195         (srcdir/icons) [%.ico]: ...from this new vpath location.
2196         (gui.exe): Link to compiled icon's object file.
2197         (SRCDIST_SUBDIRS): Add icons directory.
2198
2199 2012-04-15  Keith Marshall  <keithmarshall@users.sourceforge.net>
2200
2201         Ensure that package removal requests are correctly scheduled.
2202
2203         * src/pkgdeps.cpp (pkgXmlDocument::Schedule) [ACTION_REMOVE]: Schedule
2204         as a distinct case, when the installed version is not the most recent
2205         available release; consideration of this distinct case was previously
2206         erroneously overlooked.
2207
2208 2012-04-15  Keith Marshall  <keithmarshall@users.sourceforge.net>
2209
2210         Correct scheduling of new prerequisites when upgrading.
2211
2212         * src/pkgdeps.cpp (pkgXmlDocument::ResolveDependencies):
2213         [ACTION_UPGRADE && ACTION_PRIMARY]: Don't exclude scheduling for this
2214         case of a prerequisite with no previously installed version; it may be
2215         a delegated primary requirement of a meta-package.
2216
2217 2012-04-15  Keith Marshall  <keithmarshall@users.sourceforge.net>
2218
2219         Don't require subsystem within user specified version bounds.
2220
2221         * src/pkgdeps.cpp (pkgActionItem::ApplyBounds): Automatically consider
2222         "*" wild-card matches for subsystem, if user doesn't specify it.
2223
2224 2012-04-09  Charles Wilson  <mingw@cwilson.fastmail.fm>
2225
2226         Fix missing include.
2227
2228         * src/pkgdeps.cpp (pkgopts.h): Include unconditionally; do not rely...
2229         (debug.h) [DEBUG_TRACE_DYNAMIC]: ...on this, for indirect inclusion.
2230
2231 2012-04-07  Keith Marshall  <keithmarshall@users.sourceforge.net>
2232
2233         Correct a srcdist package construction defect.
2234
2235         * Makefile.in (srcdist) [for SRCDIST_SUBDIRS]: Use...
2236         (mkinstalldirs): ...this, to create package image directories.
2237
2238 2012-04-06  Keith Marshall  <keithmarshall@users.sourceforge.net>
2239
2240         Add scripting hooks to support creation of MS-Windows shortcuts.
2241
2242         * src/clistub.c (progname): New static variable with file scope; it
2243         replaces former automatic variable, of same name, in main() function.
2244         (set_script_hook): New static function; implement it, and call it...
2245         (main) [--desktop, --start-menu]: ...from here, to interpret these new
2246         command line options; they are propagated to scripts via...
2247         (MINGW_GET_DESKTOP_HOOK, MINGW_GET_START_MENU_HOOK): ...these new
2248         internally assigned environment variables.
2249         (help_text): Document --desktop and --start-menu.
2250
2251         * scripts/libexec/setup.lua scripts/libexec/wsh.lua: New lua module
2252         files; they implement a lua scripting API; they delegate requests to
2253         the Windows Scripting Host, via either of this pair of...
2254         * scripts/libexec/shlink.js: ...new script to create shortcuts, or...
2255         * scripts/libexec/unlink.js: ...its complement, to remove them.
2256         * Makefile.in (SRCDIST_SUBDIRS): Integrate them; enumerate them in...
2257         (scripts_srcdir, LIBEXEC_SCRIPTS): ...these new macros; use to...
2258         (install): ...install them.
2259
2260 2012-04-06  Keith Marshall  <keithmarshall@users.sourceforge.net>
2261
2262         Initialise $LUA_PATH to locate mingw-get specific scripts.
2263
2264         * src/pkgexec.cpp (lua_path_init): New static inline function.
2265         (pkgXmlNode::DispatchScript): Call it on first time invocation, per...
2266         [lua_path_setup == false]: ...this static function local variable.
2267
2268 2012-04-01  Keith Marshall  <keithmarshall@users.sourceforge.net>
2269
2270         Support installation of releases other than latest available.
2271
2272         * src/pkgbase.h (pkgActionItem::ApplyBounds): New method; declare it.
2273
2274         * src/pkgdeps.cpp (pkgActionItem::ApplyBounds): Implement it.
2275         (pkgXmlDocument::Schedule): Use it to interpret user specified version
2276         bounds, and apply them to scheduled action items.  Having used...
2277         (get_version_bounds): ...this new static inline function...
2278         ...to acquire any user specified version bounds, check that they can
2279         be honoured, before scheduling any action; delegate diagnostics to...
2280         (dmh_notify_no_match): ...this new local helper function, to report
2281         when they can't, and to indicate viable alternatives.
2282
2283 2012-03-26  Keith Marshall  <keithmarshall@users.sourceforge.net>
2284
2285         Rework previously inadequate solution for MinGW-Bug #3424406
2286
2287         * src/pkgtask.h: Update copyright notice for current year.
2288         (ACTION_MAY_SELECT): New manifest constant for use as flag; define it.
2289         * src/pkgexec.cpp (pkgActionItem::SelectIfMostRecentFit): Assign it.
2290
2291         * src/pkgdeps.cpp (STATIC_INLINE): New macro; define it.
2292         (ACTION_RECURSIVE_REINSTALL, ACTION_RECURSIVE_UPGRADE):
2293         (ACTION_RECURSIVE_REPLACE): New action code constants; define them.
2294         (with_flags): Original macro deleted; replace it with...
2295         (with_request_flags): ...this new static inline function.
2296         (if_noref, if_match, if_alias, with_download, promote): New static
2297         inline functions; they replace original macros of the same names.
2298         (is_recursive_action): Function no longer used; delete it.
2299         (action_class): New static inline function; implement and use it...
2300         (pkgXmlDocument::ResolveDependencies): ...here, to identify scheduling
2301         requirements for packages which are already installed; depends on...
2302         (request_mode): ...this new automatic variable; it augments and...
2303         (recursive_mode): ...replaces this one; rename it accordingly.
2304         (viable): Automatic variable no longer used; delete it.
2305         [DEBUG_REQUEST & DEBUG_TRACE_DEPENDENCIES]: Emit notification for
2306         scheduled installation.
2307         (pkgXmlDocument::Schedule): Add an implied...
2308         (ACTION_REMOVE): ...when scheduling a reinstallation.
2309
2310 2012-03-13  Keith Marshall  <keithmarshall@users.sourceforge.net>
2311
2312         Address reinstallation issues per MinGW-Bugs #3416013 and #3424406
2313
2314         * src/pkgexec.cpp (reinstall_action_scheduled): New inline function.
2315         (pkgActionItem::Execute): Use it to identify cases where...
2316         [--reinstall]: ...implicit package removal is required, and also to
2317         facilitate improved progress reporting in such cases.
2318
2319         * src/pkgdeps.cpp (is_recursive_action): New inline function.
2320         (pkgXmlDocument::ResolveDependencies): Use it in tandem with...
2321         (recursive_mode): ...this new automatic variable, so as to handle...
2322         [meta-package dependency]: ...implicit recursion, to extend the scope
2323         of the current action to the first level of non-meta dependency.
2324         [install --reinstall]: ...reinstall original version of nominated
2325         package, ignoring any available upgrade; extend scope of operation...
2326         [install --reinstall --recursive]: ...to all prerequisite packages.
2327         [upgrade --reinstall]: ...upgrade nominated package if possible; if no
2328         upgrade available, reinstall current version; extend scope...
2329         [upgrade --reinstall --recursive]: ...to all prerequisites.
2330         (pkgXmlDocument::Schedule): Partially revert 2012-03-05 change;
2331         reimplement selectively; never promote...
2332         [install, install --reinstall]: ...these operations to become...
2333         [upgrade]: ...this, even if available; issue diagnostic instead.
2334
2335 2012-03-12  Keith Marshall  <keithmarshall@users.sourceforge.net>
2336
2337         Rationalise implementation and usage of --all-related option.
2338
2339         * src/pkgopts.h: Update copyright notice; add year 2012.
2340         (OPTION_RECURSIVE, OPTION_ALL_RELATED): New constants; define them.
2341         (pkgOpts::SetFlags): New method; declare and implement it inline.
2342
2343         * src/clistub.c: Update copyright notice; add year 2012.
2344         (options) [recursive, all-related]: Redefine in terms of...
2345         (OPTION_RECURSIVE, OPTION_ALL_RELATED): ...these.
2346         (help_text): Update appropriately.
2347
2348         * src/climain.cpp: Update copyright notice; add year 2012.
2349         (climain) [all-related]: Associate its use exclusively with...
2350         (source, licence): ...these package processing operations; use...
2351         (pkgOptions::SetFlags): ...this, to propagate its effect.
2352
2353 2012-03-12  Keith Marshall  <keithmarshall@users.sourceforge.net>
2354
2355         Don't report failed downloads in respect of virtual packages.
2356
2357         * src/pkginet.cpp (pkgActionItem::DownloadArchiveFiles): Clear...
2358         [ACTION_DOWNLOAD]: ...this status flag for any package identified as
2359         a meta-package; this corrects a further regression introduced with the
2360         2011-11-09 update, whereby pending download requests for such virtual
2361         packages were not cancelled, resulting in failure to install due to
2362         failed downloads, when no download is actually required.
2363
2364 2012-03-05  Keith Marshall  <keithmarshall@users.sourceforge.net>
2365
2366         Don't suppress implied downloads for top-level actions.
2367
2368         * src/pkgdeps.cpp: Update copyright notice for new year.
2369         (pkgXmlDocument::Schedule) [!OPTION_PRINT_URIS]: Ensure that...
2370         [ACTION_DOWNLOAD]: ...this is enabled, when scheduling an install or
2371         an upgrade action for a package specified as a command line argument;
2372         this corrects a regression introduced on 2011-11-09, which resulted in
2373         ACTION_DOWNLOAD being enabled only for second tier dependent actions.
2374
2375 2012-02-20  Keith Marshall  <keithmarshall@users.sourceforge.net>
2376
2377         Copyright notice updates.
2378
2379         * Makefile.in: Add 2012 as year of republication.
2380         * src/pkgbase.h src/sysroot.cpp src/pkgexec.cpp: Likewise.
2381         * src/rites.c src/pkginst.cpp src/pkgunst.cpp: Likewise.
2382
2383 2012-02-20  Keith Marshall  <keithmarshall@users.sourceforge.net>
2384
2385         Fix ill-advised optimisation in $APPROOT environment lookup.
2386
2387         * src/rites.c (approot_path): Don't save result of getenv() lookup
2388         across calls; the environment may have been moved in the interim,
2389         making the original result invalid on any subsequent call.  Also,
2390         prefer MS-Windows style (with backslashes) for default.
2391         (pkgLastRites): Report full path name for lastrites.exe, on execl()
2392         failure, rather than only the path relative to $APPROOT.
2393
2394 2012-02-20  Keith Marshall  <keithmarshall@users.sourceforge.net>
2395
2396         Propagate sysroot path settings to scripts via the environment.
2397
2398         * src/pkgbase.h (PKG_PUTENV_FLAGS_MASK): New constant; it maps...
2399         (PKG_PUTENV_DIRSEP_MSW, PKG_PUTENV_DIRSEP_POSIX): ...these flags...
2400         (PKG_PUTENV_SCAN_VARNAME, PKG_PUTENV_NAME_TOUPPER): ...and these;
2401         they are used to specify optional behavioural choices for...
2402         (pkgPutEnv): ...this new function; declare it.
2403
2404         * src/sysroot.cpp (pkgPutEnv): Implement it.
2405         (pkgXmlDocument::LoadSystemMap): Use it to add $SUBSYSTEM_SYSROOT path
2406         specifications to the environment, for each named subsystem associated
2407         with the active system map.
2408
2409         * src/pkgexec.cpp (pkgActionItem::Execute): Invoke pkgPutEnv() prior
2410         to processing of each package install, upgrade, or remove action, so
2411         as to update environment variable $SYSROOT to represent the sysroot
2412         path for each package processed, during execution of script hooks.
2413
2414 2012-02-17  Keith Marshall  <keithmarshall@users.sourceforge.net>
2415
2416         Implement hooks to support lua scripting interface.
2417
2418         * Makefile.in (LIBS): Add -llua.
2419
2420         * src/pkgbase.h (pkgXmlNode::InvokeScript): New method; declare it
2421         as private, and provide overloaded public inline API implementation.
2422         (pkgXmlNode::DispatchScript): New private method; declare it.
2423
2424         * src/pkgexec.cpp (pkgXmlNode::InvokeScript): Implement it.
2425         (pkgXmlNode::DispatchScript): Likewise; it directs InvokeScript to...
2426         (pkgInvokeScript): ...this new static function; implement it.
2427
2428         * src/pkginst.cpp (pkgInstall): Call InvokeScript as appropriate.
2429         * src/pkgunst.cpp (pkgRemove): Likewise.
2430
2431 2011-11-24  Keith Marshall  <keithmarshall@users.sourceforge.net>
2432
2433         Avoid implicit cast warnings; reported by Robert Hartmann.
2434
2435         * src/dmh.h (DMH_BEGIN_DIGEST): Explicitly cast to uint16_t.
2436         (DMH_END_DIGEST): Likewise.
2437
2438 2011-11-09  Keith Marshall  <keithmarshall@users.sourceforge.net>
2439
2440         Avoid unnecessary downloads for already installed packages.
2441
2442         * src/pkginet.cpp (pkgActionItem::DownloadSingleArchive): Require
2443         external scheduling of ACTION_DOWNLOAD; cancel the scheduled request
2444         on completion, or when not required due to pre-existing local copy.
2445
2446         * src/climain.cpp (pkgActionItem::GetSourceArchive): Must always be
2447         prepared to download the associated archive; enable ACTION_DOWNLOAD.
2448
2449         * src/pkgexec.cpp (pkgActionItem::Schedule) [OPTION_REINSTALL]:
2450         May need to download the archive, even when the requested package was
2451         previously installed; schedule ACTION_DOWNLOAD to enable this.
2452
2453         * src/pkgdeps.cpp (promote): Macro redefined in terms of...
2454         (with_flags, with_download): ...these new macros; implement and...
2455         (pkgXmlDocument::ResolveDependencies): ...use them to enable/schedule
2456         ACTION_DOWNLOAD only when expected that it may be necessary.
2457
2458 2011-11-06  Keith Marshall  <keithmarshall@users.sourceforge.net>
2459
2460         Fix packaging anomalies for source and licence distributions.
2461
2462         * Makefile.in (licdist): Link README from ${CURDIR}, not from '..'.
2463         (srcdist): Explicitly link pkginfo.c from ${CURDIR} to src/pkginfo,
2464         rather than as implied prerequisite; this avoids a bogus attempt to
2465         link srcdist-doc into src/pkginfo.
2466
2467 2011-11-06  Keith Marshall  <keithmarshall@users.sourceforge.net>
2468
2469         Bump version number for subsequent CVS snapshots.
2470
2471         * configure.ac (AC_INIT): Set version to 0.4-alpha-1.1cvs
2472
2473 2011-11-06  Keith Marshall  <keithmarshall@users.sourceforge.net>
2474
2475         mingw-get-0.4-mingw32-alpha-1 released.
2476
2477         * configure.ac (AC_INIT): Adjust version number.
2478         * srcdist-doc/NEWS.in: Updated; document new features and bugs fixed.
2479         * All files (r0-4-alpha-1): Tag assigned.
2480
2481 2011-11-04  Keith Marshall  <keithmarshall@users.sourceforge.net>
2482
2483         Don't upgrade installed DLL components to incompatible version.
2484         Provide clearer diagnostics for failed requests on implied packages.
2485
2486         * src/pkgdeps.cpp (is_abi_compatible): New static inline function.
2487         (pkgXmlDocument::ResolveDependencies) [is_installed]: Use it.
2488         (pkgXmlDocument::ResolveDependencies) [DEBUG_TRACE_DEPENDENCIES]:
2489         Clean up and improve diagnostic message content and formatting.
2490         (pkgXmlDocument::Schedule) [(upgrade || remove) && ! installed]:
2491         Downgrade diagnostic to WARNING, for implicitly specified component
2492         packages; provide additional explanatory diagnostics.
2493
2494         * src/pkgspec.cpp (pkgSpecs::VersionComparator):
2495         * src/pkgexec.cpp (pkgActionItem::SelectIfMostRecentFit):
2496         [DEBUG_TRACE_DEPENDENCIES]: Eliminate diagnostic noise.
2497
2498 2011-10-11  Keith Marshall  <keithmarshall@users.sourceforge.net>
2499
2500         Fix --download-only vs. --reinstall conflict.
2501
2502         * src/pkgexec.cpp (pkgActionItem::Execute) [OPTION_DOWNLOAD_ONLY]:
2503         Test for explicit inequality, rather than equality to zero; since the
2504         2011-08-30 update, which made --download-only also imply --reinstall,
2505         it will test as non-zero when --reinstall is specified, even though
2506         --download-only is not.
2507
2508 2011-10-07  Keith Marshall  <keithmarshall@users.sourceforge.net>
2509
2510         Add support for non-specific upgrade of all installed packages.
2511
2512         * src/pkgbase.h (pkgXmlDocument::RescheduleInstalledPackages):
2513         New public method; declare it.
2514
2515         * src/pkgdeps.cpp (pkgXmlDocument::RescheduleInstalledPackages):
2516         Implement it.
2517
2518         * src/climain.cpp (climain) [ACTION_UPGRADE && argc < 2]: Invoke
2519         pkgXmlDocument::RescheduleInstalledPackages() to schedule the upgrade
2520         request for all packages currently registered as installed.
2521
2522 2011-10-06  Keith Marshall  <keithmarshall@users.sourceforge.net>
2523
2524         Implement "source" and "licence" operations.
2525
2526         * src/pkgopts.h (OPTION_ALL_DEPS): New option code; define it.
2527         * src/clistub.c (main): Associate it with...
2528         (all-related, recursive): ...these synonymous option names...
2529         (options): ...defined within this local structured array.
2530         (help_text): Document them; also document "source" and "licence" as
2531         new operations which may be specified on the command line.
2532
2533         * src/pkgtask.h (action_source, action_licence): Enumerate them.
2534         (ACTION_SOURCE, ACTION_LICENCE): Define their manifest values, and...
2535         * src/pkgexec.cpp (action_name): ...associate with operation names.
2536
2537         * src/pkgbase.h (pkgActionItem::GetScheduledSourceArchives):
2538         (pkgActionItem::GetSourceArchive, pkgXmlDocument::GetSourceArchive):
2539         New public methods; declare them for external implementation.
2540         (pkgXmlDocument::GetScheduledSourceArchives): New public method;
2541         implement it as inline.
2542
2543         * src/climain.cpp (pkgProcessedArchives): New pointer to stack of...
2544         (pkgArchiveNameList): ...this new locally defined class; implement it.
2545         (pkgActionItem::GetSourceArchive, pkgXmlDocument::GetSourceArchive):
2546         (pkgActionItem::GetScheduledSourceArchives): Implement them.
2547         (climain): Add invocation hooks.
2548
2549 2011-10-04  Keith Marshall  <keithmarshall@users.sourceforge.net>
2550
2551         Establish mapping from release tarname to source tarname.
2552
2553         * src/pkgreqs.cpp (inherited_requirement): New inline function.
2554         (requirement): Use it; adapt to propagate release archive format and
2555         compression type fields, in addition to version fields, when resolving
2556         "%" wildcard matches within the template for the resultant tarname.
2557         (pkgAssociateName): New public function; implement it for use by...
2558         * src/pkgname.cpp (pkgResolvedName): ...this new inline function.
2559         (pkgXmlNode::SourceArchiveName): Use it; adapt to accept a category
2560         selector, so it may resolve source or licence tarnames on demand.
2561
2562         * src/pkgbase.h (pkgXmlNode::SourceArchiveName): Modify declaration;
2563         add category selector argument to support source/licence choice.
2564
2565 2011-10-02  Keith Marshall  <keithmarshall@users.sourceforge.net>
2566
2567         Facilitate downloads using diverse cache directories.
2568
2569         * src/pkgbase.h (pkgActionItem::DownloadSingleArchive): New private
2570         method; declare it; it handles the download for a single named archive
2571         file, and stores it in a specifed cache directory.
2572
2573         * src/pkginet.cpp (pkgActionItem::DownloadSingleArchive): Implement
2574         it; factor its code from the original implementation within...
2575         (pkgActionItem::DownloadArchiveFiles): ...this; adapt to use it.
2576
2577 2011-10-02  Keith Marshall  <keithmarshall@users.sourceforge.net>
2578
2579         Establish cache directory for source archive downloads.
2580
2581         * src/mkpath.h (pkgSourceArchivePath): New function; declare it.
2582         * src/mkpath.c (pkgSourceArchivePath): Implement it.
2583
2584 2011-08-30  Keith Marshall  <keithmarshall@users.sourceforge.net>
2585
2586         Support archive extraction to arbitrary destination without install.
2587
2588         * src/pkgproc.h (pkgArchiveProcessor::ExtractFile): New virtual
2589         helper method for use, as core helper, by derived classes; declare it.
2590         (pkgArchiveProcessor::CreateExtractionDirectory): Likewise.
2591         (pkgTarArchiveProcessor): Declare overloaded default constructor.
2592         (pkgTarArchiveExtractor): New class definition; it is derived from
2593         pkgTarArchiveProcessor.
2594
2595         * src/tarproc.cpp (pkgArchiveProcessor::ExtractFile): Implement it.
2596         (pkgArchiveProcessor::CreateExtractionDirectory): Likewise.
2597         (pkgTarArchiveExtractor): Implement constructor, together with...
2598         (pkgTarArchiveExtractor::ProcessDirectory): ...this method, and also...
2599         (pkgTarArchiveExtractor::ProcessDataStream): ...this one; these are
2600         declared as abstract, in the pkgTarArchiveProcessor base class.
2601         (pkgTarArchiveInstaller::ProcessDirectory): Simplify; it now delegates
2602         directory creation to pkgArchiveProcessor::CreateExtractionDirectory.
2603         (pkgTarArchiveInstaller::ProcessDataStream): Simplify; delegate file
2604         handling to pkgArchiveProcessor::ExtractFile, as appropriate.
2605
2606 2011-08-30  Keith Marshall  <keithmarshall@users.sourceforge.net>
2607
2608         Make --download-only and --print-uris imply --reinstall.
2609
2610         * src/pkgopts.h (OPTION_PRINT_URIS): Adjust definition.
2611         (OPTION_DNLOAD_ONLY, OPTION_DOWNLOAD_ONLY): Likewise.
2612
2613 2011-08-07  Keith Marshall  <keithmarshall@users.sourceforge.net>
2614
2615         Implement --download-only and --print-uris options.
2616
2617         * src/pkgopts.h (OPTION_DOWNLOAD_ONLY, OPTION_PRINT_URIS):
2618         New manifest constants, identifying flag bits; define them.
2619         (OPTION_DNLOAD_ONLY): Likewise; an alias for OPTION_DOWNLOAD_ONLY.
2620
2621         * src/pkgbase.h (pkgActionItem::PrintURI): New private method.
2622         * src/pkginet.cpp: Implement it.
2623
2624         * src/clistub.c (options): Add "download-only" and "print-uris".
2625         (help_text): Document them.
2626         * src/pkgexec.cpp (pkgActionItem::Execute): Process them.
2627
2628 2011-07-29  Keith Marshall  <keithmarshall@users.sourceforge.net>
2629
2630         mingw-get-0.3-mingw32-alpha-2.1 released.
2631
2632         * configure.ac (AC_INIT): Adjust version number.
2633         * srcdist-doc/NEWS.in: Updated; document bugs fixed.
2634         * All files (r0-3-alpha-2-1): Tag assigned.
2635
2636 2011-07-29  Keith Marshall  <keithmarshall@users.sourceforge.net>
2637
2638         Adopt tar.xz as default package archive format.
2639
2640         * Makefile.in (TARZIP, TAREXT): New macros; define them.
2641         (bindist, licdist, srcdist): Use them in place of hardcoded tar.gz
2642         (maintainer-clean): Expunge tar files of any compression format.
2643
2644 2011-07-27  Keith Marshall  <keithmarshall@users.sourceforge.net>
2645
2646         Correct handling of release status in requirements specifications.
2647
2648         * src/debug.h (DEBUG_TRACE_DEPENDENCIES): New tracing hook; define it.
2649         * src/pkgexec.cpp (pkgActionItem::SelectIfMostRecentFit): Use it; add
2650         function entry/exit tracing report hooks.
2651         * src/pkgdeps.cpp (pkgXmlDocument::ResolveDependencies): Likewise;
2652         also add internal trace point reporting, which may also require...
2653         (show_required): ...this new static inline DEBUG_INVOKED function.
2654
2655         * src/pkgreqs.cpp (requirement): Propagate release status and release
2656         reference index fields from requirer, when package version requirement
2657         is specified by a '%' token, and no explicit release status override
2658         is included in the requirement specification.
2659
2660         * src/pkgspec.cpp (is_wildcard_spec): New static inline helper.
2661         (pkgSpecs::VersionComparator): Use it to identify any package version
2662         specification which may require the extension of a wildcard match, to
2663         span the package version and release status fields; also add tracing
2664         hooks, triggered on DEBUG_TRACE_DEPENDENCIES, to facilitate debugging.
2665
2666 2011-06-18  Keith Marshall  <keithmarshall@users.sourceforge.net>
2667
2668         Avoid accidental RCS keyword substitutions.
2669
2670         * Makefile.in (DOLLAR): New macro; define it.
2671         (readme.txt, readme.txt.in): Use it, where unexpanded RCS Id keyword
2672         matching is intended.
2673
2674 2011-06-18  Keith Marshall  <keithmarshall@users.sourceforge.net>
2675
2676         Mercurial support revisited.
2677
2678         * .cvsignore (.hgtags): Add to CVS untracked list.
2679
2680 2011-06-18  Keith Marshall  <keithmarshall@users.sourceforge.net>
2681
2682         Update readme.txt ID tag-line to track NEWS rather than README.
2683
2684         * Makefile.in (readme.txt.in): New rule; implement it.
2685         (readme.txt.tag): Likewise; this implements the tag-line tracking.
2686         (readme.txt): Rule redefined in terms of the preceding pair.
2687
2688 2011-06-17  Keith Marshall  <keithmarshall@users.sourceforge.net>
2689
2690         mingw-get-0.3-mingw32-alpha-2 released.
2691
2692         * configure.ac (AC_INIT): Adjust version number.
2693         * srcdist-doc/NEWS.in: Updated; document new features and bugs fixed.
2694         * All files (r0-3-alpha-2): Tag assigned.
2695
2696 2011-06-15  Keith Marshall  <keithmarshall@users.sourceforge.net>
2697
2698         Add internal documentation for --reinstall option.
2699
2700         * src/clistub.c (help_text): Add description for "--reinstall".
2701
2702 2011-06-14  Keith Marshall  <keithmarshall@users.sourceforge.net>
2703
2704         Support use of Mercurial within a CVS working copy.
2705
2706         * .cvsignore (.hg, .hgignore): Don't have CVS track these.
2707
2708 2011-06-13  Keith Marshall  <keithmarshall@users.sourceforge.net>
2709
2710         Implement --reinstall option.
2711
2712         * src/pkgopts.h (OPTION_REINSTALL): New macro; define it.
2713         (OPTION_GENERIC, OPTION_SHIFT_MASK): Likewise.
2714         (OPTION_EXTRA_FLAGS): New field; declare it.
2715
2716         * src/clistub.c (options): Add "reinstall".
2717         (OPTION_GENERIC): Use it where appropriate; within its scope...
2718         (OPTION_STORAGE_CLASS): Improve descriptive comments; add handling for
2719         default case of flag type options requiring an alignment shift.
2720
2721         * src/pkgexec.cpp: Remove previous "always reinstall" kludge.
2722         (pkgOptionSelected, PKG_OPTION_REINSTALL): Remove obsolete macros.
2723         (pkgActionItem::Execute): Check for "upgrade" request on any package
2724         which is already up to date; report this state, otherwise...
2725         [OPTION_REINSTALL || ACTION_UPGRADE]: Mark package as "removed", to
2726         avoid bail-out on "package already installed", when calling...
2727         (pkgInstall): ...this.
2728
2729 2011-06-12  Keith Marshall  <keithmarshall@users.sourceforge.net>
2730
2731         Don't require -vv to report progress of update operation.
2732
2733         * src/pkgbind.cpp (pkgRepository::GetPackageList): Eliminate all
2734         basename() calls; `dname' already tells us what it should return.
2735         [update]: Report progress, irrespective of verbosity setting.
2736
2737 2011-06-11  Keith Marshall  <keithmarshall@users.sourceforge.net>
2738
2739         Fix MinGW-Bug #3313806.
2740
2741         * src/pkginfo/pkginfo.l (CMS_KEYWORDS): Do not match them within the
2742         PACKAGE_NAME field; this avoids misinterpretation as a release status
2743         qualifier when intended as part of the package name, as in msys-cvs.
2744
2745 2011-06-07  Keith Marshall  <keithmarshall@users.sourceforge.net>
2746
2747         Provisional correction for MinGW-Bug #3309438.
2748
2749         * src/debug.h [DEBUGLEVEL == 0]: Provide defaults for...
2750         (DEBUG_ENABLED, DEBUG_REQUEST): ...these macros.
2751
2752         * src/tarproc.cpp (pkgTarArchiveInstaller::ProcessDirectory):
2753         (pkgTarArchiveInstaller::ProcessDataStream): Use DEBUG_REQUEST to
2754         enable runtime trace activation for previous compile time choices.
2755
2756 2011-05-30  Keith Marshall  <keithmarshall@users.sourceforge.net>
2757
2758         mingw-get-0.3-mingw32-alpha-1 released.
2759
2760         * configure.ac (AC_INIT): Adjust version number.
2761         * srcdist-doc/NEWS.in: Updated; document new features.
2762         * All files (r0-3-alpha-1): Tag assigned.
2763
2764 2011-05-30  Keith Marshall  <keithmarshall@users.sourceforge.net>
2765
2766         Support assignment of DEBUGLEVEL at configure time.
2767
2768         * configure.ac (DEBUGLEVEL): Declare as a precious variable, using
2769         AC_ARG_VAR; also declare with AC_SUBST, to ensure it is initialised.
2770
2771         * Makefile.in (DEBUGLEVEL): Let AC_SUBST assign it.
2772
2773 2011-05-29  Keith Marshall  <keithmarshall@users.sourceforge.net>
2774
2775         Work around bugs in MinGW and GNU getopt_long_only() implementations.
2776
2777         * src/getopt.c: New file; this is a free-standing replacement for any
2778         implementation provided by system libraries.  We will always use this
2779         to ensure correct operation irrespective of system bugs; (different
2780         bug manifestations have been identified in the stock MinGW and GNU
2781         implementations).
2782
2783         * Makefile.in (mingw-get.EXEEXT): Use it.
2784
2785         * src/clistub.c (options): Remove redundant declaration of `-v' as a
2786         long form option.
2787
2788 2011-05-29  Keith Marshall  <keithmarshall@users.sourceforge.net>
2789
2790         Implement user selection of traceable features at run-time.
2791
2792         * src.pkgopts.h (OPTION_VERBOSE_MAX): New macro; define it.
2793
2794         * src/debug.h (DEBUG_ENABLED): New macro; define it.
2795         (DEBUG_REQUEST, DEBUG_REQUEST_FLAGS, DEBUG_TRACE_DYNAMIC): Likewise.
2796
2797         * src/clistub.c (main) [--trace]: Don't make it available unless...
2798         [DEBUG_ENABLED(DEBUG_TRACE_DYNAMIC)]: ...this is set (at compile-time).
2799         [--verbose]: Limit to OPTION_VERBOSE_MAX, using...
2800         (atmost): ...this new macro; define it.
2801         (options): Declare `-v' as both long and short form, pending bug fix
2802         in MinGW's getopt_long_only() implementation.
2803
2804         * src/pkginet.cpp (pkgInternetAgent::OpenURL): Use DEBUG_REQUEST.
2805         (pkgInternetLzmaStreamingAgent::TransferData): Likewise.
2806         (pkgInternetStreamingAgent::TransferData): Likewise.
2807         (pkgInternetStreamingAgent::Get): Likewise.
2808
2809         * src/pkgunst.cpp (pkgActionItem::SetAuthorities): Use DEBUG_REQUEST.
2810         (pkg_rmdir, pkg_unlink): Likewise.
2811
2812         * src/sysroot.cpp (pkgXmlDocument::LoadSystemMap): Use DEBUG_REQUEST.
2813
2814 2011-05-21  Keith Marshall  <keithmarshall@users.sourceforge.net>
2815
2816         Implement protocol for processing global program options.
2817
2818         * src/pkgopts.h: New file.
2819
2820         * src/climain.cpp (cli_setopts): New function; implement it.
2821         (pkgOptions): Likewise.
2822
2823         * src/clistub.c (xatoi): New function; implement it.
2824         (cli_setargv): New inline helper function; implement it.
2825         (main): Use it.  Also incorporate implementation of...
2826         (parsed_options): New structure; it accommodates...
2827         (verbose, trace): New options; interpret them, and...
2828         (help_text): ...document them.
2829
2830         * src/pkgbind.cpp (pkgRepository::GetPackageList): Make catalogue
2831         loading notifications and progress reports conditional on...
2832         [OPTION_VERBOSE > 1]: ...this.
2833
2834 2011-05-18  Keith Marshall  <keithmarshall@users.sourceforge.net>
2835
2836         Augment known development status keywords and accept CMS labels.
2837
2838         * src/pkginfo/pkginfo.l (CMS_KEYWORDS): Define new provisional list;
2839         add transitional state scanner rule and code to interpret them.
2840         (STATUS_KEYWORDS): Add "pre" and "rc" to existing list; modify scanner
2841         code to maintain consistency with CMS_KEYWORDS processing; also extend
2842         this coding strategy to other rules.
2843
2844         * src/pkginfo/driver.c (spec): Strip initial '$' token from displayed
2845         field values; (we expect it only for a CMS_KEYWORDS field value).
2846
2847         * src/pkgreqs.cpp (pkgSpecs::GetTarName): Remove any initial '$' token
2848         from PACKAGE_RELEASE_STATUS field, when performing reverse of tarname
2849         decomposition transformation.
2850
2851 2011-05-18  Keith Marshall  <keithmarshall@users.sourceforge.net>
2852
2853         Correct omission from 2011-02-18 commit.
2854
2855         * src/tarproc.cpp (Copyright Notice): Add 2011 as year of release.
2856
2857 2011-05-14  Keith Marshall  <keithmarshall@users.sourceforge.net>
2858
2859         mingw-get-0.2-mingw32-alpha-4 released.
2860
2861         * configure.ac (AC_INIT): Adjust version number.
2862         * srcdist-doc/NEWS.in: Updated; add bug-fix/feature descriptions.
2863         * All files (r0-2-alpha-4): Tag assigned.
2864
2865 2011-05-12  Keith Marshall  <keithmarshall@users.sourceforge.net>
2866
2867         Fix MinGW-Bug #3297660 (reported by Chris Sutcliffe).
2868
2869         * src/pkgbase.h (pkgActionItem::SetAuthorities): Return unsigned long.
2870         (pkgActionItem::HasAttribute): New inline method; implement it.
2871
2872         * src/pkgtask.h (ACTION_DOWNLOAD, ACTION_DOWNLOAD_OK): New macros.
2873
2874         * src/pkginet.cpp (pkgActionItem::DownloadArchiveFiles):
2875         [ACTION_DOWNLOAD]: Assert it at commencement of each package download;
2876         clear it again, on successful download completion.
2877
2878         * src/pkginst.cpp (pkgtask.h): #include it.
2879         (pkgInstall) [ACTION_DOWNLOAD]: Don't proceed with installation when
2880         set; this indicates failed download; diagnose it.
2881
2882         * src/pkgunst.cpp (pkgRemove) [ACTION_DOWNLOAD && ACTION_UPGRADE]:
2883         Don't proceed with pre-emptive removal when both set; this indicates
2884         failed download of replacement package; diagnose it.
2885
2886 2011-05-12  Keith Marshall  <keithmarshall@users.sourceforge.net>
2887
2888         Fix MinGW-Bug #3295526 (reported by Charles Wilson).
2889
2890         * src/pkgunst.cpp (sys/stat.h): #include it; we need it for...
2891         (pkg_unlink): ...chmod( file, S_IWRITE ), emulating `rm -f' semantics.
2892
2893 2011-05-12  Keith Marshall  <keithmarshall@users.sourceforge.net>
2894
2895         Diagnose and aggressively retry failed download connections.
2896
2897         * src/debug.h (DEBUG_TRACE_INTERNET_REQUESTS): New macro; define it.
2898
2899         * src/pkginet.cpp (debug.h): #include it.
2900         (pkgDownloadMeter): New abstract class; declare it and implement its
2901         default (non-abstract) data and methods; derive...
2902         (pkgDownloadMeterTTY): ...this new class from it; implement it...
2903         (pkgInternetStreamingAgent::Get): ...and instantiate it (naively for
2904         now), as associated pkgDownloadMeter object; add tracing diagnostic.
2905         (pkgInternetAgent::OpenURL): Don't inline it; move implementation out
2906         of line; add retry loops to aggressively retry failed connections.
2907         (pkgInternetAgent::QueryContentLength): New method; implement it.
2908         (pkgInternetStreamingAgent::TransferData): Avoid Microsoft specific
2909         data type `DWORD'; prefer equivalent standard `unsigned long'.  Add
2910         tracing diagnostic.  Remove progress diagnostic; replace it with an
2911         `Update' request to associated pkgDownloadMeter.
2912         (pkgInternetLzmaStreamingAgent::GetRawData): Avoid `DWORD' data type.
2913         (pkgInternetLzmaStreamingAgent::TransferData): Likewise; add tracing
2914         diagnostic on failure.
2915
2916 2011-03-31  Keith Marshall  <keithmarshall@users.sourceforge.net>
2917
2918         mingw-get-0.2-mingw32-alpha-3 released.
2919
2920         * configure.ac (AC_INIT): Adjust version number.
2921         * srcdist-doc/NEWS.in: Updated; add bug-fix description.
2922         * All files (r0-2-alpha-3): Tag assigned.
2923
2924 2011-03-30  Keith Marshall  <keithmarshall@users.sourceforge.net>
2925
2926         Provisional handling for http proxy authentication.
2927         (Adapted from patch by Scott Michel <pingbak@users.sourceforge.net>)
2928         (ref: MinGW-Patch #3158453)
2929
2930         * src/pkginet.cpp: Several format/layout adjustments; add comments.
2931         Eliminate several instances of Microsoft specific typedef nastiness.
2932         (dmh_dialogue_context): New macro; kludge definition to support...
2933         (pkgInternetAgent::OpenURL) [HTTP_STATUS_PROXY_AUTH_REQ]: Detect
2934         and handle it.
2935
2936 2011-03-30  Keith Marshall  <keithmarshall@users.sourceforge.net>
2937
2938         Expand macros in path names for files and directories to be removed.
2939
2940         * src/pkgunst.cpp (pkgRemove): Format sysroot as a template, so...
2941         (pkg_rmdir, pkg_unlink): ...are able to use mkpath() to construct the
2942         full path name for each file or directory to be removed.
2943
2944 2011-03-29  Keith Marshall  <keithmarshall@users.sourceforge.net>
2945
2946         Correct defective activation logic for some debugging hooks.
2947
2948         * src/pkgunst.cpp (pkg_rmdir, pkg_unlink) [DEBUG_INVOKE_IF]:
2949         (pkgActionItem::SetAuthorities) [DEBUG_INVOKE_IF]: Use bit-wise `&'
2950         operator, not `&&', to evaluate DEBUGLEVEL state.
2951
2952 2011-03-22  Keith Marshall  <keithmarshall@users.sourceforge.net>
2953
2954         Avoid Unicode hyphens in generated ASCII document files.
2955
2956         * Makefile.in (NROFF): New macro; define it to invoke `nroff -Tascii'.
2957         (%.dist, readme.txt): Use it to ensure that output is pure ASCII.
2958
2959 2011-03-15  Keith Marshall  <keithmarshall@users.sourceforge.net>
2960
2961         mingw-get-0.2-mingw32-alpha-2 released.
2962
2963         * configure.ac (AC_INIT): Adjust version number.
2964         * srcdist-doc/NEWS.in: Updated; add bug-fix description.
2965         * All files (r0-2-alpha-2): Tag assigned.
2966
2967 2011-03-15  Keith Marshall  <keithmarshall@users.sourceforge.net>
2968
2969         Fix MinGW-Bug 3212246.
2970
2971         * src/keyword.c (has_keyword): Avoid incrementing the comparison
2972         pointers when a significant character in one string is not matched in
2973         the other; previously the pointers were left pointing one character to
2974         the right of the mismatch, and this was overlooked if the mismatch
2975         occurred at the rightmost character in both strings.
2976
2977 2011-03-12  Keith Marshall  <keithmarshall@users.sourceforge.net>
2978
2979         mingw-get-0.2-mingw32-alpha-1 released.
2980
2981         * configure.ac (AC_INIT): Set version number; correct capitalisation
2982         in URI reference to bug reporting instructions.
2983
2984         * srcdist-doc/NEWS.in: Confirm release date.
2985         [bug reporting]: Remove redundant paragraph; the information is
2986         provided, via reference to mingw.org. in the README and INSTALL files.
2987
2988         * All files (r0-2-alpha-1): Tag assigned.
2989
2990 2011-03-12  Keith Marshall  <keithmarshall@users.sourceforge.net>
2991
2992         * srcdist-doc/INSTALL.in [building]: Qualify liblzma.a requirement;
2993         add earliest acceptable snapshot release date.
2994
2995 2011-03-11  Keith Marshall  <keithmarshall@users.sourceforge.net>
2996
2997         Remove unused 7zip and boost source code from CVS trunk.
2998
2999         * 7z: Directory and all content removed.
3000         * boost: Likewise.
3001
3002 2011-03-11  Keith Marshall  <keithmarshall@users.sourceforge.net>
3003
3004         Refactor and update existing installation and usage instructions.
3005
3006         * src/clistub.c (help_text): Updated.
3007
3008         * srcdist-doc: New directory.
3009
3010         * README: Deleted; its content refactored into...
3011         * srcdist-doc/README.in srcdist-doc/INSTALL.in srcdist-doc/NEWS.in:
3012         ...these new template files, updated for current development state.
3013
3014         * srcdist-doc/gendoc.sed.in: New sed script; it directs formatting of
3015         generated text files derived from the srcdist-doc templates.
3016
3017         * Makefile.in (SRCDIST_SUBDIRS): Add srcdist-doc.
3018         (SRCDIST_FILES): Add NEWS and INSTALL.
3019         (srcdist-doc): New build rule to generate README, NEWS and INSTALL.
3020         (srcdist, licdist): Adjust path to locate them.
3021         (readme.txt): New build rule to generate on-line package description.
3022         (dist): Require it.
3023         (distclean): Don't remove Makefile...
3024         (maintainer-clean): ...but do it here instead.  Also remove generated
3025         README, NEWS and INSTALL, the autom4te cache, and all distributable
3026         zip files, in addition to tarballs, for the current version.
3027
3028 2011-02-27  Keith Marshall  <keithmarshall@users.sourceforge.net>
3029
3030         Initial implementation for "remove" feature.
3031
3032         * src/pkgbase.h: Update copyright notice; add current year.
3033         (pkgActionItem::SetPrimary): New inline public method; declare it.
3034         (pkgActionItem::SetAuthorities): New public method; declare it.
3035
3036         * src/pkgtask.h (ACTION_PREFLIGHT, ACTION_REMOVE_OK): New defines.
3037
3038         * src/pkgproc.h: Update copyright notice; add current year.
3039         (pkgManifest::GetSysRootReference): New public method; declare it.
3040         (pkgManifest::GetRoot): New inline method; declare and implement it.
3041         (pkgManifest::DetachSysRoot): Argument type changed to const char*.
3042         (pkgRemove): New extern "C" function; declare it.
3043
3044         * src/pkgexec.cpp (pkgActionItem::SetPrimary): Implement it, and...
3045         (pkgXmlDocument::Schedule): ...use it to promote actions on all user
3046         specified packages, as listed on the command line, to primary status.
3047         (pkgActionItem::Execute): Repeatedly invoke...
3048         (pkgActionItem::SetAuthorities): ...this; incorporate call of...
3049         (pkgActionItem::DownloadArchiveFiles): ...this, within the loop, so
3050         that we retry failed downloads at least a second time.
3051         [ACTION_REMOVE]: Delete stub; invoke pkgRemove().
3052
3053         * src/pkgunst.cpp: New file.
3054         (pkgActionItem::SetAuthorities): Implement it.
3055         (pkgManifest::GetSysRootReference): Implement it.
3056         (pkgManifest::DetachSysRoot): Implement it per new declaration.
3057         (pkgRemove): Implement it.
3058
3059         * Makefile.in (CORE_DLL_OBJECTS): Add pkgunst.OBJEXT
3060
3061 2011-02-26  Keith Marshall  <keithmarshall@users.sourceforge.net>
3062
3063         Work-around for improper stderr buffering in MSYS mintty and rxvt.
3064         (Merged from r0-1-alpha-5 branch).
3065
3066         * src/dmh.cpp (dmhTypeTTY::emit_and_flush): New private method.
3067         (dmhTypeTTY::printf, dmhTypeTTY::notify): Use it to force an fflush()
3068         after each output record is written to stderr.
3069
3070         * README: Update as appropriate.
3071
3072 2011-02-18  Keith Marshall  <keithmarshall@users.sourceforge.net>
3073
3074         Tidy up some debugging hooks.
3075
3076         * src/debug.h (DEBUG_INVOKED): New macro; define it.
3077         (DEBUG_INVOKE_IF): Likewise; this takes arguments providing for
3078         conditional invocation of code when DEBUGLEVEL is non-zero; make it
3079         expand to nothing, when DEBUGLEVEL is zero.
3080         (DEBUG_TRACE_INIT): Redefined macro; value changed to 0x0010.
3081         (DEBUG_TRACE_TRANSACTIONS, DEBUG_SUPPRESS_INSTALLATION):
3082         (DEBUG_UPDATE_INVENTORY): New macros; define them.
3083
3084         * src/tarproc.cpp (pkgTarArchiveInstaller::ProcessDirectory):
3085         (pkgTarArchiveInstaller::ProcessDataStream): Refactor debugging hooks;
3086         implement them in terms of DEBUGLEVEL, with reference to...
3087         (DEBUG_SUPPRESS_INSTALLATION, DEBUG_UPDATE_INVENTORY): ...these.
3088
3089 2011-02-15  Keith Marshall  <keithmarshall@users.sourceforge.net>
3090
3091         Make package version comparisons more robust.
3092
3093         Fixes an issue reported by Chris Sutcliffe: previously, version
3094         comparisons were evaluated solely on the basis of differences in the
3095         package version field itself.  Henceforth, if this field compares as
3096         equal, then the comparison is extended to also consider differences
3097         between development phase qualifiers, and, if these too compare as
3098         equal, to differences in the target subsystem version fields.
3099
3100         * src/pkginfo/pkginfo.h (pkgSpecs::VersionComparator): New private
3101         method; declare it.
3102
3103         * src/pkgspec.cpp (pkgSpecs::VersionComparator): Implement it.
3104         (pkgSpecs::operator<, pkgSpecs::operator<=, pkgSpecs::operator>=):
3105         (pkgSpecs::operator>): Use it, replacing...
3106         (version): ...this static function; now unreferenced; delete it.
3107
3108         * src/vercmp.h (pkgVersionInfo::pkgVersionInfo): Make it inline; it
3109         now delegates the entire class construction operation to...
3110         (pkgVersionInfo::Parse): ...this new private method; declare it.  This
3111         is also used to facilitate implementation of...
3112         (pkgVersionInfo::Reset): ...this new inline method, also requiring...
3113         (pkgVersionInfo::FreeAll): ...this new inline method; also now used by
3114         the class destructor, it encapsulates separate calls to...
3115         (pkgVersionInfo::Free): ...this original inline method, renamed...
3116         (pkgVersionInfo::FreeEntry): ...as this.
3117
3118         * src/vercmp.cpp (pkgVersionInfo::Parse): Implement it.
3119
3120 2011-02-13  Keith Marshall  <keithmarshall@users.sourceforge.net>
3121
3122         Merge from mingw-get-0.1-mingw32-alpha-5 bug-fix branch.
3123
3124         * src/pkgdeps.cpp (pkgXmlDocument::ResolveDependencies): Promote
3125         "install" action on new prerequisites, where a previously uninstalled
3126         package is required to satisfy any "upgrade" dependency.
3127
3128         * src/pkgexec.cpp (pkgActionList::Execute): Don't make misleading
3129         claims concerning package removal.
3130
3131         * src/pkgtask.h (STRICTLY_GT, STRICTLY_LT, ACTION_PRIMARY): Add one
3132         level of parentheses around defining expressions.
3133
3134 2011-02-10  Keith Marshall  <keithmarshall@users.sourceforge.net>
3135
3136         Publish mingw-get-0.0-mingw32-alpha-5.1 bug-fix release.
3137
3138         * README: Updated to reflect changes.
3139
3140 2011-02-08  Keith Marshall  <keithmarshall@users.sourceforge.net>
3141
3142         Improve diagnostics for failed GUI invocation.
3143
3144         * src/guimain.cpp: New file; currently delivers only a diagnostic
3145         stub, provided by Sze Howe Koh <axfangli@users.sourceforge.net>, to
3146         pop-up a message block explaining why GUI mode cannot be invoked.
3147
3148         * Makefile.in (GUI_LDFLAGS): New macro; it is required by...
3149         (gui$EXEEXT): ...this new build rule; add to prerequisites of...
3150         (all): ...this [default] build rule; redefine this in terms of...
3151         (BIN_PROGRAMS, LIBEXEC_PROGRAMS, LIBEXEC_DATA): ...these new macros;
3152         define them, and also use them as loop iterator objectives for...
3153         (install, install_strip): ...these; also schedule them...
3154         (clean): ...for removal by this.
3155
3156         * src/clistub.c (Copyright): Add new year.
3157         (main): Amend error message, if gui$EXEEXT doesn't start; make it
3158         more intelligible to normal users.
3159
3160 2011-02-07  Keith Marshall  <keithmarshall@users.sourceforge.net>
3161
3162         Correct omissions from packaged source tarball.
3163
3164         * Makefile.in (Copyright): Add new year.
3165         (SRCDIST_FILES): Add aclocal.m4
3166         (SRCDIST_SUBDIRS): Add m4
3167
3168 2011-01-05  Keith Marshall  <keithmarshall@users.sourceforge.net>
3169
3170         Reduce path names to base names, in some diagnostic message contexts.
3171
3172         * src/climain.cpp: Update copyright notice for new year.
3173         (climain): Extract base name from argv[0], to pass as program name tag
3174         in initialisation of diagnostic message handler.
3175
3176         * src/dmh.h, src/dmh.cpp: Update copyright notices; make some layout
3177         adjustments, for more consistent formatting style.
3178
3179         * src/pkgbind.cpp: Update copyright notice.
3180         (pkgRepository::GetPackageList): Reduce path names for catalogue files
3181         to their base names, when reporting them in diagnostic messages.
3182
3183 2011-01-05  Keith Marshall  <keithmarshall@users.sourceforge.net>
3184
3185         Avoid a potential out-of-range action name look-up.
3186
3187         * src/pkgdeps.cpp: Update copyright notice for new year.
3188         (pkgXmlDocument::Schedule): Mask action code with ACTION_MASK, to
3189         determine correct action name when diagnosing uninstalled package.
3190
3191 2011-01-03  Keith Marshall  <keithmarshall@users.sourceforge.net>
3192
3193         Make "install" and "remove" notifications symmetric.
3194
3195         * configure.ac (AC_INIT): Bump version to "0.1-alpha-6cvs".
3196         (YEARS_OF_ISSUE): Add new year.
3197         
3198         * src/pkginst.cpp: Update copyright notice for new year.
3199         (pkgInstall): Add notification for package being installed.
3200
3201 2010-12-30  Keith Marshall  <keithmarshall@users.sourceforge.net>
3202
3203         Add preliminary CLI support for "list" and "show" actions.
3204
3205         * src/pkgtask.h (ACTION_PRIMARY): New manifest constant; define it.
3206         (ACTION_LIST, ACTION_SHOW): Likewise; cast to enumerated values for...
3207         (action_list, action_show): ...these; define them.
3208
3209         * src/pkgexec.cpp (action_name): Add defining text for...
3210         (action_list, action_show): ...these.
3211
3212         * src/climain.cpp: Partially revert 2010-11-01 change...
3213         (climain) [! ACTION_UPDATE]: Reinstate original "if" block, moving
3214         the "switch" block within it, but without the ACTION_UPDATE case.
3215         [ACTION_LIST, ACTION_SHOW]: New "switch" cases; they invoke...
3216         (pkgXmlDocument::DisplayPackageInfo): ...this new method.
3217
3218         * src/pkgbase.h (pkgXmlDocument::DisplayPackageInfo): Declare it.
3219         (pkgActionItem::ConfirmInstallationStatus): New method; declare it.
3220         (pkgXmlNode::GetSysRoot): Make declaration style consistent with
3221         others in the class; do not name arguments in the declaration.
3222         (pkgXmlNode::FindFirstAssociate): Likewise.
3223         (pkgXmlNode::FindNextAssociate): Likewise.
3224
3225         * src/pkgshow.cpp: New file.
3226         (pkgXmlDocument::DisplayPackageInfo): Implement it.
3227
3228         * src/pkgdeps.cpp (pkgMsgUnknownPackage): New extern "C" function;
3229         implement it temporarily, pending a future i18n reimplementation.
3230         (assert_installed): Drop "inline" attribute; leave it as "static".
3231         Set "tarname" correctly, to match the installed package version; (it
3232         previously incorrectly returned the latest available version).
3233         (pkgActionItem::ConfirmInstallationStatus): Implement it.
3234         (pkgXmlDocument::Schedule) [ACTION_PRIMARY]: Set as appropriate.
3235         (pkgXmlDocument::Schedule) [ACTION_REMOVE || ACTION_UPGRADE]: Complain
3236         if requested package is not recorded as having been installed.
3237         (pkgXmlDocument::ResolveDependencies) [! ACTION_INSTALL]: Do not
3238         invoke it recursively.
3239
3240         * Makefile.in (pkgshow.$OBJEXT): Add reference.
3241
3242 2010-11-01  Keith Marshall  <keithmarshall@users.sourceforge.net>
3243
3244         Lay groundwork for implentation of additional actions.
3245
3246         * src/climain.cpp (climain): Adjust indentation; replace `if' block...
3247         [action != ACTION_UPDATE]: ...with this default `switch' case, and...
3248         [action == ACTION_UPDATE]: ...this as explicit "do nothing" case.
3249
3250 2010-10-29  Keith Marshall  <keithmarshall@users.sourceforge.net>
3251
3252         mingw-get-0.1-mingw32-alpha-5 released.
3253
3254         * configure.ac (AC_INIT): Bump version to 0.1-alpha-5.
3255         * README: Update release notes accordingly.
3256         * All files (r0-1-alpha-5): Tag assigned.
3257
3258 2010-10-22  Keith Marshall  <keithmarshall@users.sourceforge.net>
3259
3260         Make pkgInitRites/pkgLastRites processing more robust;
3261         avoid a potential race condition in mingw-get-inst.
3262
3263         * src/rites.c: Refactor conditional code to segregate execution of...
3264         [defined IMPLEMENT_INITIATION_RITES]: ...this into distinct phases.
3265         (PHASE_ONE_RITES, PHASE_TWO_RITES): Define constants to identify them.
3266         (do_init_rites): Renamed to...
3267         (invoke_rites): ...this; inline it.
3268         (pkgLastRites): Invoke it, to pre-empt rename action of...
3269         (lastrites.exe): ...this, subsequently exec()ed process.
3270         (perror): Issue more informative diagnostic on exec() failure.
3271
3272         * src/clistub.c (IMPLEMENT_INITIATION_RITES): Stipulate as...
3273         (PHASE_ONE_RITES): ...this phase of implementation only.
3274
3275         * src/pkgexec.cpp (IMPLEMENT_INITIATION_RITES): Define to provide...
3276         (PHASE_TWO_RITES): ...this phase of implementation, facilitated by...
3277         (self_upgrade_rites): ...this locally defined RITES_INLINE function.
3278         (pkgActionItem::Execute): Invoke it, in remove/install loop, while...
3279         [init_rites_pending]: ...new loop local variable remains true.
3280
3281 2010-09-10  Charles Wilson  <mingw@cwilson.fastmail.fm>
3282
3283         Fix packaging bug in -lic package.
3284
3285         * Makefile.in (licdist): Use directory named
3286         "share", not "shared".
3287
3288 2010-09-10  Charles Wilson  <mingw@cwilson.fastmail.fm>
3289
3290         mingw-get-0.1-mingw32-alpha-4 released.
3291
3292         * All files (r0-1-alpha-4): Tag assigned.
3293
3294 2010-09-10  Charles Wilson  <mingw@cwilson.fastmail.fm>
3295
3296         Add rudimentary help option.
3297
3298         * README: Update release notes.
3299
3300         * src/clistub.c: Add --help option.
3301
3302 2010-09-10  Charles Wilson  <mingw@cwilson.fastmail.fm>
3303
3304         Fix "mingw-get deletes itself" bug in last rites handling.
3305
3306         * README: Add new release notes.
3307
3308         * configure.ac: Bump version to 0.1-alpha-4.
3309
3310         * src/dmh.h: If __cplusplus, include <exception> and
3311         declare dmh_exception class.
3312
3313         * src/dmh.cpp (class dmh_exception): Implement.
3314         (abort_if_fatal): If DMH_FATAL, throw dmh_exception rather
3315         than calling exit().
3316
3317         * src/climain.cpp (climain): Wrap entire function body in try/
3318         catch block. If dmh_exception is caught, return EXIT_FAILURE.
3319
3320         * src/clistub.c (main): Capture return value of climain(). If
3321         non-zero, perform last rites and return EXIT_FAILURE.
3322
3323 2010-08-30  Keith Marshall  <keithmarshall@users.sourceforge.net>
3324
3325         mingw-get-0.1-mingw32-alpha-3 released.
3326
3327         * README: Add new release notes.
3328
3329         * All files (r0-1-alpha-3): Tag assigned.
3330
3331 2010-08-27  Keith Marshall  <keithmarshall@users.sourceforge.net>
3332
3333         Add runtime hooks to support self-upgrade for future releases.
3334
3335         * src/rites.c: New file; compile it free-standing, to provide...
3336         (lastrites.exe): ...this helper application for context clean-up;
3337         alternatively, use it as an include file, with pre-definition of...
3338         (IMPLEMENT_INITIATION_RITES): ...this, to implement...
3339         (pkgInitRites, pkgLastRites): ...these inline functions.
3340
3341         * src/clistub.c (main) [argc > 1]: Use them.
3342         (progname): New local variable within `main'; set it once, then use it
3343         instead of repeated references to `basename(*argv)' in diagnostics.
3344         (MINGW_GET_DLL, MINGW_GET_GUI): Relocate to `src/rites.c'.
3345
3346         * src/debug.h (DEBUG_INHIBIT_RITES_OF_PASSAGE):
3347         (DEBUG_FAIL_FILE_RENAME_RITE, DEBUG_FAIL_FILE_UNLINK_RITE): New
3348         defines; they facilitate debugging of the src/rites.c code.
3349
3350         * Makefile.in (lastrites$EXEEXT): New target; build as prerequisite...
3351         (all): ...of this primary target.
3352         (install, install-strip): Install it.
3353         (SRCDIST_FILES): Remove install-sh; it is now included in...
3354         (build-aux): ...this directory; add it to...
3355         (SRCDIST_SUBDIRS): ...this.
3356
3357 2010-08-24  Keith Marshall  <keithmarshall@users.sourceforge.net>
3358
3359         Set default sysroots relative to mingw-get installation directory.
3360
3361         * xml/profile.xml (system-map) [name == default]: For each of...
3362         [subsystem == mingw32]: ...set sysroot path to value of %R macro...
3363         [subsystem == msys]: ...and to its %R/msys/1.0 subdirectory.
3364
3365 2010-08-19  Keith Marshall  <keithmarshall@users.sourceforge.net>
3366
3367         Some dependency resolver enhancements and bug fixes.
3368
3369         * src/pkgbase.h (pkgXmlNode::GetContainerAttribute): New method;
3370         declare it.
3371
3372         * src/pkgdeps.cpp (pkgXmlNode::GetContainerAttribute): Implement it;
3373         it is used to retrieve package name attributes from the containing
3374         'package' element, when given a pointer to a 'release' element by...
3375         (assert_unmatched, assert_installed): ...these new static functions.
3376         (pkgXmlDocument::Schedule): Use them to reconstruct and register
3377         dependency reference data for previously installed packages which are
3378         no longer included in the distribution manifest.
3379         (pkgXmlDocument::ResolveDependencies): Fix a block nesting error;
3380         catch and diagnose unresolved dependencies; don't look beyond the XML
3381         document root node, (tinyxml error not caught?), when searching for
3382         requirements specified on container nodes.
3383
3384 2010-08-17  Keith Marshall  <keithmarshall@users.sourceforge.net>
3385
3386         Improve scheduling of package processing requests.
3387
3388         * src/pkgexec.cpp (pkgXmlDocument::Schedule): Inspect entire `actions'
3389         list, when checking for duplicate package processing requests; decline
3390         to schedule any such duplicate, or any request which lacks a package
3391         association.
3392
3393 2010-08-15  Keith Marshall  <keithmarshall@users.sourceforge.net>
3394
3395         Lay foundation for selective compilation of debugging code.
3396
3397         * src/debug.h: New file...
3398         * src/sysroot.cpp: Include it.
3399         (pkgXmlDocument::LoadSystemMap): Make debugging output conditional...
3400         [DEBUGLEVEL & DEBUG_TRACE_INIT]: ...on this new debugging state.
3401
3402 2010-08-15  Keith Marshall  <keithmarshall@users.sourceforge.net>
3403
3404         * src/pkgkeys.h: Typo in comment: file was previously identified as
3405         pkgkeys.c; corrected.
3406
3407 2010-08-13  Keith Marshall  <keithmarshall@users.sourceforge.net>
3408
3409         Improve diagnostics for invalid references to non-release XML nodes.
3410
3411         * src/pkgkeys.h (value_unknown): New global string; declare it.
3412         * src/pkgkeys.c (value_unknown): Implement it.
3413
3414         * src/pkgname.cpp (pkgArchiveName): Identify XML element type when
3415         diagnosing references to elements of types other than release; use...
3416         (value_unknown): ...this, as appropriate.
3417
3418 2010-08-12  Keith Marshall  <keithmarshall@users.sourceforge.net>
3419
3420         Guard against a potential buffer overrun.
3421
3422         * src/pkgreqs.cpp (pkgSpecs::SetProperty): Allocate an additional
3423         byte to accommodate an extra field separator, when inserting a new
3424         data value into a previously empty field.
3425
3426 2010-07-27  Cesar Strauss  <cestrauss@gmail.com>
3427
3428         Handle the GNU long name tar header format.
3429
3430         * src/pkgproc.h (TAR_ENTITY_TYPE_GNU_LONGNAME): New manifest constant;
3431         define it.
3432         (pkgTarArchiveProcessor::EntityDataAsString): New protected method;
3433         declare and...
3434         * src/tarproc.cpp: ...implement it.
3435         (pkgTarArchiveProcessor::Process): Before building the entry pathname,
3436         check for a GNU long name type header; when found, read pathname from
3437         the entry data area, before fetching the following header, from which
3438         to retrieve the associated entity data.
3439
3440 2010-06-24  Keith Marshall  <keithmarshall@users.sourceforge.net>
3441
3442         Work around an autoconf bug (reported by Stefano Sabatini).
3443
3444         * Makefile.in (VPATH): Use @top_srcdir@ instead of ${srcdir}; current
3445         autoconf incorrectly elides references to @srcdir@ and ${srcdir} when
3446         substituting within a VPATH specification for building `in-source'.
3447         Also, prefer colons to blanks as path name separators, for improved
3448         portability to non-GNU implementations of make; (recommendation by
3449         Ralf Wildenhues).
3450
3451 2010-06-24  Keith Marshall  <keithmarshall@users.sourceforge.net>
3452
3453         Include alias search, when matching component package name.
3454
3455         * src/keyword.c (has_keyword): Rearrange argument declarations for
3456         more natural order; update all callers accordingly.  Simplify; compare
3457         keyword to be matched with each successive candidate from match-list,
3458         character-by-character and in-place, so avoiding memory allocation
3459         for any local duplicate of the passed match-list; thus...
3460         (safe_strdup): ...this static function no longer required; delete it.
3461         (string.h): No references remain; do not include it.
3462
3463         * src/pkgfind.cpp (pkgXmlNode::FindPackageByName): Augment component
3464         package name matching to include potential matches of the look-up name
3465         with trailing component name stripped off, when that matches the class
3466         name of an identified component package, and the initial substring of
3467         the look-up name, after stripping, matches any specified alias name
3468         for the containing package.
3469
3470 2010-06-10  Keith Marshall  <keithmarshall@users.sourceforge.net>
3471
3472         Address FIXME relating to identification of distributable files.
3473
3474         * install-sh: Move to...
3475         * build-aux: ...this new directory.
3476
3477         * Makefile.in (PACKAGE_DISTVERSION): Modify `sed' edit sequence; make
3478         it depend on, and ensure that it incorporates the expansion of...
3479         (PACKAGE_SUBSYSTEM): ...this new macro; defined as substitution of...
3480         (host_os): ...this autoconf variable, set by...
3481
3482         * configure.ac (AC_CANONICAL_HOST): ...this; add it, requiring...
3483         (AC_CONFIG_AUX_DIR): ...`build-aux' directory reference, providing...
3484
3485         * build-aux/config.guess, build-aux/config.sub: ...these new standard
3486         files; import them from the standard `build-aux' repository.
3487
3488 2010-05-17  Keith Marshall  <keithmarshall@users.sourceforge.net>
3489
3490         Bump version for next release cycle.
3491
3492         * configure.ac (AC_INIT): Bump version suffix to alpha-3.
3493
3494 2010-05-17  Keith Marshall  <keithmarshall@users.sourceforge.net>
3495
3496         mingw-get-0.1-mingw32-alpha-2 released.
3497
3498         * README: Add new release notes.
3499
3500         * xml/profile.xml: Update to use default referencing for...
3501         (package-list.xml.lzma): ...this repository master catalogue.
3502
3503         * All files (r0-1-alpha-2): Tag assigned.
3504
3505 2010-05-12  Keith Marshall  <keithmarshall@users.sourceforge.net>
3506
3507         Make provision to protect user's profile settings during upgrade.
3508
3509         * Makefile.in (install): Remove `profile.xml'; replace it with...
3510         (install-profile): ...this new prerequisite installation goal; it
3511         renames the installed copy of `profile.xml' as `defaults.xml', within
3512         the installed package image.
3513
3514         * src/pkgkeys.h (defaults_key): New key; declare it.
3515         * src/pkgkeys.c: Some cosmetic formatting (tabulation) adjustments.
3516         (defaults_key): Implement it; it refers to the `defaults.xml' file.
3517
3518         * src/climain.cpp (climain): Check `profile_key' for accessibility of
3519         the `profile.xml' file; if [! R_OK] emit a diagnostic warning, fall
3520         back on `defaults_key', and attempt to load configuration from the
3521         distributed `defaults.xml' file.
3522
3523 2010-05-11  Keith Marshall  <keithmarshall@users.sourceforge.net>
3524
3525         Add preliminary support for future `-reinstall' option.
3526
3527         * src/pkgexec.cpp (pkgActionItem::Execute) [ACTION_INSTALL]: Force
3528         installation if `-reinstall' option is selected, overriding state of
3529         any prior installation; temporarily assume that this option is always
3530         selected, to permit proper `upgrade' operation in the absence of any
3531         functional `uninstall' capability, and pending implementation of a
3532         mechanism for interpreting user specified options.
3533
3534 2010-05-11  Keith Marshall  <keithmarshall@users.sourceforge.net>
3535
3536         Correct handling for "%R" macro in relative sysroot path specs.
3537
3538         * src/tarproc.cpp (pkgTarArchiveProcessor): In constructor, expand the
3539         sysroot path specification a second time, to capture the effect of any
3540         embedded macros, before computing the recorded `sysroot_len' value.
3541
3542 2010-05-05  Keith Marshall  <keithmarshall@users.sourceforge.net>
3543
3544         Handle "%" wildcard matches in package and subsystem version strings.
3545
3546         * src/pkgbase.h (pkgSpecs): Forward declare it.
3547         (pkgActionItem::~pkgActionItem): Declare explicit destructor.
3548         (pkgActionItem::SetRequirements): Add extra `pkgSpecs*' argument;
3549         update references, passing additional argument in...
3550
3551         * src/pkgdeps.cpp (pkgXmlDocument::ResolveDependencies): ...this.
3552
3553         * src/pkgexec.cpp (pkgActionItem::~pkgActionItem): Implement it.
3554         (pkgActionItem::SetRequirements): Delete obsolete implementation.
3555
3556         * src/pkginfo/pkginfo.h: Update copyright notice; add year 2010.
3557         (pkgSpecs::GetTarName): New public method; declare it.
3558         (pkgSpecs::SetProperty): New private method; declare it.
3559         (pkgSpecs::SetPackageName): New inline method; implement it.
3560         (pkgSpecs::SetPackageVersion, pkgSpecs::SetPackageBuild): Likewise.
3561         (pkgSpecs::SetSubSystemName, pkgSpecs::SetSubSystemVersion): Likewise.
3562         (pkgSpecs::SetSubSystemBuild, pkgSpecs::SetReleaseStatus): Likewise.
3563         (pkgSpecs::SetReleaseIndex, pkgSpecs::SetComponentClass): Likewise.
3564         (pkgSpecs::SetComponentVersion, pkgSpecs::SetPackageFormat): Likewise.
3565         (pkgSpecs::SetCompressionType): Likewise.
3566
3567         * src/pkginfo/pkginfo.l: Update copyright notice; add year 2010.
3568         (TRANS): Interpret "%" as wildcard in version string matches.
3569
3570         * src/pkgreqs.cpp: New file.
3571         (pkgActionItem::SetRequirements): Reimplement per new declaration;
3572         it now always allocates heap memory for requirements specifications.
3573         (pkgSpecs::GetTarName, pkgSpecs::SetProperty): Implement them.
3574
3575         * Makefile.in (CORE_DLL_OBJECTS): Add `pkgreqs.$(OBJEXT)'.
3576
3577 2010-04-30  Keith Marshall  <keithmarshall@users.sourceforge.net>
3578
3579         Revert 2010-04-04 refactoring of tarproc.cpp and tarinst.cpp
3580
3581         * src/tarinst.cpp: File removed; its content merged into...
3582         * src/tarproc.cpp: ...this; it cannot be cleanly separated out.
3583
3584         * Makefile.in (tarinst.$OBJEXT): Remove reference.
3585
3586 2010-04-29  Keith Marshall  <keithmarshall@users.sourceforge.net>
3587
3588         Handle "*" wildcard matches in package and subsystem version strings.
3589
3590         * src/vercmp.h (pkgVersionInfo::version_string): New private member
3591         variable; it stores a pointer to a dynamically allocated local copy of
3592         the invariant `version' argument, to facilitate correct parsing.
3593         (pkgVersionInfo::build_string): Likewise; it provides similar handling
3594         for the invariant `build' argument.
3595         (pkgVersionInfo::Free): New private inline method; it provides a NULL
3596         pointer safe wrapper, calling the C library `free()' function, (since
3597         some implementations are believed to be unsafe); it is used by...
3598         (pkgVersionInfo::~pkgVersionInfo): ...this new inline destructor, to
3599         release the memory allocated by the constructor, for `version_string'
3600         and `build_string'.
3601
3602         * src/vercmp.cpp (pkgVersionInfo::pkgVersionInfo): Allocate memory for
3603         `version_string' and `build_string', as required; populate it.
3604         Explicitly handle "*" as a `match anything' wildcard...
3605         (pkgVersionInfo::Compare): ...matching it as `equal' to everything.
3606
3607 2010-04-18  Keith Marshall  <keithmarshall@users.sourceforge.net>
3608
3609         Correct omission from configure script prerequisite checks.
3610
3611         * aclocal.m4 (MINGW_AC_OUTPUT): New macro; it wraps AC_OUTPUT itself,
3612         adding a trap to force an abort if any preceding prerequisite check
3613         was handled by MINGW_AC_ASSERT_MISSING.
3614
3615         * configure.ac: Qualify package component types, in prerequisite
3616         checks handled by MINGW_AC_ASSERT_MISSING; invoke MINGW_AC_OUTPUT
3617         in place of AC_OUTPUT.
3618
3619 2010-04-17  Keith Marshall  <keithmarshall@users.sourceforge.net>
3620
3621         Add configure script checks for prerequisite library headers.
3622         (Thanks to Cesar Strauss for proposing a rudimentary implementation).
3623
3624         * aclocal.m4: New file; it does no more than include...
3625         * m4/missing.m4: ...this; new file incorporated from build-aux module.
3626
3627         * configure.ac: Add AC_CHECK_HEADER assertions for...
3628         (zlib.h, bzlib.h, lzma.h): ...these; invoke MINGW_AC_ASSERT_MISSING in
3629         respect of each failing assertion.
3630
3631 2010-04-17  Keith Marshall  <keithmarshall@users.sourceforge.net>
3632
3633         Case-insensitive subsystem name matching revisited.
3634
3635         * src/pkgfind.cpp (pkgXmlDocument::FindPackageByName): Use...
3636         (subsystem_strcmp): ...this to match subsystem names, instead of...
3637         (match_if_explicit): ...this.
3638
3639 2010-04-15  Keith Marshall  <keithmarshall@users.sourceforge.net>
3640
3641         Enable recursive processing of repository package lists.
3642
3643         * src/pkgbase.h (pkgXmlDocument::SyncRepository): Make it public.
3644
3645         * src/pkgbind.cpp (pkgRepository): New locally defined and implemented
3646         class; it facilitates recursive loading and parsing of package lists,
3647         replacing much of the original non-recursive functionality within...
3648         (pkgXmlDocument::BindRepositories): ...this; use it.
3649
3650 2010-04-04  Keith Marshall  <keithmarshall@users.sourceforge.net>
3651
3652         Implement installer function; use per-package file manifests.
3653
3654         * src/pkgproc.h (pkgManifest): New class; declare it.
3655         (pkgArchiveProcessor::origin): New protected member variable.
3656         (pkgArchiveProcessor::sysroot_len): New protected member variable.
3657         (pkgArchiveProcessor::installed): Type changed to `pkgManifest *'.
3658         (pkgTarArchiveInstaller::Process): Declare specialisation hook.
3659         (pkgTarArchiveInstaller::UpdateInstallationManifest): Disused member
3660         function; remove redundant declaration from class definition.
3661         (pkgInstall): New generalised installation function; declare it.
3662         (pkgRegister): New function; declare it.
3663
3664         * src/pkginst.cpp: New file.
3665         (pkgManifest, pkgInstall, pkgRegister): Implement them.
3666
3667         * src/pkgexec.cpp (pkgActionItem::Execute): Use `pkgInstall' in place
3668         of stub formerly provided here.
3669
3670         * src/pkgkeys.h (manifest_key, reference_key): New keys; declare them.
3671         * src/pkgkeys.c (manifest_key, reference_key): Implement them.
3672
3673         * src/tarproc.cpp: Code refactored.
3674         (pkgTarArchiveProcessor::sysroot_len): Initialise it.
3675         (pkgTarArchiveProcessor::origin): Initialise it.
3676         (pkgTarArchiveProcessor::installed): Initialise; associate it with a
3677         pkgManifest class entity, and populate this as appropriate.
3678         (pkgTarArchiveProcessor::~pkgTarArchiveProcessor): Add explicit clean
3679         up of linked `pkgManifest *' entity referenced by `installed'.
3680         (pkgTarArchiveProcessor::Process) [TAR_ENTITY_TYPE_DIRECTORY]: Add
3681         braces to demarcate localised inner scope of string scan for removal
3682         of trailing directory name separators; (thanks to Cesar Strauss for
3683         reporting invalid local pointer declaration error in GCC >= 4.4).
3684         (pkgTarArchiveInstaller::UpdateInstallationManifest): Deleted.
3685         (pkgTarArchiveInstaller::pkgTarArchiveInstaller): Factor out.
3686         (pkgTarArchiveInstaller::ProcessDirectory): Likewise.
3687         (pkgTarArchiveInstaller::ProcessDataStream): Likewise.
3688         (commit_saved_entity): Likewise.
3689
3690         * src/tarinst.cpp: New file; it implements...
3691         (pkgTarArchiveInstaller::Process): ...this new specialisation
3692         of the original pkgTarArchiveProcessor::Process method...
3693         (pkgTarArchiveInstaller::pkgTarArchiveInstaller): ...and this
3694         refactored code, abstracted from src/tarproc.cpp and modified to
3695         use the pkgManifest class for installation tracking.
3696         (pkgTarArchiveInstaller::ProcessDirectory): Likewise.
3697         (pkgTarArchiveInstaller::ProcessDataStream): Likewise.
3698         (commit_saved_entity): Relocated from src/tarproc.cpp.
3699
3700         * Makefile.in (CORE_DLL_OBJECTS): Add...
3701         (pkginst.OBJEXT, tarinst.OBJEXT): ...these new object files.
3702
3703 2010-03-31  Keith Marshall  <keithmarshall@users.sourceforge.net>
3704
3705         Guard against NULL pointer dereferences in tinyxml code.
3706
3707         * src/pkgbase.h (pkgXmlNode::GetName): Verify `this' pointer is
3708         non-NULL, before invoking the underlying tinyxml method.
3709         (pkgXmlNode::GetParent, pkgXmlNode::GetChildren): Likewise.
3710         (pkgXmlNode::GetNext, pkgXmlNode::GetPropVal): Likewise.
3711         (pkgXmlNode::AddChild, pkgXmlNode::DeleteChild): Likewise.
3712         (pkgXmlNode::GetDocumentRoot): Likewise.
3713         (pkgXmlNode::IsElementOfType): Likewise.
3714
3715 2010-03-28  Cesar Strauss  <cestrauss@gmail.com>
3716
3717         Avoid running InternetAttemptConnect in pkgInternetAgent
3718         constructor, since it is called during DLL initialisation.
3719
3720         * src/pkginet.cpp (pkgInternetAgent::pkgInternetAgent): Move the
3721         InternetAttemptConnect call from constructor...
3722         (pkgInternetAgent::OpenURL): ...to here.
3723
3724 2010-03-23  Keith Marshall  <keithmarshall@users.sourceforge.net>
3725
3726         Automate object code dependency tracking.
3727
3728         * Makefile.in (DEPFLAGS): New macro; define it.
3729         (%.OBJEXT: %.c, %.OBJEXT: %.cpp): Add dependency generator commands...
3730         (%.d): ...to create these dependency maps; `sinclude' them, and...
3731         (clean): ...remove them.
3732         
3733         * .cvsignore (*.d): Add wild card template to match them.
3734
3735 2010-03-22  Keith Marshall  <keithmarshall@users.sourceforge.net>
3736
3737         Support case insensitive matching for file and subsystem names.
3738
3739         * src/pkgbase.h (safe_strcmp): New inline function; it provides NULL
3740         argument safe comparison of strings, returning the boolean inverse of
3741         the `strcmp' result, using either case-sensitive or case-insensitive
3742         semantics; derive it from...
3743         (match_if_explicit): ...this; redefine as macro; invoke `safe_strcmp'
3744         using explicitly case-sensitive semantics.
3745         (subsystem_strcmp): New macro; it invokes `safe_strcmp' with either
3746         case-sensitive or case-insensitive semantics, depending on...
3747         (CASE_INSENSITIVE_SUBSYSTEMS): ...this new context selection macro; it
3748         fixes the choice between case-sensitive and case-insensitive matching
3749         semantics for any given implementation, at compile time.
3750         (pkg_strcmp): New macro; it invokes `safe_strcmp' with either
3751         case-sensitive or case-insensitive semantics, depending on...
3752         (CASE_INSENSITIVE_FILESYSTEM): ...this new context selection macro; it
3753         fixes the choice between case-sensitive and case-insensitive matching
3754         semantics for any given implementation, at compile time.
3755
3756         * src/sysroot.cpp (pkgXmlNode::GetSysRoot): Use `subsystem_strcmp'.
3757
3758 2010-03-02  Keith Marshall  <keithmarshall@users.sourceforge.net>
3759
3760         Add preliminary support for virtual packages.
3761
3762         * src/pkgkeys.h (yes_value, no_value): Redefine as aliases...
3763         (value_yes, value_no): ...for these new global strings; declare them.
3764         (value_none, value_virtual): New global strings; declare them.
3765
3766         * src/pkgkeys.c (yes_value, no_value): Rename...
3767         (value_yes, value_no): ...to implement these, respectively.
3768         (value_none, value_virtual): Implement them.
3769
3770         * src/pkgname.cpp (pkgXmlNode::ArchiveName): Check containing package
3771         node for `class' attribute set to `value_virtual'; if present, always
3772         return the effective `tarname' property as `value_none'.
3773
3774         * src/pkginet.cpp (pkgActionItem::DownloadArchiveFiles): For packages
3775         with an effective `tarname' of `value_none', do not download anything.
3776
3777         * src/pkgexec.cpp (pkgActionItem::Execute): For packages with an
3778         effective `tarname' of `value_none', do not invoke any tar archive
3779         processing function.
3780
3781 2010-03-02  Keith Marshall  <keithmarshall@users.sourceforge.net>
3782
3783         Don't write installation records for unavailable packages.
3784
3785         * src/tarproc.cpp (pkgTarArchiveInstaller): In constructor, ensure
3786         archive is ready for processing, before initialising an installation
3787         manifest record.
3788
3789 2010-03-02  Keith Marshall  <keithmarshall@users.sourceforge.net>
3790
3791         Rationalise path identification for XML file locations.
3792
3793         * src/sysroot.cpp (pkgXmlDocument::LoadSystemMap): Use `xmlfile()'
3794         function to locate `sysroot' map file; free memory when done.
3795         (pkgXmlDocument::UpdateSystemMap): Likewise.
3796         (sigpath): Static global variable disused; delete it.
3797
3798 2010-03-01  Keith Marshall  <keithmarshall@users.sourceforge.net>
3799
3800         Extend package name search to include component packages.
3801
3802         * src/pkgfind.cpp (pkgHasMatchingName): Remove; fold it into...
3803         (pkgXmlNode::FindPackageByName): ...this; augment to extend search
3804         within package definition elements, seeking a potential match on an
3805         included component package name or component class-implied name.
3806
3807         * src/pkgkeys.h (class_key): New global string constant; declare it.
3808         * src/pkgkeys.c (class_key): Implement it.
3809
3810 2010-02-16  Keith Marshall  <keithmarshall@users.sourceforge.net>
3811
3812         Bump version for next release cycle.
3813
3814         * configure.ac (AC_INIT): Bump version suffix to alpha-2.
3815
3816 2010-02-16  Keith Marshall  <keithmarshall@users.sourceforge.net>
3817
3818         mingw-get-0.1-mingw32-alpha-1 released.
3819
3820 2010-02-16  Keith Marshall  <keithmarshall@users.sourceforge.net>
3821
3822         Prepare initial package release.
3823
3824         * README: New file; use it to source release notes.
3825
3826         * Makefile.in (SRCDIST_FILES): Use ...
3827         (LICENCE_FILES): ...this new macro; define it.
3828         (licdist): New build goal; implement it.
3829         (bindist): Require it; add alternative `zip' format package.
3830
3831         * xml/profile.xml (repository): Set default `package-index' name.
3832         (system-map): Normalise spelling for default `sysroot' path names.
3833
3834 2010-02-10  Keith Marshall  <keithmarshall@users.sourceforge.net>
3835
3836         Add directory/file records in installation manifests.
3837
3838         * src/pkgkeys.h (dirname_key, filename_key): New strings; declare...
3839         * src/pkgkeys.c (dirname_key, filename_key): ...and implement them.
3840
3841         * src/pkgproc.h (pkgArchiveProcessor::installed): New class member
3842         variable; declare it.
3843         (pkgTarArchiveInstaller::UpdateInstallationManifest): New method;
3844         declare it.
3845
3846         * src/tarproc.cpp: Miscellaneous comment updates.
3847         (pkgTarArchiveInstaller): In constructor...
3848         (pkgTarArchiveInstaller::installed): ...use new member variable...
3849         (pkgArchiveProcessor::installed): ...inherited from this.
3850         (pkgTarArchiveInstaller::UpdateInstallationManifest): Implement and...
3851         (pkgTarArchiveInstaller::ProcessDataStream): ...use it.
3852         (pkgTarArchiveInstaller::ProcessDirectory): Likewise.
3853
3854 2010-02-06  Keith Marshall  <keithmarshall@users.sourceforge.net>
3855
3856         Work around a deficiency in Microsoft's stat() implementation.
3857
3858         * src/tarproc.cpp (pkgTarArchiveProcessor::ProcessDirectory): Don't
3859         pass a `pathname' argument with trailing slashes; strip them off.
3860
3861 2010-02-06  Keith Marshall  <keithmarshall@users.sourceforge.net>
3862
3863         Add machinery for installation and packaging for distribution.
3864
3865         * install-sh: New file; source it from autoconf distribution.
3866
3867         * configure.ac (AC_PREFIX_DEFAULT): Assign it as `C:/MinGW'.
3868         (AC_PROG_MKDIR_P, AC_PROG_INSTALL, AC_PROG_LN_S): Invoke these.
3869         (STRIP): New output variable; use AC_CHECK_TOOL to define it.
3870
3871         * Makefile.in (abs_top_srcdir): Define to AC_SUBST value.
3872         (PACKAGE_TARNAME, PACKAGE_VERSION): Define to AC_SUBST values.
3873         (prefix, exec_prefix, bindir, libexecdir, localstatedir): Likewise.
3874         (INSTALL, INSTALL_PROGRAM, INSTALL_SCRIPT, INSTALL_DATA): Likewise.
3875         (STRIP): New macro; define it using AC_CHECK_TOOL substitution.
3876         (mkinstalldirs): New macro; define it as AC_PROG_MKDIR_P result.
3877         (LN_S): New macro; define it as AC_PROG_LN_S result.
3878         (dist, srcdist, bindist): New build objectives; implement them.
3879         (install, installdirs, install-strip, maintainer-clean): Likewise.
3880         (SRCDIST_FILES, SRCDIST_SUBDIRS): New macros; define them.
3881         (PACKAGE_DISTNAME, PACKAGE_DISTVERSION): Likewise.
3882         (PACKAGE_DISTROOT, PACKAGE_ROOTVERSION): Likewise.
3883         (PACKAGE_CONFIG_DIR): Likewise.
3884
3885 2010-02-02  Keith Marshall  <keithmarshall@users.sourceforge.net>
3886
3887         Implement package installer for tar archives.
3888
3889         * src/pkgexec.cpp (pkgXmlDocument::Execute): Replace existing
3890         stub implementation of installer, using methods provided by...
3891         * src/pkgproc.h, src/tarproc.cpp: ...these new files, with trap...
3892         * src/pkgdeps.cpp (pkgXmlDocument::Schedule) [installed]: Add entry...
3893         (pkgActionItem::Selection) [to_remove]: ...for this; use it to detect
3894         `install' requests for packages which are aleady installed.
3895
3896         * Makefile.in (CORE_DLL_OBJECTS): Add tarproc.$(OBJEXT); specify
3897         dependencies as appropriate.
3898
3899         * src/sysroot.cpp (pkgXmlDocument::LoadSystemMap): Don't commit
3900         newly created `sysroot' mapping records to disk; defer to...
3901         (pkgXmlDocument::UpdateSystemMap): ...this new method.
3902         (sigpath): Make it a global variable, with file (static) scope.
3903
3904         * src/climain.cpp (pkgXmlDocument::UpdateSystemMap): Invoke it.
3905
3906         * src/pkgkeys.h (download_key, modified_key, source_key): New global
3907         string variables; declare them, providing their implementations...
3908         * src/pkgkeys.c (download_key, modified_key, source_key): ...here.
3909         * src/pkgname.cpp (download_key, source_key): Use them.
3910
3911         * src/pkginet.cpp (pkgActionItem::ArchivePath): Delete; replace...
3912         * src/mkpath.c (pkgArchivePath): ...with this free standing function.
3913         * src/mkpath.h (pkgArchivePath): Declare its prototype.
3914
3915         * src/pkgbase.h (pkgActionItem::ArchivePath): Delete declaration.
3916         (pkgXmlDocument): Add a default constructor; implement as `inline'.
3917         (pkgXmlDocument::AddDeclaration): Use heap memory to allocate the new
3918         declaration object, instead of `auto' variable, to avoid scope error.
3919         (pkgXmlDocument::UpdateSystemMap): Declare it.
3920
3921 2010-01-26  Keith Marshall  <keithmarshall@users.sourceforge.net>
3922
3923         Implement rudimentary dependency resolver.
3924
3925         * src/pkgdeps.cpp: New file.
3926
3927         * Makefile.in (CORE_DLL_OBJECTS): Add pkgdeps.$(OBJEXT) reference;
3928         establish header file dependencies.
3929
3930         * src/pkgbase.h (to_remove, to_install, selection_types): New enum.
3931         (pkgActionItem::selection): Extend it to store as enumerated pair...
3932         (pkgActionItem::SelectPackage): New inline method; assign them.
3933         (pkgActionItem::Selection): New inline method; retrieve them.
3934         (pkgXmlNode::GetInstallationRecord): New method; declare it.
3935
3936         * src/pkgexec.cpp (pkgActionItem): In constructor...
3937         (selection): ...initialise both references in enumerated pair.
3938         (pkgActionItem::GetReference): Use `Selection()' method.
3939         (pkgActionItem::SelectIfMostRecent): Ditto; also correct logic for
3940         making selection, and assign to `to_install' element.
3941         (pkgXmlDocument::Schedule): Don't update `request'.
3942         (pkgActionItem::Execute): Implement as stub.
3943
3944         * src/pkginet.cpp (pkgActionItem::DownloadArchiveFiles): Use new
3945         `Selection()' method.
3946
3947         * src/pkgkeys.h (yes_value, no_value): Declare new string constants.
3948         * src/pkgkeys.c (yes_value, no_value): Implement them.
3949
3950         * src/vercmp.cpp: Update copyright notice.
3951         (pkgVersionInfo::operator<=): Bug fix; must test for `<', but had `>'.
3952
3953 2010-01-23  Keith Marshall  <keithmarshall@users.sourceforge.net>
3954
3955         Avoid segmentation faults when processing invalid data streams.
3956
3957         * src/pkgstrm.h: Update copyright notice.
3958         (pkgArchiveStream::IsReady): New pure virtual method.
3959         (pkgRawArchiveStream::IsReady): Provide inline implementation.
3960         (pkgGzipArchiveStream::IsReady): Likewise.
3961         (pkgBzipArchiveStream::IsReady): Likewise.
3962         (pkgLzmaArchiveStream::IsReady): Likewise.
3963         (pkgXzArchiveStream::IsReady): Likewise.
3964
3965         * src/pkgstrm.cpp: Update copyright notice.
3966         (pkgLzmaArchiveStream, pkgXzArchiveStream) [fd == -1]: Decline to
3967         perform any form of read or decode processing.
3968
3969         * src/pkginet.cpp (pkgInternetLzmaStreamingAgent): Use `fd = -2' as
3970         pseudo-descriptor for the pkgLzmaArchiveStream derived component of
3971         this internet data streaming class.
3972
3973 2010-01-23  Keith Marshall  <keithmarshall@users.sourceforge.net>
3974
3975         Require liblzma >= liblzma-4.999.9beta_20091209-3-mingw32-dev
3976
3977         * src/pkgstrm.h (LZMA_API_STATIC): Remove definition and associated
3978         comment; it was required to permit, (but not to enforce), linking to
3979         the static liblzma.a library, with earlier beta releases, but this
3980         anomaly has now been corrected.
3981
3982 2010-01-22  Keith Marshall  <keithmarshall@users.sourceforge.net>
3983
3984         Remove zlib sources from trunk.
3985         (Application builders should use free standing implementation of
3986          zlib, from MinGW's package distribution page on SourceForge).
3987
3988 2010-01-22  Keith Marshall  <keithmarshall@users.sourceforge.net>
3989
3990         Remove bzip2 sources from trunk.
3991         (Application builders should use free standing implementation of
3992          bzip2, from MinGW's package distribution page on SourceForge).
3993
3994 2010-01-22  Keith Marshall  <keithmarshall@users.sourceforge.net>
3995
3996         Add subsystem specific sysroot mapping facility.
3997
3998         * src/pkghash.c: New file; required by...
3999         * src/sysroot.cpp: New file; it implements...
4000         (pkgXmlDocument::LoadSystemMap, pkgXmlNode::GetSysRoot): New methods.
4001
4002         * src/pkgbase.h: Update copyright notice.
4003         (pkgXmlDocument::LoadSystemMap): Declare it.
4004         (pkgXmlDocument::AddDeclaration): New inline method.
4005         (pkgXmlDocument::SetRoot, pkgXmlDocument::Save): Likewise.
4006         (pkgXmlNode::GetSysRoot): Declare it.
4007         (pkgXmlNode::GetDocumentRoot): New inline method.
4008         (pkgXmlNode::AddChild, pkgXmlNode::DeleteChild): Likewise.
4009
4010         * src/climain.cpp: Update copyright notice.
4011         (climain): Invoke pkgXmlDocument::LoadSystemMap() as required.
4012
4013         * Makefile.in (CORE_DLL_OBJECTS): Add ...
4014         (pkghash.$(OBJEXT), sysroot.$(OBJEXT)): ...these; upate dependencies.
4015         (DEBUGLEVEL): New macro; define it.
4016         (CPPFLAGS): Use it.
4017
4018 2010-01-16  Keith Marshall  <keithmarshall@users.sourceforge.net>
4019
4020         Assign standardised keys for XML database lookup.
4021
4022         * src/pkgkeys.h: New file; provide public key declarations.
4023         * src/pkgkeys.c: New file; implement them.
4024
4025         * src/pkgbind.cpp: Use them; update copyright notice.
4026         * src/pkgexec.cpp, src/pkgfind.cpp, src/pkginet.cpp: Likewise.
4027         * src/pkgname.cpp, src/pkgspec.cpp: Likewise.
4028
4029         * Makfile.in (CORE_DLL_OBJECTS): Add pkgkeys.$(OBJEXT); update all
4030         dependencies accordingly.
4031
4032 2010-01-08  Keith Marshall  <keithmarshall@users.sourceforge.net>
4033
4034         Add CLI version reporting option.
4035
4036         * configure.ac: Update copyright notice for new year.
4037         (COPYRIGHT_HOLDER): New AC_SUBST variable; define it.
4038         (YEARS_OF_ISSUE): New AC_SUBST variable; define it.
4039         (AC_CONFIG_FILES): Add `version.c'; source it from...
4040
4041         * version.c.in: ...this new file.
4042
4043         * Makefile.in: Update copyright notice for new year.
4044         (mingw-get$(EXEEXT)): Add dependency on `version.$(OBJEXT)'.
4045         (distclean): Add `version.c'.
4046
4047         * configure: Regenerated.
4048
4049         * src/clistub.c: Update copyright notice for new year.
4050         (options): New array of `struct option'; define and use it as the
4051         reference for `argv' parsing with `getopt_long_only()'.
4052
4053 2009-12-17  Keith Marshall  <keithmarshall@users.sourceforge.net>
4054
4055         Add CLI support for "update" action.
4056
4057         * src/pkgtask.h (ACTION_UPDATE): Define it, derived from...
4058         (action_update): ...this new entry in anonymous enumeration.
4059         
4060         * src/pkgexec.cpp (action_name): Add "update" keyword identification.
4061
4062         * src/pkgbase.h: Typo in comment; s/xwXmlDocument/wxXmlDocument/.
4063         (pkgXmlDocument::BindRepositories): Add `force_update' parameter...
4064         * src/pkgbind.cpp (pkgXmlDocument::BindRepositories): Use it to...
4065         (pkgXmlDocument::SyncRepository): ...invoke this method when passed as
4066         a `true' flag, in addition to (as previously) first time reference.
4067
4068         * src/climain.cpp (climain): Interpret "update" keyword for...
4069         [ACTION_UPDATE]: ...passing state as `force_update' parameter to...
4070         (pkgXmlDocument::BindRepositories): ...this method, then...
4071         [!ACTION_UPDATE]: Follow with normal action processing.
4072
4073 2009-12-16  Keith Marshall  <keithmarshall@users.sourceforge.net>
4074
4075         Add status checking for Internet URL connections.
4076
4077         * src/pkginet.cpp (pkgInternetAgent::QueryStatus): New method.
4078         (pkgInternetStreamingAgent::Get): Use it; set `dl_status' as return
4079         value, deferring failure diagnostics to callers, i.e. to...
4080         (pkgXmlDocument::SyncRepositories): ...this, and to...
4081         (pkgActionItem::DownloadArchiveFiles): ...this.
4082
4083 2009-11-23  Keith Marshall  <keithmarshall@users.sourceforge.net>
4084
4085         Add package download and repository synchronisation machinery.
4086
4087         * src/pkgstrm.h: New header file.
4088
4089         * src/pkgbind.cpp, src/pkginet.cpp, src/pkgstrm.cpp,
4090         src/pkgfind.cpp, src/pkgname.cpp, src/keyword.c: New files.
4091         * Makefile.in (CORE_DLL_OBJECTS): Add build goals for them.
4092
4093         * xml: New directory.
4094
4095         * src/climain.cpp (climain): Establish repository bindings from...
4096         * xml/profile.xml: ...this new configuration file.
4097
4098 2009-11-16  Keith Marshall  <keithmarshall@users.sourceforge.net>
4099
4100         Add XML database bindings and preliminary action executive for CLI.
4101
4102         * src/pkgbase.h, src/pkgtask.h,
4103         src/mkpath.h, src/vercmp.h: New header files.
4104
4105         * src/climain.cpp, src/pkgexec.cpp, src/pkgspec.cpp,
4106         src/mkpath.c, src/vercmp.cpp, src/xmlfile.c: New files.
4107
4108         * Makefile.in (CORE_DLL_OBJECTS): Define initial set of files...
4109         (mingw-get-0.dll): ...build them into this new DLL target; add it...
4110         (all): ...as prerequisite for this primary build goal.
4111
4112 2009-11-12  Keith Marshall  <keithmarshall@users.sourceforge.net>
4113
4114         Avoid some potential GCC warnings.
4115
4116         * src/clistub.c: Include process.h for `execv' prototype...
4117         (main): Cast `argv' to appropriately matched type when calling it.
4118
4119         * src/pkginfo/driver.c: Include stdlib.h for `free' prototype.
4120
4121 2009-11-11  Keith Marshall  <keithmarshall@users.sourceforge.net>
4122
4123         Create diagnostic message handler for CLI usage.
4124
4125         * src/dmh.h: New header file; it defines the public interface.
4126         * src/dmh.cpp: New file; it implements the message handler.
4127
4128 2009-11-05  Keith Marshall  <keithmarshall@users.sourceforge.net>
4129
4130         Correct some identified TinyXML issues.
4131
4132         * tinyxml/tinyxml.h (IsWhiteSpace): Add FIXME annotation to flag
4133         probable redundancy of checks for '\n' and '\r'.
4134         * tinyxml/tinyxmlparser.cpp: Revert John E's 2008-08-09 change; remove
4135         all such redundancies in IsWhiteSpace() calls throughout.
4136
4137         * tinyxml/tinyxml.cpp (TiXmlAttribute::SetDoubleValue): Correct format
4138         specification in sprintf()/snprintf() calls; "%lf" is invalid; replace
4139         with "%f".
4140
4141 2009-10-31  Keith Marshall  <keithmarshall@users.sourceforge.net>
4142
4143         Add CLI loader stub.
4144
4145         * src/clistub.c: New file.
4146         * Makefile.in: Add build rule for it; build as...
4147         (mingw-get.exe): ...this; also add to...
4148         (clean): ...this goal.
4149
4150 2009-10-31  Keith Marshall  <keithmarshall@users.sourceforge.net>
4151
4152         Set up build mechanism.
4153
4154         * configure.ac, Makefile.in: New files.
4155         * .cvsignore (configure, autom4te.cache): Add to ignored files.
4156
4157 2009-10-30  Keith Marshall  <keithmarshall@users.sourceforge.net>
4158
4159         Add GPL-v3 licensing terms.
4160
4161         * COPYING: New file, sourced from gnu.org.
4162
4163 2009-10-12  Keith Marshall  <keithmarshall@users.sourceforge.net>
4164
4165         Add pkginfo implementation.
4166
4167         * src, src/pkginfo: New directories.
4168         * src/pkginfo/pkginfo.h, src/pkginfo/pkginfo.l: New files.
4169         * src/pkginfo/driver.c: New file.
4170
4171 2009-10-12  Keith Marshall  <keithmarshall@users.sourceforge.net>
4172
4173         Create tdm-branch.
4174
4175         * All files (tdm-branch): Assign new branch tag.
4176         * All top-level files: Remove from trunk.
4177         * ChangeLog: New file.