OSDN Git Service

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