OSDN Git Service

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