OSDN Git Service

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