OSDN Git Service

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