OSDN Git Service

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