OSDN Git Service

Add preliminary CLI support for "list" and "show" actions.
[mingw/mingw-get.git] / ChangeLog
1 2010-12-30  Keith Marshall  <keithmarshall@users.sourceforge.net>
2
3         Add preliminary CLI support for "list" and "show" actions.
4
5         * src/pkgtask.h (ACTION_PRIMARY): New manifest constant; define it.
6         (ACTION_LIST, ACTION_SHOW): Likewise; cast to enumerated values for...
7         (action_list, action_show): ...these; define them.
8
9         * src/pkgexec.cpp (action_name): Add defining text for...
10         (action_list, action_show): ...these.
11
12         * src/climain.cpp: Partially revert 2010-11-01 change...
13         (climain) [! ACTION_UPDATE]: Reinstate original "if" block, moving
14         the "switch" block within it, but without the ACTION_UPDATE case.
15         [ACTION_LIST, ACTION_SHOW]: New "switch" cases; they invoke...
16         (pkgXmlDocument::DisplayPackageInfo): ...this new method.
17
18         * src/pkgbase.h (pkgXmlDocument::DisplayPackageInfo): Declare it.
19         (pkgActionItem::ConfirmInstallationStatus): New method; declare it.
20         (pkgXmlNode::GetSysRoot): Make declaration style consistent with
21         others in the class; do not name arguments in the declaration.
22         (pkgXmlNode::FindFirstAssociate): Likewise.
23         (pkgXmlNode::FindNextAssociate): Likewise.
24
25         * src/pkgshow.cpp: New file.
26         (pkgXmlDocument::DisplayPackageInfo): Implement it.
27
28         * src/pkgdeps.cpp (pkgMsgUnknownPackage): New extern "C" function;
29         implement it temporarily, pending a future i18n reimplementation.
30         (assert_installed): Drop "inline" attribute; leave it as "static".
31         Set "tarname" correctly, to match the installed package version; (it
32         previously incorrectly returned the latest available version).
33         (pkgActionItem::ConfirmInstallationStatus): Implement it.
34         (pkgXmlDocument::Schedule) [ACTION_PRIMARY]: Set as appropriate.
35         (pkgXmlDocument::Schedule) [ACTION_REMOVE || ACTION_UPGRADE]: Complain
36         if requested package is not recorded as having been installed.
37         (pkgXmlDocument::ResolveDependencies) [! ACTION_INSTALL]: Do not
38         invoke it recursively.
39
40         * Makefile.in (pkgshow.$OBJEXT): Add reference.
41
42 2010-11-01  Keith Marshall  <keithmarshall@users.sourceforge.net>
43
44         Lay groundwork for implentation of additional actions.
45
46         * src/climain.cpp (climain): Adjust indentation; replace `if' block...
47         [action != ACTION_UPDATE]: ...with this default `switch' case, and...
48         [action == ACTION_UPDATE]: ...this as explicit "do nothing" case.
49
50 2010-10-29  Keith Marshall  <keithmarshall@users.sourceforge.net>
51
52         mingw-get-0.1-mingw32-alpha-5 released.
53
54         * configure.ac: Bump version to 0.1-alpha-5.
55         * README: Update release notes accordingly.
56         * All files (r0-1-alpha-5): Tag assigned.
57
58 2010-10-22  Keith Marshall  <keithmarshall@users.sourceforge.net>
59
60         Make pkgInitRites/pkgLastRites processing more robust;
61         avoid a potential race condition in mingw-get-inst.
62
63         * src/rites.c: Refactor conditional code to segregate execution of...
64         [defined IMPLEMENT_INITIATION_RITES]: ...this into distinct phases.
65         (PHASE_ONE_RITES, PHASE_TWO_RITES): Define constants to identify them.
66         (do_init_rites): Renamed to...
67         (invoke_rites): ...this; inline it.
68         (pkgLastRites): Invoke it, to pre-empt rename action of...
69         (lastrites.exe): ...this, subsequently exec()ed process.
70         (perror): Issue more informative diagnostic on exec() failure.
71
72         * src/clistub.c (IMPLEMENT_INITIATION_RITES): Stipulate as...
73         (PHASE_ONE_RITES): ...this phase of implementation only.
74
75         * src/pkgexec.cpp (IMPLEMENT_INITIATION_RITES): Define to provide...
76         (PHASE_TWO_RITES): ...this phase of implementation, facilitated by...
77         (self_upgrade_rites): ...this locally defined RITES_INLINE function.
78         (pkgActionItem::Execute): Invoke it, in remove/install loop, while...
79         [init_rites_pending]: ...new loop local variable remains true.
80
81 2010-09-10  Charles Wilson  <mingw@cwilson.fastmail.fm>
82
83         Fix packaging bug in -lic package.
84
85         * Makefile.in (licdist): Use directory named
86         "share", not "shared".
87
88 2010-09-10  Charles Wilson  <mingw@cwilson.fastmail.fm>
89
90         mingw-get-0.1-mingw32-alpha-4 released.
91
92         * All files (r0-1-alpha-4): Tag assigned.
93
94 2010-09-10  Charles Wilson  <mingw@cwilson.fastmail.fm>
95
96         Add rudimentary help option.
97
98         * README: Update release notes.
99
100         * src/clistub.c: Add --help option.
101
102 2010-09-10  Charles Wilson  <mingw@cwilson.fastmail.fm>
103
104         Fix "mingw-get deletes itself" bug in last rites handling.
105
106         * README: Add new release notes.
107
108         * configure.ac: Bump version to 0.1-alpha-4.
109
110         * src/dmh.h: If __cplusplus, include <exception> and
111         declare dmh_exception class.
112
113         * src/dmh.cpp (class dmh_exception): Implement.
114         (abort_if_fatal): If DMH_FATAL, throw dmh_exception rather
115         than calling exit().
116
117         * src/climain.cpp (climain): Wrap entire function body in try/
118         catch block. If dmh_exception is caught, return EXIT_FAILURE.
119
120         * src/clistub.c (main): Capture return value of climain(). If
121         non-zero, perform last rites and return EXIT_FAILURE.
122
123 2010-08-30  Keith Marshall  <keithmarshall@users.sourceforge.net>
124
125         mingw-get-0.1-mingw32-alpha-3 released.
126
127         * README: Add new release notes.
128
129         * All files (r0-1-alpha-3): Tag assigned.
130
131 2010-08-27  Keith Marshall  <keithmarshall@users.sourceforge.net>
132
133         Add runtime hooks to support self-upgrade for future releases.
134
135         * src/rites.c: New file; compile it free-standing, to provide...
136         (lastrites.exe): ...this helper application for context clean-up;
137         alternatively, use it as an include file, with pre-definition of...
138         (IMPLEMENT_INITIATION_RITES): ...this, to implement...
139         (pkgInitRites, pkgLastRites): ...these inline functions.
140
141         * src/clistub.c (main) [argc > 1]: Use them.
142         (progname): New local variable within `main'; set it once, then use it
143         instead of repeated references to `basename(*argv)' in diagnostics.
144         (MINGW_GET_DLL, MINGW_GET_GUI): Relocate to `src/rites.c'.
145
146         * src/debug.h (DEBUG_INHIBIT_RITES_OF_PASSAGE):
147         (DEBUG_FAIL_FILE_RENAME_RITE, DEBUG_FAIL_FILE_UNLINK_RITE): New
148         defines; they facilitate debugging of the src/rites.c code.
149
150         * Makefile.in (lastrites$EXEEXT): New target; build as prerequisite...
151         (all): ...of this primary target.
152         (install, install-strip): Install it.
153         (SRCDIST_FILES): Remove install-sh; it is now included in...
154         (build-aux): ...this directory; add it to...
155         (SRCDIST_SUBDIRS): ...this.
156
157 2010-08-24  Keith Marshall  <keithmarshall@users.sourceforge.net>
158
159         Set default sysroots relative to mingw-get installation directory.
160
161         * xml/profile.xml (system-map) [name == default]: For each of...
162         [subsystem == mingw32]: ...set sysroot path to value of %R macro...
163         [subsystem == msys]: ...and to its %R/msys/1.0 subdirectory.
164
165 2010-08-19  Keith Marshall  <keithmarshall@users.sourceforge.net>
166
167         Some dependency resolver enhancements and bug fixes.
168
169         * src/pkgbase.h (pkgXmlNode::GetContainerAttribute): New method;
170         declare it.
171
172         * src/pkgdeps.cpp (pkgXmlNode::GetContainerAttribute): Implement it;
173         it is used to retrieve package name attributes from the containing
174         'package' element, when given a pointer to a 'release' element by...
175         (assert_unmatched, assert_installed): ...these new static functions.
176         (pkgXmlDocument::Schedule): Use them to reconstruct and register
177         dependency reference data for previously installed packages which are
178         no longer included in the distribution manifest.
179         (pkgXmlDocument::ResolveDependencies): Fix a block nesting error;
180         catch and diagnose unresolved dependencies; don't look beyond the XML
181         document root node, (tinyxml error not caught?), when searching for
182         requirements specified on container nodes.
183
184 2010-08-17  Keith Marshall  <keithmarshall@users.sourceforge.net>
185
186         Improve scheduling of package processing requests.
187
188         * src/pkgexec.cpp (pkgXmlDocument::Schedule): Inspect entire `actions'
189         list, when checking for duplicate package processing requests; decline
190         to schedule any such duplicate, or any request which lacks a package
191         association.
192
193 2010-08-15  Keith Marshall  <keithmarshall@users.sourceforge.net>
194
195         Lay foundation for selective compilation of debugging code.
196
197         * src/debug.h: New file...
198         * src/sysroot.cpp: Include it.
199         (pkgXmlDocument::LoadSystemMap): Make debugging output conditional...
200         [DEBUGLEVEL & DEBUG_TRACE_INIT]: ...on this new debugging state.
201
202 2010-08-15  Keith Marshall  <keithmarshall@users.sourceforge.net>
203
204         * src/pkgkeys.h: Typo in comment: file was previously identified as
205         pkgkeys.c; corrected.
206
207 2010-08-13  Keith Marshall  <keithmarshall@users.sourceforge.net>
208
209         Improve diagnostics for invalid references to non-release XML nodes.
210
211         * src/pkgkeys.h (value_unknown): New global string; declare it.
212         * src/pkgkeys.c (value_unknown): Implement it.
213
214         * src/pkgname.cpp (pkgArchiveName): Identify XML element type when
215         diagnosing references to elements of types other than release; use...
216         (value_unknown): ...this, as appropriate.
217
218 2010-08-12  Keith Marshall  <keithmarshall@users.sourceforge.net>
219
220         Guard against a potential buffer overrun.
221
222         * src/pkgreqs.cpp (pkgSpecs::SetProperty): Allocate an additional
223         byte to accommodate an extra field separator, when inserting a new
224         data value into a previously empty field.
225
226 2010-07-27  Cesar Strauss  <cestrauss@gmail.com>
227
228         Handle the GNU long name tar header format.
229
230         * src/pkgproc.h (TAR_ENTITY_TYPE_GNU_LONGNAME): New manifest constant;
231         define it.
232         (pkgTarArchiveProcessor::EntityDataAsString): New protected method;
233         declare and...
234         * src/tarproc.cpp: ...implement it.
235         (pkgTarArchiveProcessor::Process): Before building the entry pathname,
236         check for a GNU long name type header; when found, read pathname from
237         the entry data area, before fetching the following header, from which
238         to retrieve the associated entity data.
239
240 2010-06-24  Keith Marshall  <keithmarshall@users.sourceforge.net>
241
242         Work around an autoconf bug (reported by Stefano Sabatini).
243
244         * Makefile.in (VPATH): Use @top_srcdir@ instead of ${srcdir}; current
245         autoconf incorrectly elides references to @srcdir@ and ${srcdir} when
246         substituting within a VPATH specification for building `in-source'.
247         Also, prefer colons to blanks as path name separators, for improved
248         portability to non-GNU implementations of make; (recommendation by
249         Ralf Wildenhues).
250
251 2010-06-24  Keith Marshall  <keithmarshall@users.sourceforge.net>
252
253         Include alias search, when matching component package name.
254
255         * src/keyword.c (has_keyword): Rearrange argument declarations for
256         more natural order; update all callers accordingly.  Simplify; compare
257         keyword to be matched with each successive candidate from match-list,
258         character-by-character and in-place, so avoiding memory allocation
259         for any local duplicate of the passed match-list; thus...
260         (safe_strdup): ...this static function no longer required; delete it.
261         (string.h): No references remain; do not include it.
262
263         * src/pkgfind.cpp (pkgXmlNode::FindPackageByName): Augment component
264         package name matching to include potential matches of the look-up name
265         with trailing component name stripped off, when that matches the class
266         name of an identified component package, and the initial substring of
267         the look-up name, after stripping, matches any specified alias name
268         for the containing package.
269
270 2010-06-10  Keith Marshall  <keithmarshall@users.sourceforge.net>
271
272         Address FIXME relating to identification of distributable files.
273
274         * install-sh: Move to...
275         * build-aux: ...this new directory.
276
277         * Makefile.in (PACKAGE_DISTVERSION): Modify `sed' edit sequence; make
278         it depend on, and ensure that it incorporates the expansion of...
279         (PACKAGE_SUBSYSTEM): ...this new macro; defined as substitution of...
280         (host_os): ...this autoconf variable, set by...
281
282         * configure.ac (AC_CANONICAL_HOST): ...this; add it, requiring...
283         (AC_CONFIG_AUX_DIR): ...`build-aux' directory reference, providing...
284
285         * build-aux/config.guess, build-aux/config.sub: ...these new standard
286         files; import them from the standard `build-aux' repository.
287
288 2010-05-17  Keith Marshall  <keithmarshall@users.sourceforge.net>
289
290         Bump version for next release cycle.
291
292         * configure.ac (AC_INIT): Bump version suffix to alpha-3.
293
294 2010-05-17  Keith Marshall  <keithmarshall@users.sourceforge.net>
295
296         mingw-get-0.1-mingw32-alpha-2 released.
297
298         * README: Add new release notes.
299
300         * xml/profile.xml: Update to use default referencing for...
301         (package-list.xml.lzma): ...this repository master catalogue.
302
303         * All files (r0-1-alpha-2): Tag assigned.
304
305 2010-05-12  Keith Marshall  <keithmarshall@users.sourceforge.net>
306
307         Make provision to protect user's profile settings during upgrade.
308
309         * Makefile.in (install): Remove `profile.xml'; replace it with...
310         (install-profile): ...this new prerequisite installation goal; it
311         renames the installed copy of `profile.xml' as `defaults.xml', within
312         the installed package image.
313
314         * src/pkgkeys.h (defaults_key): New key; declare it.
315         * src/pkgkeys.c: Some cosmetic formatting (tabulation) adjustments.
316         (defaults_key): Implement it; it refers to the `defaults.xml' file.
317
318         * src/climain.cpp (climain): Check `profile_key' for accessibility of
319         the `profile.xml' file; if [! R_OK] emit a diagnostic warning, fall
320         back on `defaults_key', and attempt to load configuration from the
321         distributed `defaults.xml' file.
322
323 2010-05-11  Keith Marshall  <keithmarshall@users.sourceforge.net>
324
325         Add preliminary support for future `-reinstall' option.
326
327         * src/pkgexec.cpp (pkgActionItem::Execute) [ACTION_INSTALL]: Force
328         installation if `-reinstall' option is selected, overriding state of
329         any prior installation; temporarily assume that this option is always
330         selected, to permit proper `upgrade' operation in the absence of any
331         functional `uninstall' capability, and pending implementation of a
332         mechanism for interpreting user specified options.
333
334 2010-05-11  Keith Marshall  <keithmarshall@users.sourceforge.net>
335
336         Correct handling for "%R" macro in relative sysroot path specs.
337
338         * src/tarproc.cpp (pkgTarArchiveProcessor): In constructor, expand the
339         sysroot path specification a second time, to capture the effect of any
340         embedded macros, before computing the recorded `sysroot_len' value.
341
342 2010-05-05  Keith Marshall  <keithmarshall@users.sourceforge.net>
343
344         Handle "%" wildcard matches in package and subsystem version strings.
345
346         * src/pkgbase.h (pkgSpecs): Forward declare it.
347         (pkgActionItem::~pkgActionItem): Declare explicit destructor.
348         (pkgActionItem::SetRequirements): Add extra `pkgSpecs*' argument;
349         update references, passing additional argument in...
350
351         * src/pkgdeps.cpp (pkgXmlDocument::ResolveDependencies): ...this.
352
353         * src/pkgexec.cpp (pkgActionItem::~pkgActionItem): Implement it.
354         (pkgActionItem::SetRequirements): Delete obsolete implementation.
355
356         * src/pkginfo/pkginfo.h: Update copyright notice; add year 2010.
357         (pkgSpecs::GetTarName): New public method; declare it.
358         (pkgSpecs::SetProperty): New private method; declare it.
359         (pkgSpecs::SetPackageName): New inline method; implement it.
360         (pkgSpecs::SetPackageVersion, pkgSpecs::SetPackageBuild): Likewise.
361         (pkgSpecs::SetSubSystemName, pkgSpecs::SetSubSystemVersion): Likewise.
362         (pkgSpecs::SetSubSystemBuild, pkgSpecs::SetReleaseStatus): Likewise.
363         (pkgSpecs::SetReleaseIndex, pkgSpecs::SetComponentClass): Likewise.
364         (pkgSpecs::SetComponentVersion, pkgSpecs::SetPackageFormat): Likewise.
365         (pkgSpecs::SetCompressionType): Likewise.
366
367         * src/pkginfo/pkginfo.l: Update copyright notice; add year 2010.
368         (TRANS): Interpret "%" as wildcard in version string matches.
369
370         * src/pkgreqs.cpp: New file.
371         (pkgActionItem::SetRequirements): Reimplement per new declaration;
372         it now always allocates heap memory for requirements specifications.
373         (pkgSpecs::GetTarName, pkgSpecs::SetProperty): Implement them.
374
375         * Makefile.in (CORE_DLL_OBJECTS): Add `pkgreqs.$(OBJEXT)'.
376
377 2010-04-30  Keith Marshall  <keithmarshall@users.sourceforge.net>
378
379         Revert 2010-04-04 refactoring of tarproc.cpp and tarinst.cpp
380
381         * src/tarinst.cpp: File removed; its content merged into...
382         * src/tarproc.cpp: ...this; it cannot be cleanly separated out.
383
384         * Makefile.in (tarinst.$OBJEXT): Remove reference.
385
386 2010-04-29  Keith Marshall  <keithmarshall@users.sourceforge.net>
387
388         Handle "*" wildcard matches in package and subsystem version strings.
389
390         * src/vercmp.h (pkgVersionInfo::version_string): New private member
391         variable; it stores a pointer to a dynamically allocated local copy of
392         the invariant `version' argument, to facilitate correct parsing.
393         (pkgVersionInfo::build_string): Likewise; it provides similar handling
394         for the invariant `build' argument.
395         (pkgVersionInfo::Free): New private inline method; it provides a NULL
396         pointer safe wrapper, calling the C library `free()' function, (since
397         some implementations are believed to be unsafe); it is used by...
398         (pkgVersionInfo::~pkgVersionInfo): ...this new inline destructor, to
399         release the memory allocated by the constructor, for `version_string'
400         and `build_string'.
401
402         * src/vercmp.cpp (pkgVersionInfo::pkgVersionInfo): Allocate memory for
403         `version_string' and `build_string', as required; populate it.
404         Explicitly handle "*" as a `match anything' wildcard...
405         (pkgVersionInfo::Compare): ...matching it as `equal' to everything.
406
407 2010-04-18  Keith Marshall  <keithmarshall@users.sourceforge.net>
408
409         Correct omission from configure script prerequisite checks.
410
411         * aclocal.m4 (MINGW_AC_OUTPUT): New macro; it wraps AC_OUTPUT itself,
412         adding a trap to force an abort if any preceding prerequisite check
413         was handled by MINGW_AC_ASSERT_MISSING.
414
415         * configure.ac: Qualify package component types, in prerequisite
416         checks handled by MINGW_AC_ASSERT_MISSING; invoke MINGW_AC_OUTPUT
417         in place of AC_OUTPUT.
418
419 2010-04-17  Keith Marshall  <keithmarshall@users.sourceforge.net>
420
421         Add configure script checks for prerequisite library headers.
422         (Thanks to Cesar Strauss for proposing a rudimentary implementation).
423
424         * aclocal.m4: New file; it does no more than include...
425         * m4/missing.m4: ...this; new file incorporated from build-aux module.
426
427         * configure.ac: Add AC_CHECK_HEADER assertions for...
428         (zlib.h, bzlib.h, lzma.h): ...these; invoke MINGW_AC_ASSERT_MISSING in
429         respect of each failing assertion.
430
431 2010-04-17  Keith Marshall  <keithmarshall@users.sourceforge.net>
432
433         Case-insensitive subsystem name matching revisited.
434
435         * src/pkgfind.cpp (pkgXmlDocument::FindPackageByName): Use...
436         (subsystem_strcmp): ...this to match subsystem names, instead of...
437         (match_if_explicit): ...this.
438
439 2010-04-15  Keith Marshall  <keithmarshall@users.sourceforge.net>
440
441         Enable recursive processing of repository package lists.
442
443         * src/pkgbase.h (pkgXmlDocument::SyncRepository): Make it public.
444
445         * src/pkgbind.cpp (pkgRepository): New locally defined and implemented
446         class; it facilitates recursive loading and parsing of package lists,
447         replacing much of the original non-recursive functionality within...
448         (pkgXmlDocument::BindRepositories): ...this; use it.
449
450 2010-04-04  Keith Marshall  <keithmarshall@users.sourceforge.net>
451
452         Implement installer function; use per-package file manifests.
453
454         * src/pkgproc.h (pkgManifest): New class; declare it.
455         (pkgArchiveProcessor::origin): New protected member variable.
456         (pkgArchiveProcessor::sysroot_len): New protected member variable.
457         (pkgArchiveProcessor::installed): Type changed to `pkgManifest *'.
458         (pkgTarArchiveInstaller::Process): Declare specialisation hook.
459         (pkgTarArchiveInstaller::UpdateInstallationManifest): Disused member
460         function; remove redundant declaration from class definition.
461         (pkgInstall): New generalised installation function; declare it.
462         (pkgRegister): New function; declare it.
463
464         * src/pkginst.cpp: New file.
465         (pkgManifest, pkgInstall, pkgRegister): Implement them.
466
467         * src/pkgexec.cpp (pkgActionItem::Execute): Use `pkgInstall' in place
468         of stub formerly provided here.
469
470         * src/pkgkeys.h (manifest_key, reference_key): New keys; declare them.
471         * src/pkgkeys.c (manifest_key, reference_key): Implement them.
472
473         * src/tarproc.cpp: Code refactored.
474         (pkgTarArchiveProcessor::sysroot_len): Initialise it.
475         (pkgTarArchiveProcessor::origin): Initialise it.
476         (pkgTarArchiveProcessor::installed): Initialise; associate it with a
477         pkgManifest class entity, and populate this as appropriate.
478         (pkgTarArchiveProcessor::~pkgTarArchiveProcessor): Add explicit clean
479         up of linked `pkgManifest *' entity referenced by `installed'.
480         (pkgTarArchiveProcessor::Process) [TAR_ENTITY_TYPE_DIRECTORY]: Add
481         braces to demarcate localised inner scope of string scan for removal
482         of trailing directory name separators; (thanks to Cesar Strauss for
483         reporting invalid local pointer declaration error in GCC >= 4.4).
484         (pkgTarArchiveInstaller::UpdateInstallationManifest): Deleted.
485         (pkgTarArchiveInstaller::pkgTarArchiveInstaller): Factor out.
486         (pkgTarArchiveInstaller::ProcessDirectory): Likewise.
487         (pkgTarArchiveInstaller::ProcessDataStream): Likewise.
488         (commit_saved_entity): Likewise.
489
490         * src/tarinst.cpp: New file; it implements...
491         (pkgTarArchiveInstaller::Process): ...this new specialisation
492         of the original pkgTarArchiveProcessor::Process method...
493         (pkgTarArchiveInstaller::pkgTarArchiveInstaller): ...and this
494         refactored code, abstracted from src/tarproc.cpp and modified to
495         use the pkgManifest class for installation tracking.
496         (pkgTarArchiveInstaller::ProcessDirectory): Likewise.
497         (pkgTarArchiveInstaller::ProcessDataStream): Likewise.
498         (commit_saved_entity): Relocated from src/tarproc.cpp.
499
500         * Makefile.in (CORE_DLL_OBJECTS): Add...
501         (pkginst.OBJEXT, tarinst.OBJEXT): ...these new object files.
502
503 2010-03-31  Keith Marshall  <keithmarshall@users.sourceforge.net>
504
505         Guard against NULL pointer dereferences in tinyxml code.
506
507         * src/pkgbase.h (pkgXmlNode::GetName): Verify `this' pointer is
508         non-NULL, before invoking the underlying tinyxml method.
509         (pkgXmlNode::GetParent, pkgXmlNode::GetChildren): Likewise.
510         (pkgXmlNode::GetNext, pkgXmlNode::GetPropVal): Likewise.
511         (pkgXmlNode::AddChild, pkgXmlNode::DeleteChild): Likewise.
512         (pkgXmlNode::GetDocumentRoot): Likewise.
513         (pkgXmlNode::IsElementOfType): Likewise.
514
515 2010-03-28  Cesar Strauss  <cestrauss@gmail.com>
516
517         Avoid running InternetAttemptConnect in pkgInternetAgent
518         constructor, since it is called during DLL initialisation.
519
520         * src/pkginet.cpp (pkgInternetAgent::pkgInternetAgent): Move the
521         InternetAttemptConnect call from constructor...
522         (pkgInternetAgent::OpenURL): ...to here.
523
524 2010-03-23  Keith Marshall  <keithmarshall@users.sourceforge.net>
525
526         Automate object code dependency tracking.
527
528         * Makefile.in (DEPFLAGS): New macro; define it.
529         (%.OBJEXT: %.c, %.OBJEXT: %.cpp): Add dependency generator commands...
530         (%.d): ...to create these dependency maps; `sinclude' them, and...
531         (clean): ...remove them.
532         
533         * .cvsignore (*.d): Add wild card template to match them.
534
535 2010-03-22  Keith Marshall  <keithmarshall@users.sourceforge.net>
536
537         Support case insensitive matching for file and subsystem names.
538
539         * src/pkgbase.h (safe_strcmp): New inline function; it provides NULL
540         argument safe comparison of strings, returning the boolean inverse of
541         the `strcmp' result, using either case-sensitive or case-insensitive
542         semantics; derive it from...
543         (match_if_explicit): ...this; redefine as macro; invoke `safe_strcmp'
544         using explicitly case-sensitive semantics.
545         (subsystem_strcmp): New macro; it invokes `safe_strcmp' with either
546         case-sensitive or case-insensitive semantics, depending on...
547         (CASE_INSENSITIVE_SUBSYSTEMS): ...this new context selection macro; it
548         fixes the choice between case-sensitive and case-insensitive matching
549         semantics for any given implementation, at compile time.
550         (pkg_strcmp): New macro; it invokes `safe_strcmp' with either
551         case-sensitive or case-insensitive semantics, depending on...
552         (CASE_INSENSITIVE_FILESYSTEM): ...this new context selection macro; it
553         fixes the choice between case-sensitive and case-insensitive matching
554         semantics for any given implementation, at compile time.
555
556         * src/sysroot.cpp (pkgXmlNode::GetSysRoot): Use `subsystem_strcmp'.
557
558 2010-03-02  Keith Marshall  <keithmarshall@users.sourceforge.net>
559
560         Add preliminary support for virtual packages.
561
562         * src/pkgkeys.h (yes_value, no_value): Redefine as aliases...
563         (value_yes, value_no): ...for these new global strings; declare them.
564         (value_none, value_virtual): New global strings; declare them.
565
566         * src/pkgkeys.c (yes_value, no_value): Rename...
567         (value_yes, value_no): ...to implement these, respectively.
568         (value_none, value_virtual): Implement them.
569
570         * src/pkgname.cpp (pkgXmlNode::ArchiveName): Check containing package
571         node for `class' attribute set to `value_virtual'; if present, always
572         return the effective `tarname' property as `value_none'.
573
574         * src/pkginet.cpp (pkgActionItem::DownloadArchiveFiles): For packages
575         with an effective `tarname' of `value_none', do not download anything.
576
577         * src/pkgexec.cpp (pkgActionItem::Execute): For packages with an
578         effective `tarname' of `value_none', do not invoke any tar archive
579         processing function.
580
581 2010-03-02  Keith Marshall  <keithmarshall@users.sourceforge.net>
582
583         Don't write installation records for unavailable packages.
584
585         * src/tarproc.cpp (pkgTarArchiveInstaller): In constructor, ensure
586         archive is ready for processing, before initialising an installation
587         manifest record.
588
589 2010-03-02  Keith Marshall  <keithmarshall@users.sourceforge.net>
590
591         Rationalise path identification for XML file locations.
592
593         * src/sysroot.cpp (pkgXmlDocument::LoadSystemMap): Use `xmlfile()'
594         function to locate `sysroot' map file; free memory when done.
595         (pkgXmlDocument::UpdateSystemMap): Likewise.
596         (sigpath): Static global variable disused; delete it.
597
598 2010-03-01  Keith Marshall  <keithmarshall@users.sourceforge.net>
599
600         Extend package name search to include component packages.
601
602         * src/pkgfind.cpp (pkgHasMatchingName): Remove; fold it into...
603         (pkgXmlNode::FindPackageByName): ...this; augment to extend search
604         within package definition elements, seeking a potential match on an
605         included component package name or component class-implied name.
606
607         * src/pkgkeys.h (class_key): New global string constant; declare it.
608         * src/pkgkeys.c (class_key): Implement it.
609
610 2010-02-16  Keith Marshall  <keithmarshall@users.sourceforge.net>
611
612         Bump version for next release cycle.
613
614         * configure.ac (AC_INIT): Bump version suffix to alpha-2.
615
616 2010-02-16  Keith Marshall  <keithmarshall@users.sourceforge.net>
617
618         mingw-get-0.1-mingw32-alpha-1 released.
619
620 2010-02-16  Keith Marshall  <keithmarshall@users.sourceforge.net>
621
622         Prepare initial package release.
623
624         * README: New file; use it to source release notes.
625
626         * Makefile.in (SRCDIST_FILES): Use ...
627         (LICENCE_FILES): ...this new macro; define it.
628         (licdist): New build goal; implement it.
629         (bindist): Require it; add alternative `zip' format package.
630
631         * xml/profile.xml (repository): Set default `package-index' name.
632         (system-map): Normalise spelling for default `sysroot' path names.
633
634 2010-02-10  Keith Marshall  <keithmarshall@users.sourceforge.net>
635
636         Add directory/file records in installation manifests.
637
638         * src/pkgkeys.h (dirname_key, filename_key): New strings; declare...
639         * src/pkgkeys.c (dirname_key, filename_key): ...and implement them.
640
641         * src/pkgproc.h (pkgArchiveProcessor::installed): New class member
642         variable; declare it.
643         (pkgTarArchiveInstaller::UpdateInstallationManifest): New method;
644         declare it.
645
646         * src/tarproc.cpp: Miscellaneous comment updates.
647         (pkgTarArchiveInstaller): In constructor...
648         (pkgTarArchiveInstaller::installed): ...use new member variable...
649         (pkgArchiveProcessor::installed): ...inherited from this.
650         (pkgTarArchiveInstaller::UpdateInstallationManifest): Implement and...
651         (pkgTarArchiveInstaller::ProcessDataStream): ...use it.
652         (pkgTarArchiveInstaller::ProcessDirectory): Likewise.
653
654 2010-02-06  Keith Marshall  <keithmarshall@users.sourceforge.net>
655
656         Work around a deficiency in Microsoft's stat() implementation.
657
658         * src/tarproc.cpp (pkgTarArchiveProcessor::ProcessDirectory): Don't
659         pass a `pathname' argument with trailing slashes; strip them off.
660
661 2010-02-06  Keith Marshall  <keithmarshall@users.sourceforge.net>
662
663         Add machinery for installation and packaging for distribution.
664
665         * install-sh: New file; source it from autoconf distribution.
666
667         * configure.ac (AC_PREFIX_DEFAULT): Assign it as `C:/MinGW'.
668         (AC_PROG_MKDIR_P, AC_PROG_INSTALL, AC_PROG_LN_S): Invoke these.
669         (STRIP): New output variable; use AC_CHECK_TOOL to define it.
670
671         * Makefile.in (abs_top_srcdir): Define to AC_SUBST value.
672         (PACKAGE_TARNAME, PACKAGE_VERSION): Define to AC_SUBST values.
673         (prefix, exec_prefix, bindir, libexecdir, localstatedir): Likewise.
674         (INSTALL, INSTALL_PROGRAM, INSTALL_SCRIPT, INSTALL_DATA): Likewise.
675         (STRIP): New macro; define it using AC_CHECK_TOOL substitution.
676         (mkinstalldirs): New macro; define it as AC_PROG_MKDIR_P result.
677         (LN_S): New macro; define it as AC_PROG_LN_S result.
678         (dist, srcdist, bindist): New build objectives; implement them.
679         (install, installdirs, install-strip, maintainer-clean): Likewise.
680         (SRCDIST_FILES, SRCDIST_SUBDIRS): New macros; define them.
681         (PACKAGE_DISTNAME, PACKAGE_DISTVERSION): Likewise.
682         (PACKAGE_DISTROOT, PACKAGE_ROOTVERSION): Likewise.
683         (PACKAGE_CONFIG_DIR): Likewise.
684
685 2010-02-02  Keith Marshall  <keithmarshall@users.sourceforge.net>
686
687         Implement package installer for tar archives.
688
689         * src/pkgexec.cpp (pkgXmlDocument::Execute): Replace existing
690         stub implementation of installer, using methods provided by...
691         * src/pkgproc.h, src/tarproc.cpp: ...these new files, with trap...
692         * src/pkgdeps.cpp (pkgXmlDocument::Schedule) [installed]: Add entry...
693         (pkgActionItem::Selection) [to_remove]: ...for this; use it to detect
694         `install' requests for packages which are aleady installed.
695
696         * Makefile.in (CORE_DLL_OBJECTS): Add tarproc.$(OBJEXT); specify
697         dependencies as appropriate.
698
699         * src/sysroot.cpp (pkgXmlDocument::LoadSystemMap): Don't commit
700         newly created `sysroot' mapping records to disk; defer to...
701         (pkgXmlDocument::UpdateSystemMap): ...this new method.
702         (sigpath): Make it a global variable, with file (static) scope.
703
704         * src/climain.cpp (pkgXmlDocument::UpdateSystemMap): Invoke it.
705
706         * src/pkgkeys.h (download_key, modified_key, source_key): New global
707         string variables; declare them, providing their implementations...
708         * src/pkgkeys.c (download_key, modified_key, source_key): ...here.
709         * src/pkgname.cpp (download_key, source_key): Use them.
710
711         * src/pkginet.cpp (pkgActionItem::ArchivePath): Delete; replace...
712         * src/mkpath.c (pkgArchivePath): ...with this free standing function.
713         * src/mkpath.h (pkgArchivePath): Declare its prototype.
714
715         * src/pkgbase.h (pkgActionItem::ArchivePath): Delete declaration.
716         (pkgXmlDocument): Add a default constructor; implement as `inline'.
717         (pkgXmlDocument::AddDeclaration): Use heap memory to allocate the new
718         declaration object, instead of `auto' variable, to avoid scope error.
719         (pkgXmlDocument::UpdateSystemMap): Declare it.
720
721 2010-01-26  Keith Marshall  <keithmarshall@users.sourceforge.net>
722
723         Implement rudimentary dependency resolver.
724
725         * src/pkgdeps.cpp: New file.
726
727         * Makefile.in (CORE_DLL_OBJECTS): Add pkgdeps.$(OBJEXT) reference;
728         establish header file dependencies.
729
730         * src/pkgbase.h (to_remove, to_install, selection_types): New enum.
731         (pkgActionItem::selection): Extend it to store as enumerated pair...
732         (pkgActionItem::SelectPackage): New inline method; assign them.
733         (pkgActionItem::Selection): New inline method; retrieve them.
734         (pkgXmlNode::GetInstallationRecord): New method; declare it.
735
736         * src/pkgexec.cpp (pkgActionItem): In constructor...
737         (selection): ...initialise both references in enumerated pair.
738         (pkgActionItem::GetReference): Use `Selection()' method.
739         (pkgActionItem::SelectIfMostRecent): Ditto; also correct logic for
740         making selection, and assign to `to_install' element.
741         (pkgXmlDocument::Schedule): Don't update `request'.
742         (pkgActionItem::Execute): Implement as stub.
743
744         * src/pkginet.cpp (pkgActionItem::DownloadArchiveFiles): Use new
745         `Selection()' method.
746
747         * src/pkgkeys.h (yes_value, no_value): Declare new string constants.
748         * src/pkgkeys.c (yes_value, no_value): Implement them.
749
750         * src/vercmp.cpp: Update copyright notice.
751         (pkgVersionInfo::operator<=): Bug fix; must test for `<', but had `>'.
752
753 2010-01-23  Keith Marshall  <keithmarshall@users.sourceforge.net>
754
755         Avoid segmentation faults when processing invalid data streams.
756
757         * src/pkgstrm.h: Update copyright notice.
758         (pkgArchiveStream::IsReady): New pure virtual method.
759         (pkgRawArchiveStream::IsReady): Provide inline implementation.
760         (pkgGzipArchiveStream::IsReady): Likewise.
761         (pkgBzipArchiveStream::IsReady): Likewise.
762         (pkgLzmaArchiveStream::IsReady): Likewise.
763         (pkgXzArchiveStream::IsReady): Likewise.
764
765         * src/pkgstrm.cpp: Update copyright notice.
766         (pkgLzmaArchiveStream, pkgXzArchiveStream) [fd == -1]: Decline to
767         perform any form of read or decode processing.
768
769         * src/pkginet.cpp (pkgInternetLzmaStreamingAgent): Use `fd = -2' as
770         pseudo-descriptor for the pkgLzmaArchiveStream derived component of
771         this internet data streaming class.
772
773 2010-01-23  Keith Marshall  <keithmarshall@users.sourceforge.net>
774
775         Require liblzma >= liblzma-4.999.9beta_20091209-3-mingw32-dev
776
777         * src/pkgstrm.h (LZMA_API_STATIC): Remove definition and associated
778         comment; it was required to permit, (but not to enforce), linking to
779         the static liblzma.a library, with earlier beta releases, but this
780         anomaly has now been corrected.
781
782 2010-01-22  Keith Marshall  <keithmarshall@users.sourceforge.net>
783
784         Remove zlib sources from trunk.
785         (Application builders should use free standing implementation of
786          zlib, from MinGW's package distribution page on SourceForge).
787
788 2010-01-22  Keith Marshall  <keithmarshall@users.sourceforge.net>
789
790         Remove bzip2 sources from trunk.
791         (Application builders should use free standing implementation of
792          bzip2, from MinGW's package distribution page on SourceForge).
793
794 2010-01-22  Keith Marshall  <keithmarshall@users.sourceforge.net>
795
796         Add subsystem specific sysroot mapping facility.
797
798         * src/pkghash.c: New file; required by...
799         * src/sysroot.cpp: New file; it implements...
800         (pkgXmlDocument::LoadSystemMap, pkgXmlNode::GetSysRoot): New methods.
801
802         * src/pkgbase.h: Update copyright notice.
803         (pkgXmlDocument::LoadSystemMap): Declare it.
804         (pkgXmlDocument::AddDeclaration): New inline method.
805         (pkgXmlDocument::SetRoot, pkgXmlDocument::Save): Likewise.
806         (pkgXmlNode::GetSysRoot): Declare it.
807         (pkgXmlNode::GetDocumentRoot): New inline method.
808         (pkgXmlNode::AddChild, pkgXmlNode::DeleteChild): Likewise.
809
810         * src/climain.cpp: Update copyright notice.
811         (climain): Invoke pkgXmlDocument::LoadSystemMap() as required.
812
813         * Makefile.in (CORE_DLL_OBJECTS): Add ...
814         (pkghash.$(OBJEXT), sysroot.$(OBJEXT)): ...these; upate dependencies.
815         (DEBUGLEVEL): New macro; define it.
816         (CPPFLAGS): Use it.
817
818 2010-01-16  Keith Marshall  <keithmarshall@users.sourceforge.net>
819
820         Assign standardised keys for XML database lookup.
821
822         * src/pkgkeys.h: New file; provide public key declarations.
823         * src/pkgkeys.c: New file; implement them.
824
825         * src/pkgbind.cpp: Use them; update copyright notice.
826         * src/pkgexec.cpp, src/pkgfind.cpp, src/pkginet.cpp: Likewise.
827         * src/pkgname.cpp, src/pkgspec.cpp: Likewise.
828
829         * Makfile.in (CORE_DLL_OBJECTS): Add pkgkeys.$(OBJEXT); update all
830         dependencies accordingly.
831
832 2010-01-08  Keith Marshall  <keithmarshall@users.sourceforge.net>
833
834         Add CLI version reporting option.
835
836         * configure.ac: Update copyright notice for new year.
837         (COPYRIGHT_HOLDER): New AC_SUBST variable; define it.
838         (YEARS_OF_ISSUE): New AC_SUBST variable; define it.
839         (AC_CONFIG_FILES): Add `version.c'; source it from...
840
841         * version.c.in: ...this new file.
842
843         * Makefile.in: Update copyright notice for new year.
844         (mingw-get$(EXEEXT)): Add dependency on `version.$(OBJEXT)'.
845         (distclean): Add `version.c'.
846
847         * configure: Regenerated.
848
849         * src/clistub.c: Update copyright notice for new year.
850         (options): New array of `struct option'; define and use it as the
851         reference for `argv' parsing with `getopt_long_only()'.
852
853 2009-12-17  Keith Marshall  <keithmarshall@users.sourceforge.net>
854
855         Add CLI support for "update" action.
856
857         * src/pkgtask.h (ACTION_UPDATE): Define it, derived from...
858         (action_update): ...this new entry in anonymous enumeration.
859         
860         * src/pkgexec.cpp (action_name): Add "update" keyword identification.
861
862         * src/pkgbase.h: Typo in comment; s/xwXmlDocument/wxXmlDocument/.
863         (pkgXmlDocument::BindRepositories): Add `force_update' parameter...
864         * src/pkgbind.cpp (pkgXmlDocument::BindRepositories): Use it to...
865         (pkgXmlDocument::SyncRepository): ...invoke this method when passed as
866         a `true' flag, in addition to (as previously) first time reference.
867
868         * src/climain.cpp (climain): Interpret "update" keyword for...
869         [ACTION_UPDATE]: ...passing state as `force_update' parameter to...
870         (pkgXmlDocument::BindRepositories): ...this method, then...
871         [!ACTION_UPDATE]: Follow with normal action processing.
872
873 2009-12-16  Keith Marshall  <keithmarshall@users.sourceforge.net>
874
875         Add status checking for Internet URL connections.
876
877         * src/pkginet.cpp (pkgInternetAgent::QueryStatus): New method.
878         (pkgInternetStreamingAgent::Get): Use it; set `dl_status' as return
879         value, deferring failure diagnostics to callers, i.e. to...
880         (pkgXmlDocument::SyncRepositories): ...this, and to...
881         (pkgActionItem::DownloadArchiveFiles): ...this.
882
883 2009-11-23  Keith Marshall  <keithmarshall@users.sourceforge.net>
884
885         Add package download and repository synchronisation machinery.
886
887         * src/pkgstrm.h: New header file.
888
889         * src/pkgbind.cpp, src/pkginet.cpp, src/pkgstrm.cpp,
890         src/pkgfind.cpp, src/pkgname.cpp, src/keyword.c: New files.
891         * Makefile.in (CORE_DLL_OBJECTS): Add build goals for them.
892
893         * xml: New directory.
894
895         * src/climain.cpp (climain): Establish repository bindings from...
896         * xml/profile.xml: ...this new configuration file.
897
898 2009-11-16  Keith Marshall  <keithmarshall@users.sourceforge.net>
899
900         Add XML database bindings and preliminary action executive for CLI.
901
902         * src/pkgbase.h, src/pkgtask.h,
903         src/mkpath.h, src/vercmp.h: New header files.
904
905         * src/climain.cpp, src/pkgexec.cpp, src/pkgspec.cpp,
906         src/mkpath.c, src/vercmp.cpp, src/xmlfile.c: New files.
907
908         * Makefile.in (CORE_DLL_OBJECTS): Define initial set of files...
909         (mingw-get-0.dll): ...build them into this new DLL target; add it...
910         (all): ...as prerequisite for this primary build goal.
911
912 2009-11-12  Keith Marshall  <keithmarshall@users.sourceforge.net>
913
914         Avoid some potential GCC warnings.
915
916         * src/clistub.c: Include process.h for `execv' prototype...
917         (main): Cast `argv' to appropriately matched type when calling it.
918
919         * src/pkginfo/driver.c: Include stdlib.h for `free' prototype.
920
921 2009-11-11  Keith Marshall  <keithmarshall@users.sourceforge.net>
922
923         Create diagnostic message handler for CLI usage.
924
925         * src/dmh.h: New header file; it defines the public interface.
926         * src/dmh.cpp: New file; it implements the message handler.
927
928 2009-11-05  Keith Marshall  <keithmarshall@users.sourceforge.net>
929
930         Correct some identified TinyXML issues.
931
932         * tinyxml/tinyxml.h (IsWhiteSpace): Add FIXME annotation to flag
933         probable redundancy of checks for '\n' and '\r'.
934         * tinyxml/tinyxmlparser.cpp: Revert John E's 2008-08-09 change; remove
935         all such redundancies in IsWhiteSpace() calls throughout.
936
937         * tinyxml/tinyxml.cpp (TiXmlAttribute::SetDoubleValue): Correct format
938         specification in sprintf()/snprintf() calls; "%lf" is invalid; replace
939         with "%f".
940
941 2009-10-31  Keith Marshall  <keithmarshall@users.sourceforge.net>
942
943         Add CLI loader stub.
944
945         * src/clistub.c: New file.
946         * Makefile.in: Add build rule for it; build as...
947         (mingw-get.exe): ...this; also add to...
948         (clean): ...this goal.
949
950 2009-10-31  Keith Marshall  <keithmarshall@users.sourceforge.net>
951
952         Set up build mechanism.
953
954         * configure.ac, Makefile.in: New files.
955         * .cvsignore (configure, autom4te.cache): Add to ignored files.
956
957 2009-10-30  Keith Marshall  <keithmarshall@users.sourceforge.net>
958
959         Add GPL-v3 licensing terms.
960
961         * COPYING: New file, sourced from gnu.org.
962
963 2009-10-12  Keith Marshall  <keithmarshall@users.sourceforge.net>
964
965         Add pkginfo implementation.
966
967         * src, src/pkginfo: New directories.
968         * src/pkginfo/pkginfo.h, src/pkginfo/pkginfo.l: New files.
969         * src/pkginfo/driver.c: New file.
970
971 2009-10-12  Keith Marshall  <keithmarshall@users.sourceforge.net>
972
973         Create tdm-branch.
974
975         * All files (tdm-branch): Assign new branch tag.
976         * All top-level files: Remove from trunk.
977         * ChangeLog: New file.