1 2010-09-10 Charles Wilson <mingw@cwilson.fastmail.fm>
3 Fix "mingw-get deletes itself" bug in last rites handling.
5 * README: Add new release notes.
7 * configure.ac: Bump version to 0.1-alpha-4.
9 * src/dmh.h: If __cplusplus, include <exception> and
10 declare dmh_exception class.
12 * src/dmh.cpp (class dmh_exception): Implement.
13 (abort_if_fatal): If DMH_FATAL, throw dmh_exception rather
16 * src/climain.cpp (climain): Wrap entry function body in try/
17 catch block. If dmh_exception is caught, return EXIT_FAILURE.
19 * src/clistub.c (main): Capture return value of climain(). If
20 non-zero, perform last rites and return EXIT_FAILURE.
22 2010-08-30 Keith Marshall <keithmarshall@users.sourceforge.net>
24 mingw-get-0.1-mingw32-alpha-3 released.
26 * README: Add new release notes.
28 * All files (r0-1-alpha-3): Tag assigned.
30 2010-08-27 Keith Marshall <keithmarshall@users.sourceforge.net>
32 Add runtime hooks to support self-upgrade for future releases.
34 * src/rites.c: New file; compile it free-standing, to provide...
35 (lastrites.exe): ...this helper application for context clean-up;
36 alternatively, use it as an include file, with pre-definition of...
37 (IMPLEMENT_INITIATION_RITES): ...this, to implement...
38 (pkgInitRites, pkgLastRites): ...these inline functions.
40 * src/clistub.c (main) [argc > 1]: Use them.
41 (progname): New local variable within `main'; set it once, then use it
42 instead of repeated references to `basename(*argv)' in diagnostics.
43 (MINGW_GET_DLL, MINGW_GET_GUI): Relocate to `src/rites.c'.
45 * src/debug.h (DEBUG_INHIBIT_RITES_OF_PASSAGE):
46 (DEBUG_FAIL_FILE_RENAME_RITE, DEBUG_FAIL_FILE_UNLINK_RITE): New
47 defines; they facilitate debugging of the src/rites.c code.
49 * Makefile.in (lastrites$EXEEXT): New target; build as prerequisite...
50 (all): ...of this primary target.
51 (install, install-strip): Install it.
52 (SRCDIST_FILES): Remove install-sh; it is now included in...
53 (build-aux): ...this directory; add it to...
54 (SRCDIST_SUBDIRS): ...this.
56 2010-08-24 Keith Marshall <keithmarshall@users.sourceforge.net>
58 Set default sysroots relative to mingw-get installation directory.
60 * xml/profile.xml (system-map) [name == default]: For each of...
61 [subsystem == mingw32]: ...set sysroot path to value of %R macro...
62 [subsystem == msys]: ...and to its %R/msys/1.0 subdirectory.
64 2010-08-19 Keith Marshall <keithmarshall@users.sourceforge.net>
66 Some dependency resolver enhancements and bug fixes.
68 * src/pkgbase.h (pkgXmlNode::GetContainerAttribute): New method;
71 * src/pkgdeps.cpp (pkgXmlNode::GetContainerAttribute): Implement it;
72 it is used to retrieve package name attributes from the containing
73 'package' element, when given a pointer to a 'release' element by...
74 (assert_unmatched, assert_installed): ...these new static functions.
75 (pkgXmlDocument::Schedule): Use them to reconstruct and register
76 dependency reference data for previously installed packages which are
77 no longer included in the distribution manifest.
78 (pkgXmlDocument::ResolveDependencies): Fix a block nesting error;
79 catch and diagnose unresolved dependencies; don't look beyond the XML
80 document root node, (tinyxml error not caught?), when searching for
81 requirements specified on container nodes.
83 2010-08-17 Keith Marshall <keithmarshall@users.sourceforge.net>
85 Improve scheduling of package processing requests.
87 * src/pkgexec.cpp (pkgXmlDocument::Schedule): Inspect entire `actions'
88 list, when checking for duplicate package processing requests; decline
89 to schedule any such duplicate, or any request which lacks a package
92 2010-08-15 Keith Marshall <keithmarshall@users.sourceforge.net>
94 Lay foundation for selective compilation of debugging code.
96 * src/debug.h: New file...
97 * src/sysroot.cpp: Include it.
98 (pkgXmlDocument::LoadSystemMap): Make debugging output conditional...
99 [DEBUGLEVEL & DEBUG_TRACE_INIT]: ...on this new debugging state.
101 2010-08-15 Keith Marshall <keithmarshall@users.sourceforge.net>
103 * src/pkgkeys.h: Typo in comment: file was previously identified as
104 pkgkeys.c; corrected.
106 2010-08-13 Keith Marshall <keithmarshall@users.sourceforge.net>
108 Improve diagnostics for invalid references to non-release XML nodes.
110 * src/pkgkeys.h (value_unknown): New global string; declare it.
111 * src/pkgkeys.c (value_unknown): Implement it.
113 * src/pkgname.cpp (pkgArchiveName): Identify XML element type when
114 diagnosing references to elements of types other than release; use...
115 (value_unknown): ...this, as appropriate.
117 2010-08-12 Keith Marshall <keithmarshall@users.sourceforge.net>
119 Guard against a potential buffer overrun.
121 * src/pkgreqs.cpp (pkgSpecs::SetProperty): Allocate an additional
122 byte to accommodate an extra field separator, when inserting a new
123 data value into a previously empty field.
125 2010-07-27 Cesar Strauss <cestrauss@gmail.com>
127 Handle the GNU long name tar header format.
129 * src/pkgproc.h (TAR_ENTITY_TYPE_GNU_LONGNAME): New manifest constant;
131 (pkgTarArchiveProcessor::EntityDataAsString): New protected method;
133 * src/tarproc.cpp: ...implement it.
134 (pkgTarArchiveProcessor::Process): Before building the entry pathname,
135 check for a GNU long name type header; when found, read pathname from
136 the entry data area, before fetching the following header, from which
137 to retrieve the associated entity data.
139 2010-06-24 Keith Marshall <keithmarshall@users.sourceforge.net>
141 Work around an autoconf bug (reported by Stefano Sabatini).
143 * Makefile.in (VPATH): Use @top_srcdir@ instead of ${srcdir}; current
144 autoconf incorrectly elides references to @srcdir@ and ${srcdir} when
145 substituting within a VPATH specification for building `in-source'.
146 Also, prefer colons to blanks as path name separators, for improved
147 portability to non-GNU implementations of make; (recommendation by
150 2010-06-24 Keith Marshall <keithmarshall@users.sourceforge.net>
152 Include alias search, when matching component package name.
154 * src/keyword.c (has_keyword): Rearrange argument declarations for
155 more natural order; update all callers accordingly. Simplify; compare
156 keyword to be matched with each successive candidate from match-list,
157 character-by-character and in-place, so avoiding memory allocation
158 for any local duplicate of the passed match-list; thus...
159 (safe_strdup): ...this static function no longer required; delete it.
160 (string.h): No references remain; do not include it.
162 * src/pkgfind.cpp (pkgXmlNode::FindPackageByName): Augment component
163 package name matching to include potential matches of the look-up name
164 with trailing component name stripped off, when that matches the class
165 name of an identified component package, and the initial substring of
166 the look-up name, after stripping, matches any specified alias name
167 for the containing package.
169 2010-06-10 Keith Marshall <keithmarshall@users.sourceforge.net>
171 Address FIXME relating to identification of distributable files.
173 * install-sh: Move to...
174 * build-aux: ...this new directory.
176 * Makefile.in (PACKAGE_DISTVERSION): Modify `sed' edit sequence; make
177 it depend on, and ensure that it incorporates the expansion of...
178 (PACKAGE_SUBSYSTEM): ...this new macro; defined as substitution of...
179 (host_os): ...this autoconf variable, set by...
181 * configure.ac (AC_CANONICAL_HOST): ...this; add it, requiring...
182 (AC_CONFIG_AUX_DIR): ...`build-aux' directory reference, providing...
184 * build-aux/config.guess, build-aux/config.sub: ...these new standard
185 files; import them from the standard `build-aux' repository.
187 2010-05-17 Keith Marshall <keithmarshall@users.sourceforge.net>
189 Bump version for next release cycle.
191 * configure.ac (AC_INIT): Bump version suffix to alpha-3.
193 2010-05-17 Keith Marshall <keithmarshall@users.sourceforge.net>
195 mingw-get-0.1-mingw32-alpha-2 released.
197 * README: Add new release notes.
199 * xml/profile.xml: Update to use default referencing for...
200 (package-list.xml.lzma): ...this repository master catalogue.
202 * All files (r0-1-alpha-2): Tag assigned.
204 2010-05-12 Keith Marshall <keithmarshall@users.sourceforge.net>
206 Make provision to protect user's profile settings during upgrade.
208 * Makefile.in (install): Remove `profile.xml'; replace it with...
209 (install-profile): ...this new prerequisite installation goal; it
210 renames the installed copy of `profile.xml' as `defaults.xml', within
211 the installed package image.
213 * src/pkgkeys.h (defaults_key): New key; declare it.
214 * src/pkgkeys.c: Some cosmetic formatting (tabulation) adjustments.
215 (defaults_key): Implement it; it refers to the `defaults.xml' file.
217 * src/climain.cpp (climain): Check `profile_key' for accessibility of
218 the `profile.xml' file; if [! R_OK] emit a diagnostic warning, fall
219 back on `defaults_key', and attempt to load configuration from the
220 distributed `defaults.xml' file.
222 2010-05-11 Keith Marshall <keithmarshall@users.sourceforge.net>
224 Add preliminary support for future `-reinstall' option.
226 * src/pkgexec.cpp (pkgActionItem::Execute) [ACTION_INSTALL]: Force
227 installation if `-reinstall' option is selected, overriding state of
228 any prior installation; temporarily assume that this option is always
229 selected, to permit proper `upgrade' operation in the absence of any
230 functional `uninstall' capability, and pending implementation of a
231 mechanism for interpreting user specified options.
233 2010-05-11 Keith Marshall <keithmarshall@users.sourceforge.net>
235 Correct handling for "%R" macro in relative sysroot path specs.
237 * src/tarproc.cpp (pkgTarArchiveProcessor): In constructor, expand the
238 sysroot path specification a second time, to capture the effect of any
239 embedded macros, before computing the recorded `sysroot_len' value.
241 2010-05-05 Keith Marshall <keithmarshall@users.sourceforge.net>
243 Handle "%" wildcard matches in package and subsystem version strings.
245 * src/pkgbase.h (pkgSpecs): Forward declare it.
246 (pkgActionItem::~pkgActionItem): Declare explicit destructor.
247 (pkgActionItem::SetRequirements): Add extra `pkgSpecs*' argument;
248 update references, passing additional argument in...
250 * src/pkgdeps.cpp (pkgXmlDocument::ResolveDependencies): ...this.
252 * src/pkgexec.cpp (pkgActionItem::~pkgActionItem): Implement it.
253 (pkgActionItem::SetRequirements): Delete obsolete implementation.
255 * src/pkginfo/pkginfo.h: Update copyright notice; add year 2010.
256 (pkgSpecs::GetTarName): New public method; declare it.
257 (pkgSpecs::SetProperty): New private method; declare it.
258 (pkgSpecs::SetPackageName): New inline method; implement it.
259 (pkgSpecs::SetPackageVersion, pkgSpecs::SetPackageBuild): Likewise.
260 (pkgSpecs::SetSubSystemName, pkgSpecs::SetSubSystemVersion): Likewise.
261 (pkgSpecs::SetSubSystemBuild, pkgSpecs::SetReleaseStatus): Likewise.
262 (pkgSpecs::SetReleaseIndex, pkgSpecs::SetComponentClass): Likewise.
263 (pkgSpecs::SetComponentVersion, pkgSpecs::SetPackageFormat): Likewise.
264 (pkgSpecs::SetCompressionType): Likewise.
266 * src/pkginfo/pkginfo.l: Update copyright notice; add year 2010.
267 (TRANS): Interpret "%" as wildcard in version string matches.
269 * src/pkgreqs.cpp: New file.
270 (pkgActionItem::SetRequirements): Reimplement per new declaration;
271 it now always allocates heap memory for requirements specifications.
272 (pkgSpecs::GetTarName, pkgSpecs::SetProperty): Implement them.
274 * Makefile.in (CORE_DLL_OBJECTS): Add `pkgreqs.$(OBJEXT)'.
276 2010-04-30 Keith Marshall <keithmarshall@users.sourceforge.net>
278 Revert 2010-04-04 refactoring of tarproc.cpp and tarinst.cpp
280 * src/tarinst.cpp: File removed; its content merged into...
281 * src/tarproc.cpp: ...this; it cannot be cleanly separated out.
283 * Makefile.in (tarinst.$OBJEXT): Remove reference.
285 2010-04-29 Keith Marshall <keithmarshall@users.sourceforge.net>
287 Handle "*" wildcard matches in package and subsystem version strings.
289 * src/vercmp.h (pkgVersionInfo::version_string): New private member
290 variable; it stores a pointer to a dynamically allocated local copy of
291 the invariant `version' argument, to facilitate correct parsing.
292 (pkgVersionInfo::build_string): Likewise; it provides similar handling
293 for the invariant `build' argument.
294 (pkgVersionInfo::Free): New private inline method; it provides a NULL
295 pointer safe wrapper, calling the C library `free()' function, (since
296 some implementations are believed to be unsafe); it is used by...
297 (pkgVersionInfo::~pkgVersionInfo): ...this new inline destructor, to
298 release the memory allocated by the constructor, for `version_string'
301 * src/vercmp.cpp (pkgVersionInfo::pkgVersionInfo): Allocate memory for
302 `version_string' and `build_string', as required; populate it.
303 Explicitly handle "*" as a `match anything' wildcard...
304 (pkgVersionInfo::Compare): ...matching it as `equal' to everything.
306 2010-04-18 Keith Marshall <keithmarshall@users.sourceforge.net>
308 Correct omission from configure script prerequisite checks.
310 * aclocal.m4 (MINGW_AC_OUTPUT): New macro; it wraps AC_OUTPUT itself,
311 adding a trap to force an abort if any preceding prerequisite check
312 was handled by MINGW_AC_ASSERT_MISSING.
314 * configure.ac: Qualify package component types, in prerequisite
315 checks handled by MINGW_AC_ASSERT_MISSING; invoke MINGW_AC_OUTPUT
316 in place of AC_OUTPUT.
318 2010-04-17 Keith Marshall <keithmarshall@users.sourceforge.net>
320 Add configure script checks for prerequisite library headers.
321 (Thanks to Cesar Strauss for proposing a rudimentary implementation).
323 * aclocal.m4: New file; it does no more than include...
324 * m4/missing.m4: ...this; new file incorporated from build-aux module.
326 * configure.ac: Add AC_CHECK_HEADER assertions for...
327 (zlib.h, bzlib.h, lzma.h): ...these; invoke MINGW_AC_ASSERT_MISSING in
328 respect of each failing assertion.
330 2010-04-17 Keith Marshall <keithmarshall@users.sourceforge.net>
332 Case-insensitive subsystem name matching revisited.
334 * src/pkgfind.cpp (pkgXmlDocument::FindPackageByName): Use...
335 (subsystem_strcmp): ...this to match subsystem names, instead of...
336 (match_if_explicit): ...this.
338 2010-04-15 Keith Marshall <keithmarshall@users.sourceforge.net>
340 Enable recursive processing of repository package lists.
342 * src/pkgbase.h (pkgXmlDocument::SyncRepository): Make it public.
344 * src/pkgbind.cpp (pkgRepository): New locally defined and implemented
345 class; it facilitates recursive loading and parsing of package lists,
346 replacing much of the original non-recursive functionality within...
347 (pkgXmlDocument::BindRepositories): ...this; use it.
349 2010-04-04 Keith Marshall <keithmarshall@users.sourceforge.net>
351 Implement installer function; use per-package file manifests.
353 * src/pkgproc.h (pkgManifest): New class; declare it.
354 (pkgArchiveProcessor::origin): New protected member variable.
355 (pkgArchiveProcessor::sysroot_len): New protected member variable.
356 (pkgArchiveProcessor::installed): Type changed to `pkgManifest *'.
357 (pkgTarArchiveInstaller::Process): Declare specialisation hook.
358 (pkgTarArchiveInstaller::UpdateInstallationManifest): Disused member
359 function; remove redundant declaration from class definition.
360 (pkgInstall): New generalised installation function; declare it.
361 (pkgRegister): New function; declare it.
363 * src/pkginst.cpp: New file.
364 (pkgManifest, pkgInstall, pkgRegister): Implement them.
366 * src/pkgexec.cpp (pkgActionItem::Execute): Use `pkgInstall' in place
367 of stub formerly provided here.
369 * src/pkgkeys.h (manifest_key, reference_key): New keys; declare them.
370 * src/pkgkeys.c (manifest_key, reference_key): Implement them.
372 * src/tarproc.cpp: Code refactored.
373 (pkgTarArchiveProcessor::sysroot_len): Initialise it.
374 (pkgTarArchiveProcessor::origin): Initialise it.
375 (pkgTarArchiveProcessor::installed): Initialise; associate it with a
376 pkgManifest class entity, and populate this as appropriate.
377 (pkgTarArchiveProcessor::~pkgTarArchiveProcessor): Add explicit clean
378 up of linked `pkgManifest *' entity referenced by `installed'.
379 (pkgTarArchiveProcessor::Process) [TAR_ENTITY_TYPE_DIRECTORY]: Add
380 braces to demarcate localised inner scope of string scan for removal
381 of trailing directory name separators; (thanks to Cesar Strauss for
382 reporting invalid local pointer declaration error in GCC >= 4.4).
383 (pkgTarArchiveInstaller::UpdateInstallationManifest): Deleted.
384 (pkgTarArchiveInstaller::pkgTarArchiveInstaller): Factor out.
385 (pkgTarArchiveInstaller::ProcessDirectory): Likewise.
386 (pkgTarArchiveInstaller::ProcessDataStream): Likewise.
387 (commit_saved_entity): Likewise.
389 * src/tarinst.cpp: New file; it implements...
390 (pkgTarArchiveInstaller::Process): ...this new specialisation
391 of the original pkgTarArchiveProcessor::Process method...
392 (pkgTarArchiveInstaller::pkgTarArchiveInstaller): ...and this
393 refactored code, abstracted from src/tarproc.cpp and modified to
394 use the pkgManifest class for installation tracking.
395 (pkgTarArchiveInstaller::ProcessDirectory): Likewise.
396 (pkgTarArchiveInstaller::ProcessDataStream): Likewise.
397 (commit_saved_entity): Relocated from src/tarproc.cpp.
399 * Makefile.in (CORE_DLL_OBJECTS): Add...
400 (pkginst.OBJEXT, tarinst.OBJEXT): ...these new object files.
402 2010-03-31 Keith Marshall <keithmarshall@users.sourceforge.net>
404 Guard against NULL pointer dereferences in tinyxml code.
406 * src/pkgbase.h (pkgXmlNode::GetName): Verify `this' pointer is
407 non-NULL, before invoking the underlying tinyxml method.
408 (pkgXmlNode::GetParent, pkgXmlNode::GetChildren): Likewise.
409 (pkgXmlNode::GetNext, pkgXmlNode::GetPropVal): Likewise.
410 (pkgXmlNode::AddChild, pkgXmlNode::DeleteChild): Likewise.
411 (pkgXmlNode::GetDocumentRoot): Likewise.
412 (pkgXmlNode::IsElementOfType): Likewise.
414 2010-03-28 Cesar Strauss <cestrauss@gmail.com>
416 Avoid running InternetAttemptConnect in pkgInternetAgent
417 constructor, since it is called during DLL initialisation.
419 * src/pkginet.cpp (pkgInternetAgent::pkgInternetAgent): Move the
420 InternetAttemptConnect call from constructor...
421 (pkgInternetAgent::OpenURL): ...to here.
423 2010-03-23 Keith Marshall <keithmarshall@users.sourceforge.net>
425 Automate object code dependency tracking.
427 * Makefile.in (DEPFLAGS): New macro; define it.
428 (%.OBJEXT: %.c, %.OBJEXT: %.cpp): Add dependency generator commands...
429 (%.d): ...to create these dependency maps; `sinclude' them, and...
430 (clean): ...remove them.
432 * .cvsignore (*.d): Add wild card template to match them.
434 2010-03-22 Keith Marshall <keithmarshall@users.sourceforge.net>
436 Support case insensitive matching for file and subsystem names.
438 * src/pkgbase.h (safe_strcmp): New inline function; it provides NULL
439 argument safe comparison of strings, returning the boolean inverse of
440 the `strcmp' result, using either case-sensitive or case-insensitive
441 semantics; derive it from...
442 (match_if_explicit): ...this; redefine as macro; invoke `safe_strcmp'
443 using explicitly case-sensitive semantics.
444 (subsystem_strcmp): New macro; it invokes `safe_strcmp' with either
445 case-sensitive or case-insensitive semantics, depending on...
446 (CASE_INSENSITIVE_SUBSYSTEMS): ...this new context selection macro; it
447 fixes the choice between case-sensitive and case-insensitive matching
448 semantics for any given implementation, at compile time.
449 (pkg_strcmp): New macro; it invokes `safe_strcmp' with either
450 case-sensitive or case-insensitive semantics, depending on...
451 (CASE_INSENSITIVE_FILESYSTEM): ...this new context selection macro; it
452 fixes the choice between case-sensitive and case-insensitive matching
453 semantics for any given implementation, at compile time.
455 * src/sysroot.cpp (pkgXmlNode::GetSysRoot): Use `subsystem_strcmp'.
457 2010-03-02 Keith Marshall <keithmarshall@users.sourceforge.net>
459 Add preliminary support for virtual packages.
461 * src/pkgkeys.h (yes_value, no_value): Redefine as aliases...
462 (value_yes, value_no): ...for these new global strings; declare them.
463 (value_none, value_virtual): New global strings; declare them.
465 * src/pkgkeys.c (yes_value, no_value): Rename...
466 (value_yes, value_no): ...to implement these, respectively.
467 (value_none, value_virtual): Implement them.
469 * src/pkgname.cpp (pkgXmlNode::ArchiveName): Check containing package
470 node for `class' attribute set to `value_virtual'; if present, always
471 return the effective `tarname' property as `value_none'.
473 * src/pkginet.cpp (pkgActionItem::DownloadArchiveFiles): For packages
474 with an effective `tarname' of `value_none', do not download anything.
476 * src/pkgexec.cpp (pkgActionItem::Execute): For packages with an
477 effective `tarname' of `value_none', do not invoke any tar archive
480 2010-03-02 Keith Marshall <keithmarshall@users.sourceforge.net>
482 Don't write installation records for unavailable packages.
484 * src/tarproc.cpp (pkgTarArchiveInstaller): In constructor, ensure
485 archive is ready for processing, before initialising an installation
488 2010-03-02 Keith Marshall <keithmarshall@users.sourceforge.net>
490 Rationalise path identification for XML file locations.
492 * src/sysroot.cpp (pkgXmlDocument::LoadSystemMap): Use `xmlfile()'
493 function to locate `sysroot' map file; free memory when done.
494 (pkgXmlDocument::UpdateSystemMap): Likewise.
495 (sigpath): Static global variable disused; delete it.
497 2010-03-01 Keith Marshall <keithmarshall@users.sourceforge.net>
499 Extend package name search to include component packages.
501 * src/pkgfind.cpp (pkgHasMatchingName): Remove; fold it into...
502 (pkgXmlNode::FindPackageByName): ...this; augment to extend search
503 within package definition elements, seeking a potential match on an
504 included component package name or component class-implied name.
506 * src/pkgkeys.h (class_key): New global string constant; declare it.
507 * src/pkgkeys.c (class_key): Implement it.
509 2010-02-16 Keith Marshall <keithmarshall@users.sourceforge.net>
511 Bump version for next release cycle.
513 * configure.ac (AC_INIT): Bump version suffix to alpha-2.
515 2010-02-16 Keith Marshall <keithmarshall@users.sourceforge.net>
517 mingw-get-0.1-mingw32-alpha-1 released.
519 2010-02-16 Keith Marshall <keithmarshall@users.sourceforge.net>
521 Prepare initial package release.
523 * README: New file; use it to source release notes.
525 * Makefile.in (SRCDIST_FILES): Use ...
526 (LICENCE_FILES): ...this new macro; define it.
527 (licdist): New build goal; implement it.
528 (bindist): Require it; add alternative `zip' format package.
530 * xml/profile.xml (repository): Set default `package-index' name.
531 (system-map): Normalise spelling for default `sysroot' path names.
533 2010-02-10 Keith Marshall <keithmarshall@users.sourceforge.net>
535 Add directory/file records in installation manifests.
537 * src/pkgkeys.h (dirname_key, filename_key): New strings; declare...
538 * src/pkgkeys.c (dirname_key, filename_key): ...and implement them.
540 * src/pkgproc.h (pkgArchiveProcessor::installed): New class member
541 variable; declare it.
542 (pkgTarArchiveInstaller::UpdateInstallationManifest): New method;
545 * src/tarproc.cpp: Miscellaneous comment updates.
546 (pkgTarArchiveInstaller): In constructor...
547 (pkgTarArchiveInstaller::installed): ...use new member variable...
548 (pkgArchiveProcessor::installed): ...inherited from this.
549 (pkgTarArchiveInstaller::UpdateInstallationManifest): Implement and...
550 (pkgTarArchiveInstaller::ProcessDataStream): ...use it.
551 (pkgTarArchiveInstaller::ProcessDirectory): Likewise.
553 2010-02-06 Keith Marshall <keithmarshall@users.sourceforge.net>
555 Work around a deficiency in Microsoft's stat() implementation.
557 * src/tarproc.cpp (pkgTarArchiveProcessor::ProcessDirectory): Don't
558 pass a `pathname' argument with trailing slashes; strip them off.
560 2010-02-06 Keith Marshall <keithmarshall@users.sourceforge.net>
562 Add machinery for installation and packaging for distribution.
564 * install-sh: New file; source it from autoconf distribution.
566 * configure.ac (AC_PREFIX_DEFAULT): Assign it as `C:/MinGW'.
567 (AC_PROG_MKDIR_P, AC_PROG_INSTALL, AC_PROG_LN_S): Invoke these.
568 (STRIP): New output variable; use AC_CHECK_TOOL to define it.
570 * Makefile.in (abs_top_srcdir): Define to AC_SUBST value.
571 (PACKAGE_TARNAME, PACKAGE_VERSION): Define to AC_SUBST values.
572 (prefix, exec_prefix, bindir, libexecdir, localstatedir): Likewise.
573 (INSTALL, INSTALL_PROGRAM, INSTALL_SCRIPT, INSTALL_DATA): Likewise.
574 (STRIP): New macro; define it using AC_CHECK_TOOL substitution.
575 (mkinstalldirs): New macro; define it as AC_PROG_MKDIR_P result.
576 (LN_S): New macro; define it as AC_PROG_LN_S result.
577 (dist, srcdist, bindist): New build objectives; implement them.
578 (install, installdirs, install-strip, maintainer-clean): Likewise.
579 (SRCDIST_FILES, SRCDIST_SUBDIRS): New macros; define them.
580 (PACKAGE_DISTNAME, PACKAGE_DISTVERSION): Likewise.
581 (PACKAGE_DISTROOT, PACKAGE_ROOTVERSION): Likewise.
582 (PACKAGE_CONFIG_DIR): Likewise.
584 2010-02-02 Keith Marshall <keithmarshall@users.sourceforge.net>
586 Implement package installer for tar archives.
588 * src/pkgexec.cpp (pkgXmlDocument::Execute): Replace existing
589 stub implementation of installer, using methods provided by...
590 * src/pkgproc.h, src/tarproc.cpp: ...these new files, with trap...
591 * src/pkgdeps.cpp (pkgXmlDocument::Schedule) [installed]: Add entry...
592 (pkgActionItem::Selection) [to_remove]: ...for this; use it to detect
593 `install' requests for packages which are aleady installed.
595 * Makefile.in (CORE_DLL_OBJECTS): Add tarproc.$(OBJEXT); specify
596 dependencies as appropriate.
598 * src/sysroot.cpp (pkgXmlDocument::LoadSystemMap): Don't commit
599 newly created `sysroot' mapping records to disk; defer to...
600 (pkgXmlDocument::UpdateSystemMap): ...this new method.
601 (sigpath): Make it a global variable, with file (static) scope.
603 * src/climain.cpp (pkgXmlDocument::UpdateSystemMap): Invoke it.
605 * src/pkgkeys.h (download_key, modified_key, source_key): New global
606 string variables; declare them, providing their implementations...
607 * src/pkgkeys.c (download_key, modified_key, source_key): ...here.
608 * src/pkgname.cpp (download_key, source_key): Use them.
610 * src/pkginet.cpp (pkgActionItem::ArchivePath): Delete; replace...
611 * src/mkpath.c (pkgArchivePath): ...with this free standing function.
612 * src/mkpath.h (pkgArchivePath): Declare its prototype.
614 * src/pkgbase.h (pkgActionItem::ArchivePath): Delete declaration.
615 (pkgXmlDocument): Add a default constructor; implement as `inline'.
616 (pkgXmlDocument::AddDeclaration): Use heap memory to allocate the new
617 declaration object, instead of `auto' variable, to avoid scope error.
618 (pkgXmlDocument::UpdateSystemMap): Declare it.
620 2010-01-26 Keith Marshall <keithmarshall@users.sourceforge.net>
622 Implement rudimentary dependency resolver.
624 * src/pkgdeps.cpp: New file.
626 * Makefile.in (CORE_DLL_OBJECTS): Add pkgdeps.$(OBJEXT) reference;
627 establish header file dependencies.
629 * src/pkgbase.h (to_remove, to_install, selection_types): New enum.
630 (pkgActionItem::selection): Extend it to store as enumerated pair...
631 (pkgActionItem::SelectPackage): New inline method; assign them.
632 (pkgActionItem::Selection): New inline method; retrieve them.
633 (pkgXmlNode::GetInstallationRecord): New method; declare it.
635 * src/pkgexec.cpp (pkgActionItem): In constructor...
636 (selection): ...initialise both references in enumerated pair.
637 (pkgActionItem::GetReference): Use `Selection()' method.
638 (pkgActionItem::SelectIfMostRecent): Ditto; also correct logic for
639 making selection, and assign to `to_install' element.
640 (pkgXmlDocument::Schedule): Don't update `request'.
641 (pkgActionItem::Execute): Implement as stub.
643 * src/pkginet.cpp (pkgActionItem::DownloadArchiveFiles): Use new
644 `Selection()' method.
646 * src/pkgkeys.h (yes_value, no_value): Declare new string constants.
647 * src/pkgkeys.c (yes_value, no_value): Implement them.
649 * src/vercmp.cpp: Update copyright notice.
650 (pkgVersionInfo::operator<=): Bug fix; must test for `<', but had `>'.
652 2010-01-23 Keith Marshall <keithmarshall@users.sourceforge.net>
654 Avoid segmentation faults when processing invalid data streams.
656 * src/pkgstrm.h: Update copyright notice.
657 (pkgArchiveStream::IsReady): New pure virtual method.
658 (pkgRawArchiveStream::IsReady): Provide inline implementation.
659 (pkgGzipArchiveStream::IsReady): Likewise.
660 (pkgBzipArchiveStream::IsReady): Likewise.
661 (pkgLzmaArchiveStream::IsReady): Likewise.
662 (pkgXzArchiveStream::IsReady): Likewise.
664 * src/pkgstrm.cpp: Update copyright notice.
665 (pkgLzmaArchiveStream, pkgXzArchiveStream) [fd == -1]: Decline to
666 perform any form of read or decode processing.
668 * src/pkginet.cpp (pkgInternetLzmaStreamingAgent): Use `fd = -2' as
669 pseudo-descriptor for the pkgLzmaArchiveStream derived component of
670 this internet data streaming class.
672 2010-01-23 Keith Marshall <keithmarshall@users.sourceforge.net>
674 Require liblzma >= liblzma-4.999.9beta_20091209-3-mingw32-dev
676 * src/pkgstrm.h (LZMA_API_STATIC): Remove definition and associated
677 comment; it was required to permit, (but not to enforce), linking to
678 the static liblzma.a library, with earlier beta releases, but this
679 anomaly has now been corrected.
681 2010-01-22 Keith Marshall <keithmarshall@users.sourceforge.net>
683 Remove zlib sources from trunk.
684 (Application builders should use free standing implementation of
685 zlib, from MinGW's package distribution page on SourceForge).
687 2010-01-22 Keith Marshall <keithmarshall@users.sourceforge.net>
689 Remove bzip2 sources from trunk.
690 (Application builders should use free standing implementation of
691 bzip2, from MinGW's package distribution page on SourceForge).
693 2010-01-22 Keith Marshall <keithmarshall@users.sourceforge.net>
695 Add subsystem specific sysroot mapping facility.
697 * src/pkghash.c: New file; required by...
698 * src/sysroot.cpp: New file; it implements...
699 (pkgXmlDocument::LoadSystemMap, pkgXmlNode::GetSysRoot): New methods.
701 * src/pkgbase.h: Update copyright notice.
702 (pkgXmlDocument::LoadSystemMap): Declare it.
703 (pkgXmlDocument::AddDeclaration): New inline method.
704 (pkgXmlDocument::SetRoot, pkgXmlDocument::Save): Likewise.
705 (pkgXmlNode::GetSysRoot): Declare it.
706 (pkgXmlNode::GetDocumentRoot): New inline method.
707 (pkgXmlNode::AddChild, pkgXmlNode::DeleteChild): Likewise.
709 * src/climain.cpp: Update copyright notice.
710 (climain): Invoke pkgXmlDocument::LoadSystemMap() as required.
712 * Makefile.in (CORE_DLL_OBJECTS): Add ...
713 (pkghash.$(OBJEXT), sysroot.$(OBJEXT)): ...these; upate dependencies.
714 (DEBUGLEVEL): New macro; define it.
717 2010-01-16 Keith Marshall <keithmarshall@users.sourceforge.net>
719 Assign standardised keys for XML database lookup.
721 * src/pkgkeys.h: New file; provide public key declarations.
722 * src/pkgkeys.c: New file; implement them.
724 * src/pkgbind.cpp: Use them; update copyright notice.
725 * src/pkgexec.cpp, src/pkgfind.cpp, src/pkginet.cpp: Likewise.
726 * src/pkgname.cpp, src/pkgspec.cpp: Likewise.
728 * Makfile.in (CORE_DLL_OBJECTS): Add pkgkeys.$(OBJEXT); update all
729 dependencies accordingly.
731 2010-01-08 Keith Marshall <keithmarshall@users.sourceforge.net>
733 Add CLI version reporting option.
735 * configure.ac: Update copyright notice for new year.
736 (COPYRIGHT_HOLDER): New AC_SUBST variable; define it.
737 (YEARS_OF_ISSUE): New AC_SUBST variable; define it.
738 (AC_CONFIG_FILES): Add `version.c'; source it from...
740 * version.c.in: ...this new file.
742 * Makefile.in: Update copyright notice for new year.
743 (mingw-get$(EXEEXT)): Add dependency on `version.$(OBJEXT)'.
744 (distclean): Add `version.c'.
746 * configure: Regenerated.
748 * src/clistub.c: Update copyright notice for new year.
749 (options): New array of `struct option'; define and use it as the
750 reference for `argv' parsing with `getopt_long_only()'.
752 2009-12-17 Keith Marshall <keithmarshall@users.sourceforge.net>
754 Add CLI support for "update" action.
756 * src/pkgtask.h (ACTION_UPDATE): Define it, derived from...
757 (action_update): ...this new entry in anonymous enumeration.
759 * src/pkgexec.cpp (action_name): Add "update" keyword identification.
761 * src/pkgbase.h: Typo in comment; s/xwXmlDocument/wxXmlDocument/.
762 (pkgXmlDocument::BindRepositories): Add `force_update' parameter...
763 * src/pkgbind.cpp (pkgXmlDocument::BindRepositories): Use it to...
764 (pkgXmlDocument::SyncRepository): ...invoke this method when passed as
765 a `true' flag, in addition to (as previously) first time reference.
767 * src/climain.cpp (climain): Interpret "update" keyword for...
768 [ACTION_UPDATE]: ...passing state as `force_update' parameter to...
769 (pkgXmlDocument::BindRepositories): ...this method, then...
770 [!ACTION_UPDATE]: Follow with normal action processing.
772 2009-12-16 Keith Marshall <keithmarshall@users.sourceforge.net>
774 Add status checking for Internet URL connections.
776 * src/pkginet.cpp (pkgInternetAgent::QueryStatus): New method.
777 (pkgInternetStreamingAgent::Get): Use it; set `dl_status' as return
778 value, deferring failure diagnostics to callers, i.e. to...
779 (pkgXmlDocument::SyncRepositories): ...this, and to...
780 (pkgActionItem::DownloadArchiveFiles): ...this.
782 2009-11-23 Keith Marshall <keithmarshall@users.sourceforge.net>
784 Add package download and repository synchronisation machinery.
786 * src/pkgstrm.h: New header file.
788 * src/pkgbind.cpp, src/pkginet.cpp, src/pkgstrm.cpp,
789 src/pkgfind.cpp, src/pkgname.cpp, src/keyword.c: New files.
790 * Makefile.in (CORE_DLL_OBJECTS): Add build goals for them.
792 * xml: New directory.
794 * src/climain.cpp (climain): Establish repository bindings from...
795 * xml/profile.xml: ...this new configuration file.
797 2009-11-16 Keith Marshall <keithmarshall@users.sourceforge.net>
799 Add XML database bindings and preliminary action executive for CLI.
801 * src/pkgbase.h, src/pkgtask.h,
802 src/mkpath.h, src/vercmp.h: New header files.
804 * src/climain.cpp, src/pkgexec.cpp, src/pkgspec.cpp,
805 src/mkpath.c, src/vercmp.cpp, src/xmlfile.c: New files.
807 * Makefile.in (CORE_DLL_OBJECTS): Define initial set of files...
808 (mingw-get-0.dll): ...build them into this new DLL target; add it...
809 (all): ...as prerequisite for this primary build goal.
811 2009-11-12 Keith Marshall <keithmarshall@users.sourceforge.net>
813 Avoid some potential GCC warnings.
815 * src/clistub.c: Include process.h for `execv' prototype...
816 (main): Cast `argv' to appropriately matched type when calling it.
818 * src/pkginfo/driver.c: Include stdlib.h for `free' prototype.
820 2009-11-11 Keith Marshall <keithmarshall@users.sourceforge.net>
822 Create diagnostic message handler for CLI usage.
824 * src/dmh.h: New header file; it defines the public interface.
825 * src/dmh.cpp: New file; it implements the message handler.
827 2009-11-05 Keith Marshall <keithmarshall@users.sourceforge.net>
829 Correct some identified TinyXML issues.
831 * tinyxml/tinyxml.h (IsWhiteSpace): Add FIXME annotation to flag
832 probable redundancy of checks for '\n' and '\r'.
833 * tinyxml/tinyxmlparser.cpp: Revert John E's 2008-08-09 change; remove
834 all such redundancies in IsWhiteSpace() calls throughout.
836 * tinyxml/tinyxml.cpp (TiXmlAttribute::SetDoubleValue): Correct format
837 specification in sprintf()/snprintf() calls; "%lf" is invalid; replace
840 2009-10-31 Keith Marshall <keithmarshall@users.sourceforge.net>
844 * src/clistub.c: New file.
845 * Makefile.in: Add build rule for it; build as...
846 (mingw-get.exe): ...this; also add to...
847 (clean): ...this goal.
849 2009-10-31 Keith Marshall <keithmarshall@users.sourceforge.net>
851 Set up build mechanism.
853 * configure.ac, Makefile.in: New files.
854 * .cvsignore (configure, autom4te.cache): Add to ignored files.
856 2009-10-30 Keith Marshall <keithmarshall@users.sourceforge.net>
858 Add GPL-v3 licensing terms.
860 * COPYING: New file, sourced from gnu.org.
862 2009-10-12 Keith Marshall <keithmarshall@users.sourceforge.net>
864 Add pkginfo implementation.
866 * src, src/pkginfo: New directories.
867 * src/pkginfo/pkginfo.h, src/pkginfo/pkginfo.l: New files.
868 * src/pkginfo/driver.c: New file.
870 2009-10-12 Keith Marshall <keithmarshall@users.sourceforge.net>
874 * All files (tdm-branch): Assign new branch tag.
875 * All top-level files: Remove from trunk.
876 * ChangeLog: New file.