OSDN Git Service

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