OSDN Git Service

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