OSDN Git Service

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