OSDN Git Service

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