OSDN Git Service

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