OSDN Git Service

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