2012-03-12 Keith Marshall <keithmarshall@users.sourceforge.net>
+ Rationalise implementation and usage of --all-related option.
+
+ * src/pkgopts.h: Update copyright notice; add year 2012.
+ (OPTION_RECURSIVE, OPTION_ALL_RELATED): New constants; define them.
+ (pkgOpts::SetFlags): New method; declare and implement it inline.
+
+ * src/clistub.c: Update copyright notice; add year 2012.
+ (options) [recursive, all-related]: Redefine in terms of...
+ (OPTION_RECURSIVE, OPTION_ALL_RELATED): ...these.
+ (help_text): Update appropriately.
+
+ * src/climain.cpp: Update copyright notice; add year 2012.
+ (climain) [all-related]: Associate its use exclusively with...
+ (source, licence): ...these package processing operations; use...
+ (pkgOptions::SetFlags): ...this, to propagate its effect.
+
+2012-03-12 Keith Marshall <keithmarshall@users.sourceforge.net>
+
Don't report failed downloads in respect of virtual packages.
* src/pkginet.cpp (pkgActionItem::DownloadArchiveFiles): Clear...
* $Id$
*
* Written by Keith Marshall <keithmarshall@users.sourceforge.net>
- * Copyright (C) 2009, 2010, 2011, MinGW Project
+ * Copyright (C) 2009, 2010, 2011, 2012, MinGW Project
*
*
* Implementation of the main program function, which is invoked by
* for tracking packages as processed.
*/
pkgProcessedArchives = NULL;
- if( pkgOptions()->Test( OPTION_ALL_DEPS ) == OPTION_ALL_DEPS )
+ if( pkgOptions()->Test( OPTION_ALL_RELATED ) )
{
- /* The "--all-related" option is in effect; for each
- * package identified on the command line...
+ /* The "--all-related" option is in effect; ensure
+ * that all dependencies will be evaluated, as if to
+ * perform a recursive reinstall...
+ */
+ pkgOptions()->SetFlags( OPTION_ALL_DEPS );
+ /*
+ * ...then, for each package which is identified on
+ * the command line...
*/
while( --argc )
/*
* $Id$
*
* Written by Keith Marshall <keithmarshall@users.sourceforge.net>
- * Copyright (C) 2009, 2010, 2011, MinGW Project
+ * Copyright (C) 2009, 2010, 2011, 2012, MinGW Project
*
*
* Initiation stub for command line invocation of mingw-get
" for which the most recent release is\n"
" already installed\n"
"\n"
+" --recursive Extend the scope of \"install --reinstall\"\n"
+" or of \"upgrade\", such that the operation\n"
+" is applied recursively to all prerequisites\n"
+" of all packages named on the command line\n"
+"\n"
" --download-only Download the package archive files which\n"
" would be required to complete the specified\n"
" install, upgrade, or source operation, but\n"
" download any package file, or otherwise\n"
" proceed with the operation\n"
"\n"
-" --recursive\n"
" --all-related When performing source or licence operations,\n"
" causes mingw-get to retrieve, and optionally to\n"
" unpack the source or licence archives for all\n"
{ "help", no_argument, NULL, 'h' },
{ "verbose", optional_argument, NULL, OPTION_VERBOSE },
- { "recursive", no_argument, &optref, OPTION_ALL_DEPS },
+ { "recursive", no_argument, &optref, OPTION_RECURSIVE },
{ "reinstall", no_argument, &optref, OPTION_REINSTALL },
{ "download-only", no_argument, &optref, OPTION_DNLOAD_ONLY },
{ "print-uris", no_argument, &optref, OPTION_PRINT_URIS },
- { "all-related", no_argument, &optref, OPTION_ALL_DEPS },
+ { "all-related", no_argument, &optref, OPTION_ALL_RELATED },
# if DEBUG_ENABLED( DEBUG_TRACE_DYNAMIC )
/* The "--trace" option is supported only when dynamic tracing
* $Id$
*
* Written by Keith Marshall <keithmarshall@users.sourceforge.net>
- * Copyright (C) 2011, MinGW Project
+ * Copyright (C) 2011, 2012, MinGW Project
*
*
* Public declarations of the data structures, values and functions
#define OPTION_DOWNLOAD_ONLY (0x00000030)
#define OPTION_PRINT_URIS (0x00000070)
+#define OPTION_RECURSIVE (0x00000080)
#define OPTION_ALL_DEPS (0x00000090)
+#define OPTION_ALL_RELATED (0x00000100)
#if __cplusplus
/*
*/
return this ? (flags[index].numeric & mask) : 0;
}
+ inline void SetFlags( unsigned value )
+ {
+ /* This is a mask and store operation, to set a specified
+ * bit-field within the first pair of flags slots; it mimics
+ * the options setting operation performed in the CLI start-up
+ * code, where the input value represents a 12-bit flag code,
+ * packaged with a 12-bit combining mask, and an alignment
+ * shift count between 0 and 52, in 4-bit increments.
+ */
+ unsigned shift;
+ if( (shift = (value & OPTION_SHIFT_MASK) >> 22) < 53 )
+ {
+ *(uint64_t *)(flags) &= ~((uint64_t)((value & 0xfff000) >> 12) << shift);
+ *(uint64_t *)(flags) |= (uint64_t)(value) << shift;
+ }
+ }
};
/* Access modes for the following global options accessor function.