OSDN Git Service

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