OSDN Git Service

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