portage.git
13 years agocache: rewrite to support arbitrary validation method
Brian Harring [Fri, 14 Oct 2011 06:27:22 +0000 (23:27 -0700)]
cache: rewrite to support arbitrary validation method

Specifically, the cache can use any portage supported checksum method,
or use the standard mtime approach.  In addition, support controlling
whether or not paths are stored, and generally try to restore some
of the centralization/encapsulation that was in place originally.
(cherry picked from commit bc1aed614fb588f0ade5bcb5d1265a8db0f8d247)

Change-Id: Ic38057e7dbb15063c64a93c99e66e113a7d4c70e

13 years agocache.util: drop completely dead module/code
Brian Harring [Fri, 14 Oct 2011 08:07:57 +0000 (01:07 -0700)]
cache.util: drop completely dead module/code

Looks of it, this code was copied/mangled into action_metadata; the
noise/callbacks in use don't do anything, so drop them, the dead code,
and clean up the exception handling to reflect the new reality
(cherry picked from commit 320890fadbedf678119ac06d458ed6086075431e)

13 years agorepoman: handle unicode in echangelog args
Zac Medico [Fri, 14 Oct 2011 19:31:19 +0000 (12:31 -0700)]
repoman: handle unicode in echangelog args

13 years agorepoman: add --echangelog=<y|n> for bug #337853
Zac Medico [Fri, 14 Oct 2011 17:55:31 +0000 (10:55 -0700)]
repoman: add --echangelog=<y|n> for bug #337853

This option will call echangelog for each package that has modified
files and does not have a modified ChangeLog. Gentoo's council has
decided that this option will be enabled by default for the "gentoo"
repository. If desired, we can add a metadata/layout.conf setting so
that other repositories can control the default behavior.

13 years agorepoman: support REPOMAN_DEFAULT_OPTS variable
Zac Medico [Fri, 14 Oct 2011 16:29:37 +0000 (09:29 -0700)]
repoman: support REPOMAN_DEFAULT_OPTS variable

13 years agoRevert "Use plain ascii encoding for this file"
Zac Medico [Fri, 14 Oct 2011 15:30:17 +0000 (08:30 -0700)]
Revert "Use plain ascii encoding for this file"

This reverts commit 2a4b07c8d0105ea7418ea3afc9e777a7a396fc46.
Current python ebuilds no longer remove the encodings directory when
USE=ebuild is enabled, so now it's possible to use UTF8 encoding in
python source files without triggering unsightly SyntaxError messages
when python_mod_optimize is compiling byte-code files.

13 years agoUpdate --prune man page entry (bug 387011)
Sebastian Luther [Fri, 14 Oct 2011 10:55:22 +0000 (12:55 +0200)]
Update --prune man page entry (bug 387011)

13 years agoRELEASE-NOTES: FEATURES=fixpackages unconditional
Zac Medico [Fri, 14 Oct 2011 07:01:08 +0000 (00:01 -0700)]
RELEASE-NOTES: FEATURES=fixpackages unconditional

This should help people who get warnings about unknown value(s) in
FEATURES due to having FEATURES=fixpackages enabled in make.conf even
though it's been enabled by default for almost 3 years (bug #386871).

13 years agoFix inverted QA_SONAME_NO_SYMLINK logic.
Zac Medico [Fri, 14 Oct 2011 06:40:02 +0000 (23:40 -0700)]
Fix inverted QA_SONAME_NO_SYMLINK logic.

13 years agoDon't generate soname symlinks for bug #387053.
Zac Medico [Fri, 14 Oct 2011 06:23:48 +0000 (23:23 -0700)]
Don't generate soname symlinks for bug #387053.

The symlink is not really needed now that the QA notice has been
available for some time (testing since 2.1.10.4, and stable
since 2.1.10.11).

13 years agoAdd QA_SONAME_NO_SYMLINK for bug #387053.
Zac Medico [Fri, 14 Oct 2011 06:14:40 +0000 (23:14 -0700)]
Add QA_SONAME_NO_SYMLINK for bug #387053.

13 years agoquickpkg: optimize */* matches
Zac Medico [Fri, 14 Oct 2011 05:13:03 +0000 (22:13 -0700)]
quickpkg: optimize */* matches

13 years agoportageq match: wildcard support
Zac Medico [Fri, 14 Oct 2011 05:04:04 +0000 (22:04 -0700)]
portageq match: wildcard support

13 years ago_pull_valid_cache: fix readonly delete logic
Zac Medico [Fri, 14 Oct 2011 00:23:28 +0000 (17:23 -0700)]
_pull_valid_cache: fix readonly delete logic

13 years agolayout.conf: make the pregenerated cache format controllable
Brian Harring [Thu, 13 Oct 2011 23:26:03 +0000 (16:26 -0700)]
layout.conf: make the pregenerated cache format controllable

Controllable via 'cache-format', currently it supports only one cache;
'pms', and defaults to it.  If an unsupported cache-format is specified,
the cache is disabled.  If pms is specified and metadata/cache directory
doesn't exist, the cache is disabled.

Finally, this rips out the best module support for locally overriding
the cache format used for pregenerated caches; this functionality made
zero sense (upstream determines the format, we use what is available).

13 years agoquickpkg: use AmbiguousPackageName
Zac Medico [Thu, 13 Oct 2011 21:58:17 +0000 (14:58 -0700)]
quickpkg: use AmbiguousPackageName

13 years agoquickpkg: fix '*' in arg extended atom check
Zac Medico [Thu, 13 Oct 2011 21:53:45 +0000 (14:53 -0700)]
quickpkg: fix '*' in arg extended atom check

This check isn't really accurate due to the =* operator, and we don't
want to reject =* atoms when they omit the category.

13 years agolayout.conf: revert authoritative-cache support
Zac Medico [Thu, 13 Oct 2011 21:27:03 +0000 (14:27 -0700)]
layout.conf: revert authoritative-cache support

Those who wanted it have decided to use a different approach.

13 years agodigestcheck: handle allow_missing for distfiles
Zac Medico [Thu, 13 Oct 2011 20:58:16 +0000 (13:58 -0700)]
digestcheck: handle allow_missing for distfiles

13 years agoquickpkg_extended_atom: handle =* operator
Zac Medico [Thu, 13 Oct 2011 15:14:18 +0000 (08:14 -0700)]
quickpkg_extended_atom: handle =* operator

13 years agoquickpkg: Support extended atoms
Sebastian Luther [Thu, 13 Oct 2011 13:03:34 +0000 (15:03 +0200)]
quickpkg: Support extended atoms

13 years agoxpak(5): fix grammar, spelling, style, and add more content
Mike Frysinger [Thu, 13 Oct 2011 02:50:57 +0000 (22:50 -0400)]
xpak(5): fix grammar, spelling, style, and add more content

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoRemove FEATURES=fixpackages support. v2.2.0_alpha67
Zac Medico [Tue, 11 Oct 2011 23:45:46 +0000 (16:45 -0700)]
Remove FEATURES=fixpackages support.

This reduces the probability of users encountering issues related to
package moves when they disable --dynamic-deps, and --package-moves=n
can be set in EMERGE_DEFAULT_OPTS if package moves need to be
temporarily avoided for some reason.

13 years agoEnsure correct IUSE in vdb for bug #386829.
Zac Medico [Tue, 11 Oct 2011 20:57:49 +0000 (13:57 -0700)]
Ensure correct IUSE in vdb for bug #386829.

13 years agobin/ebuild: add --version option
Zac Medico [Tue, 11 Oct 2011 18:28:18 +0000 (11:28 -0700)]
bin/ebuild: add --version option

13 years agoprepstrip: make sure eu-strip embeds right filename
Mike Frysinger [Tue, 11 Oct 2011 17:28:45 +0000 (13:28 -0400)]
prepstrip: make sure eu-strip embeds right filename

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agofetch: tweak space msg for bug #386797
Zac Medico [Tue, 11 Oct 2011 17:27:44 +0000 (10:27 -0700)]
fetch: tweak space msg for bug #386797

13 years agoelog_process: fix ridicoulus newlines bug #386771
Zac Medico [Tue, 11 Oct 2011 16:56:43 +0000 (09:56 -0700)]
elog_process: fix ridicoulus newlines bug #386771

This fixes a regression since commit 8a119ea94ecc6668797e3a1358465ef3733f3a3e
which added a newline after each character. This boosts efficiency since we no
longer convert a strings to lists of characters.

13 years agoprepstrip: add support for elfutils strip
Mike Frysinger [Tue, 11 Oct 2011 04:49:48 +0000 (00:49 -0400)]
prepstrip: add support for elfutils strip

If people use strip from the elfutils package, take advantage of some of
its neat features (like splitting + stripping in one step).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoprepstrip: extract buildid with readelf to avoid debugedit when possible
Mike Frysinger [Tue, 11 Oct 2011 04:40:09 +0000 (00:40 -0400)]
prepstrip: extract buildid with readelf to avoid debugedit when possible

The readelf utility is much more common than debugedit.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoprepstrip: avoid a `dirname` with a simple ${var%/*}
Mike Frysinger [Tue, 11 Oct 2011 02:28:55 +0000 (22:28 -0400)]
prepstrip: avoid a `dirname` with a simple ${var%/*}

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoFakeVartree: disable match wrapper if necessary v2.2.0_alpha66
Zac Medico [Mon, 10 Oct 2011 19:33:04 +0000 (12:33 -0700)]
FakeVartree: disable match wrapper if necessary

13 years agoFakeVartree: type from last commit
Zac Medico [Mon, 10 Oct 2011 18:21:30 +0000 (11:21 -0700)]
FakeVartree: type from last commit

13 years agoFakeVartree: fix sync for --dynamic-deps=n
Zac Medico [Mon, 10 Oct 2011 18:20:12 +0000 (11:20 -0700)]
FakeVartree: fix sync for --dynamic-deps=n

13 years agoScheduler: fix myopts typo from last commit
Zac Medico [Mon, 10 Oct 2011 18:13:12 +0000 (11:13 -0700)]
Scheduler: fix myopts typo from last commit

13 years agoAdd emerge --dynamic-deps <y|n> option.
Zac Medico [Mon, 10 Oct 2011 18:01:36 +0000 (11:01 -0700)]
Add emerge --dynamic-deps <y|n> option.

This makes it possible to disable the dynamic dependency updates that
FakeVartree performs by default.

WARNING: If --dynamic-deps is disabled, then it is necessary to
ensure that an alternative method is used to handle package moves
in dependencies of installed packages. Normally, this is handled
by FEATURES="fixpackages", which is enabled by default and may be
disabled via make.conf(5). Alternatively, in order to manually apply
package moves, run `emaint --fix moveinst` after each emerge --sync
operation (see emaint(1)).

13 years agomod_syslog: add newlines for bug #386627
Zac Medico [Mon, 10 Oct 2011 14:36:39 +0000 (07:36 -0700)]
mod_syslog: add newlines for bug #386627

This fixes omission of newlines in syslog messages since commit
ca7bef7821876791a26a5f9df6938f4c77fe571f.

13 years agoelog_process: add newlines for bug #386627
Zac Medico [Mon, 10 Oct 2011 14:21:54 +0000 (07:21 -0700)]
elog_process: add newlines for bug #386627

This fixes omission of newlines in saved messages since commit
ca7bef7821876791a26a5f9df6938f4c77fe571f.

13 years agoprepstrip: tweak style of debugedit checks v2.2.0_alpha65
Zac Medico [Mon, 10 Oct 2011 06:27:16 +0000 (23:27 -0700)]
prepstrip: tweak style of debugedit checks

Make the checks more like the FEATURES/RESTRICT checks from commit
286675a500998e536dbbf2ee2dfe1fedf4290b38.

13 years agoprepstrip: merge debugedit checks more
Zac Medico [Mon, 10 Oct 2011 06:04:33 +0000 (23:04 -0700)]
prepstrip: merge debugedit checks more

Use a ${debugedit_found} to remember if it's found or not, and use
${debugedit_warned} to avoid showing duplicate warnings.

13 years agoprepstrip: optimize duplicate calls to `has`
Mike Frysinger [Mon, 10 Oct 2011 02:27:35 +0000 (22:27 -0400)]
prepstrip: optimize duplicate calls to `has`

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoprepstrip: merge debugedit checks
Mike Frysinger [Sun, 9 Oct 2011 22:53:53 +0000 (18:53 -0400)]
prepstrip: merge debugedit checks

Avoid checking for debugedit multiple times.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agotests/dodir: check relative path by itself
Mike Frysinger [Sun, 9 Oct 2011 22:43:17 +0000 (18:43 -0400)]
tests/dodir: check relative path by itself

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agotests: setup default bin env more
Mike Frysinger [Sun, 9 Oct 2011 22:34:35 +0000 (18:34 -0400)]
tests: setup default bin env more

We want the default testing env to match default portage env.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoprepstrip: optimize chmod slightly
Mike Frysinger [Sun, 9 Oct 2011 18:43:11 +0000 (14:43 -0400)]
prepstrip: optimize chmod slightly

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agotests/__init__: return int from main()
Zac Medico [Mon, 10 Oct 2011 02:21:54 +0000 (19:21 -0700)]
tests/__init__: return int from main()

13 years agotests/__init__: import print_function
Zac Medico [Mon, 10 Oct 2011 01:55:30 +0000 (18:55 -0700)]
tests/__init__: import print_function

13 years agoMaskManager: fix "Unmatched removal", bug #386569
Zac Medico [Mon, 10 Oct 2011 01:40:32 +0000 (18:40 -0700)]
MaskManager: fix "Unmatched removal", bug #386569

13 years agoSkip PORTAGE_TMPDIR write check for fetchonly.
Zac Medico [Mon, 10 Oct 2011 00:15:31 +0000 (17:15 -0700)]
Skip PORTAGE_TMPDIR write check for fetchonly.

Bug #286201

13 years agoshow_ignored_binaries: filter noise, bug #386379
Zac Medico [Mon, 10 Oct 2011 00:05:23 +0000 (17:05 -0700)]
show_ignored_binaries: filter noise, bug #386379

13 years agotests: add --list flag to show available tests
Mike Frysinger [Sun, 9 Oct 2011 18:43:01 +0000 (14:43 -0400)]
tests: add --list flag to show available tests

Trying to guess at what runtests actually wants in terms of command line
tests is pretty hard.  Any invalid value just gives you an ugly traceback.
So add a helper --list option so the user can easily figure out what the
code wants *exactly*.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agotests: add a --help option to make runtest more friendly
Mike Frysinger [Sun, 9 Oct 2011 18:42:01 +0000 (14:42 -0400)]
tests: add a --help option to make runtest more friendly

At the moment, trying to do `./runtests.h -h` just produces an ugly and
indecipherable traceback.  Make it a bit more friendly.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agotests: split up getTests into helper funcs to avoid duplication
Mike Frysinger [Sun, 9 Oct 2011 18:39:39 +0000 (14:39 -0400)]
tests: split up getTests into helper funcs to avoid duplication

This avoids a little duplication between the getTestFromCommandLine and
getTests funcs, and they'll get utilized even more in follow up patches.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoruntests: make sure we are in the right dir
Mike Frysinger [Sun, 9 Oct 2011 18:38:10 +0000 (14:38 -0400)]
runtests: make sure we are in the right dir

The code assumes we're in the top of the tree (when it tries to run with
the full path "pym/portage/tests/runTests"), so try to make sure we are
in the right place to allow things like `../runtests.sh` to "just work".

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoRevert "RepoConfigLoader: Recursively expand masters."
Zac Medico [Sun, 9 Oct 2011 19:09:22 +0000 (12:09 -0700)]
Revert "RepoConfigLoader: Recursively expand masters."

This reverts commit ab2a6cc357ba3c8272a4a1556e2c0bcd4bee102e.
Reverting all masters recursion code for now (see bug #386569).

13 years agoRevert "MaskManager: Fix stacking of lines from master repositories."
Zac Medico [Sun, 9 Oct 2011 19:08:55 +0000 (12:08 -0700)]
Revert "MaskManager: Fix stacking of lines from master repositories."

This reverts commit 37f05a23fd55b633674f91f4d7658c19e41d2d63.
Reverting all masters recursion code for now (see bug #386569).

13 years agoRevert "get_masters: protect against infinite recursion"
Zac Medico [Sun, 9 Oct 2011 18:57:31 +0000 (11:57 -0700)]
Revert "get_masters: protect against infinite recursion"

This reverts commit 5628dac1538985af640102654bce60a8e526daeb.
Reverting all masters recursion code for now (see bug #386569).

13 years agoget_masters: protect against infinite recursion
Zac Medico [Sat, 8 Oct 2011 23:23:39 +0000 (16:23 -0700)]
get_masters: protect against infinite recursion

We can't have portage crash because of circular deps in layout.conf.

13 years agoRepoConfig: allow repos.conf 'masters' override
Zac Medico [Sat, 8 Oct 2011 22:51:45 +0000 (15:51 -0700)]
RepoConfig: allow repos.conf 'masters' override

This give the user the power to override 'masters' settings from
layout.conf, is case they want use a different set of masters to
satisfy dependencies. This is especially important now that recursive
expansion of masters is supported since commit
ab2a6cc357ba3c8272a4a1556e2c0bcd4bee102e, so that the user can avoid
pulling in unwanted repositories as dependencies, if necessary.

Also, empty 'masters' settings are now supported, in case a repo
wants to avoid implicit inheritance of PORTDIR settings like
package.mask.

13 years agotests: fix whitespace to be consistent
Mike Frysinger [Sat, 8 Oct 2011 21:53:34 +0000 (17:53 -0400)]
tests: fix whitespace to be consistent

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoMaskManager: Fix stacking of lines from master repositories.
Arfrever Frehtes Taifersar Arahesis [Sat, 8 Oct 2011 21:39:10 +0000 (23:39 +0200)]
MaskManager: Fix stacking of lines from master repositories.

13 years agoRepoConfigLoader: Recursively expand masters.
Arfrever Frehtes Taifersar Arahesis [Sat, 8 Oct 2011 21:37:35 +0000 (23:37 +0200)]
RepoConfigLoader: Recursively expand masters.

13 years agowhirlpool.py: tabs to spaces v2.2.0_alpha64
Zac Medico [Sat, 8 Oct 2011 15:15:27 +0000 (08:15 -0700)]
whirlpool.py: tabs to spaces

13 years agoportage/mail: always UTF-8 charset for MIMEText
Zac Medico [Sat, 8 Oct 2011 08:03:17 +0000 (01:03 -0700)]
portage/mail: always UTF-8 charset for MIMEText

This will fix bug #386095.

13 years agorepoman: add 'repository' to portdbapi cache
Zac Medico [Sat, 8 Oct 2011 06:52:21 +0000 (23:52 -0700)]
repoman: add 'repository' to portdbapi cache

This fixes _getMaskAtom to work correctly with the repo atoms that are
generated by MaskManager, solving the issue reported here:

https://github.com/cschwan/sage-on-gentoo/issues/90#issuecomment-2324953

13 years agorepoman: tweak myupdates/myheaders commit logic v2.2.0_alpha63
Zac Medico [Fri, 7 Oct 2011 16:06:49 +0000 (09:06 -0700)]
repoman: tweak myupdates/myheaders commit logic

If we unconditionally exclude myremoved from myupdates, then removed
files will also be excluded from myheaders. This allows us to avoid
unnecessary separate manifest commits in cases when "myheaders" only
contained files that were being removed. Since our code always uses
myupdates + myremoved, this change in logic doesn't break anything.

13 years agorepoman: tweak commit logic wrt thin-manifest
Zac Medico [Fri, 7 Oct 2011 15:04:19 +0000 (08:04 -0700)]
repoman: tweak commit logic wrt thin-manifest

Don't populate the "myheaders" variable when we have thin-manifests
that contain only DIST entries.

13 years agoDon't do a split signed Manifest commit when no headers will change. Fixes bug #340475.
Nathan Phillip Brink [Fri, 7 Oct 2011 05:00:46 +0000 (05:00 +0000)]
Don't do a split signed Manifest commit when no headers will change. Fixes bug #340475.

13 years agoelog/collect_ebuild_messages: strip trailing \n v2.2.0_alpha62
Zac Medico [Thu, 6 Oct 2011 01:22:35 +0000 (18:22 -0700)]
elog/collect_ebuild_messages: strip trailing \n

This fixes unintended extra blank lines since commit
1c8ff00a26b0e2e3627e9c552374f71235ee6c39.

13 years agomatch_to_list: preserve order
Zac Medico [Wed, 5 Oct 2011 19:51:05 +0000 (12:51 -0700)]
match_to_list: preserve order

This allows us to properly test behavior of best_match_to_list with
different permutations of the input.

13 years agotest_best_match_to_list: test all permutations v2.2.0_alpha61
Zac Medico [Wed, 5 Oct 2011 16:11:13 +0000 (09:11 -0700)]
test_best_match_to_list: test all permutations

13 years agodblink._elog_process: preserve empty lines
Zac Medico [Wed, 5 Oct 2011 04:27:03 +0000 (21:27 -0700)]
dblink._elog_process: preserve empty lines

13 years agoExecute tests bundled with the whirlpool module.
Zac Medico [Wed, 5 Oct 2011 03:20:54 +0000 (20:20 -0700)]
Execute tests bundled with the whirlpool module.

13 years agoMark some messages for translation.
Arfrever Frehtes Taifersar Arahesis [Wed, 5 Oct 2011 01:09:53 +0000 (03:09 +0200)]
Mark some messages for translation.

13 years agowhirlpool.py: fix for python3
Zac Medico [Wed, 5 Oct 2011 00:59:30 +0000 (17:59 -0700)]
whirlpool.py: fix for python3

13 years agowhirlpool.py: skip tests during import
Zac Medico [Tue, 4 Oct 2011 16:39:58 +0000 (09:39 -0700)]
whirlpool.py: skip tests during import

13 years agoRepoConfig: sort __slots__
Zac Medico [Tue, 4 Oct 2011 15:33:41 +0000 (08:33 -0700)]
RepoConfig: sort __slots__

13 years agotestManifest: enable manifest-hashes
Zac Medico [Tue, 4 Oct 2011 06:17:22 +0000 (23:17 -0700)]
testManifest: enable manifest-hashes

13 years agorepoman: bail out if unsupported manifest-hashes
Zac Medico [Tue, 4 Oct 2011 05:42:22 +0000 (22:42 -0700)]
repoman: bail out if unsupported manifest-hashes

13 years agobest_match_to_list: order by version number
Zac Medico [Tue, 4 Oct 2011 04:44:46 +0000 (21:44 -0700)]
best_match_to_list: order by version number

This should fix the issue shown in bug 375265, comment #10.

13 years agoSuppress warnings with DeprecationWarning.
Zac Medico [Mon, 3 Oct 2011 20:14:08 +0000 (13:14 -0700)]
Suppress warnings with DeprecationWarning.

These manifest-hashes warnings are irrelevant to regular users, so suppress
them by default.

13 years agoWarn for questionable layout.conf manifest-hashes
Zac Medico [Mon, 3 Oct 2011 18:33:08 +0000 (11:33 -0700)]
Warn for questionable layout.conf manifest-hashes

13 years agomanfest.py: import constants directly
Zac Medico [Mon, 3 Oct 2011 17:42:25 +0000 (10:42 -0700)]
manfest.py: import constants directly

13 years agorepoman: account for GLEP 59 in RMD160 check
Zac Medico [Mon, 3 Oct 2011 10:02:10 +0000 (03:02 -0700)]
repoman: account for GLEP 59 in RMD160 check

13 years agoGLEP 59: use manifest-hashes list in layout.conf
Zac Medico [Mon, 3 Oct 2011 09:42:53 +0000 (02:42 -0700)]
GLEP 59: use manifest-hashes list in layout.conf

The manifest-hashes layout.conf setting simply overrides the hashes
that are generated. When unspecified, the MANIFEST2_HASH_DEFAULTS
constant is used instead (current value contains SHA1, SHA256, and
RMD160).

In order to enable SHA512 and WHIRLPOOL, and drop RMD160 and SHA1,
simply set "manifest-hashes = SHA256 SHA512 WHIRLPOOL" in layout.conf.
As with the previous boolean flags approach, manifest-hashes settings
become redundant and can be removed from layout.conf after a version
of portage with equivalent defaults is stable.

13 years agoImplement GLEP 59 with control via layout.conf.
Zac Medico [Mon, 3 Oct 2011 00:05:30 +0000 (17:05 -0700)]
Implement GLEP 59 with control via layout.conf.

The portage.const changes are derived from an earlier patch that was
submitted by Robin H. Johnson <robbat2@gentoo.org>:

http://archives.gentoo.org/gentoo-portage-dev/msg_911574e7cb615f67e4c21fc75c043f65.xml

This patch has no affect on a repository unless it contains a
metadata/layout.conf file which contains boolean flags that enable or
disable manifest hash types. The plan is to deploy portage with this
patch, and once it has been stabilized, add the following
metadata/layout.conf settings to gentoo-x86:

  manifest-rmd160 = false
  manifest-sha1 = false
  manifest-whirlpool = true

The above settings will become the default settings in a future portage
release, making them redundant and eligible for removal from
layout.conf (in order to avoid cluttering layout.conf with obsolete
information).

Future events:

After WHIRLPOOL is supported in stable portage:
- Add WHIRLPOOL to MANIFEST2_HASH_DEFAULTS.
- Remove SHA1 and RMD160 from MANIFEST2_HASH_*.
- Toggle gentoo-x86/metadata/layout.conf settings to match.

After WHIRLPOOL is supported in stable portage for at least 1 year:
- Change MANIFEST2_REQUIRED_HASH to WHIRLPOOL.
- Remove SHA256 from MANIFEST2_HASH_*.
- Toggle gentoo-x86/metadata/layout.conf settings to match.

After SHA-3 is approved:
- Add new hashes to MANIFEST2_HASH_*.

After SHA-3 is supported in stable portage:
- Toggle gentoo-x86/metadata/layout.conf settings to match.

After layout.conf settings correspond to defaults in stable portage:
- Remove redundant settings from gentoo-x86/metadata/layout.conf.

13 years agoManifest.create(): tweak assume-digests code
Zac Medico [Sun, 2 Oct 2011 23:43:27 +0000 (16:43 -0700)]
Manifest.create(): tweak assume-digests code

If we have a local file, before we assume that we don't need to compute
any digests, make sure that the pre-computed digest types are exactly
the same types that we desire.

13 years agoManifest.create(): pass allow_* to constructor
Zac Medico [Sun, 2 Oct 2011 22:53:39 +0000 (15:53 -0700)]
Manifest.create(): pass allow_* to constructor

This fixes commit f3101b3adce6731790f80f83fafece54b7bd8a63 to ensure
that Manifest.create() works correctly.

13 years agoPrefer slot conflict over blocker display.
Zac Medico [Sun, 2 Oct 2011 20:22:07 +0000 (13:22 -0700)]
Prefer slot conflict over blocker display.

The slot conflict display has better noise reduction than the
unsatisfied blockers display, so skip unsatisfied blockers display if
there are slot conflicts (see bug #385391). Note that this reverses
the logic from bug 159310, since the slot conflict display has evolved
a lot since then.

13 years agoprint_changelog: if no changelogs, no newline
Zac Medico [Sun, 2 Oct 2011 20:09:52 +0000 (13:09 -0700)]
print_changelog: if no changelogs, no newline

This will fix bug #385413.

13 years agodblink._elog_process: handle newlines in messages
Zac Medico [Sun, 2 Oct 2011 19:52:57 +0000 (12:52 -0700)]
dblink._elog_process: handle newlines in messages

This will fix bug #385341.

13 years agochecksum.py: use fchksum.fmd5t directly
Zac Medico [Sun, 2 Oct 2011 06:31:52 +0000 (23:31 -0700)]
checksum.py: use fchksum.fmd5t directly

13 years agochecksum.py: lazily import bundled whirlpool
Zac Medico [Sun, 2 Oct 2011 06:01:17 +0000 (23:01 -0700)]
checksum.py: lazily import bundled whirlpool

13 years agoManifest2 hash backend provider: mhash
Robin H. Johnson [Sat, 1 Oct 2011 07:40:54 +0000 (07:40 +0000)]
Manifest2 hash backend provider: mhash

Offer mhash as a provider for Manifest2 hash generation and validation.
This is important as either of pycrypto or fchksum offer an accelerated
Whirlpool implementation, and hashlib might not offer it. Additionally,
the mhash implementation is accelerated and ships with a rigorious
testsuite.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
13 years agowhirlpool.py: handle xrange for python3
Zac Medico [Sun, 2 Oct 2011 05:42:22 +0000 (22:42 -0700)]
whirlpool.py: handle xrange for python3

13 years agoManifest2 hash: SHA512
Robin H. Johnson [Sat, 1 Oct 2011 07:40:53 +0000 (07:40 +0000)]
Manifest2 hash: SHA512

Provide SHA512 hash algorithm to be used as new Manifest2 hash.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
13 years agoManifest2 hash: Whirlpool
Robin H. Johnson [Sat, 1 Oct 2011 07:40:52 +0000 (07:40 +0000)]
Manifest2 hash: Whirlpool

Provide public-domain implementation of the Whirlpool hash algorithm to
be used as new Manifest2 hash.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
13 years agoRefactor RMD160 hashlib code for less-hardcoding
Robin H. Johnson [Sat, 1 Oct 2011 07:40:51 +0000 (07:40 +0000)]
Refactor RMD160 hashlib code for less-hardcoding

To be used shortly for WHIRLPOOL as well as RMD160.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
13 years agoConvert _generate_hash_function into a class.
Zac Medico [Sun, 2 Oct 2011 05:17:52 +0000 (22:17 -0700)]
Convert _generate_hash_function into a class.

13 years agoConvert create_color_func into a class.
Zac Medico [Sun, 2 Oct 2011 04:58:35 +0000 (21:58 -0700)]
Convert create_color_func into a class.