Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 261675

Summary: Interaction between digest and parallel-fetch options can cause problems.
Product: Portage Development Reporter: Hans de Graaff <graaff>
Component: Core - ConfigurationAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal CC: cla, mkay
Priority: High Keywords: InVCS
Version: 2.1   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 210077, 261959    
Attachments: fix interference triggered by FEATURES=digest
fix interference triggered by FEATURES=digest
fix interference triggered by FEATURES=digest

Description Hans de Graaff gentoo-dev Security 2009-03-08 12:40:17 UTC
When the 'digest' and 'parallel-fetch' FEATURES are both turned on in /etc/make.conf, then bad things can happen when trying to install a number of packages that share the same source file. Examples of such packages are mozilla-firefox and xulrunner, or the recent gtk-related *-sharp packages.

What seems to happen is that the digest is recalculated based on a partial download, leading to digest verification errors later on since the digest was calculated against a partial download that no longer exists nor can be downloaded anywhere anymore.
Comment 1 Marcin Kryczek 2009-03-08 12:54:33 UTC
yesterday i had problem with qt-4.5.0, which is divided into several ebuilds.
i've installed (in order): qt-core, qt-dbus, qt-sql, qt-scripts, qt-test (and few more). after instalation of qt-core, emerge fails with qt-dbus, couse it expected file to have size of 49MB (and qt-sources has 108MB), so i've made sync. after sync i was able to install qt-dbus, but i had the same problem with qt-sql (which wanted sources of lenghr 22MB AFAIR). another sync and the same problem with qt-scripts. after third sync the problem disapear and i was able to install rest of qt

im not sure if it's related with this bug, but it looks similar
Comment 2 Marcin Kryczek 2009-03-08 12:57:20 UTC
forgot to mention - i do have these 2 options in FEATURES
Comment 3 Zac Medico gentoo-dev 2009-03-09 01:53:35 UTC
Created attachment 184393 [details, diff]
fix interference triggered by FEATURES=digest

If this patch is saved as /tmp/digest_parallel.patch, then it can be applied as follows:

  patch /usr/lib/portage/pym/portage/__init__.py /tmp/digest_parallel.patch
Comment 4 Zac Medico gentoo-dev 2009-03-09 02:07:13 UTC
Created attachment 184395 [details, diff]
fix interference triggered by FEATURES=digest

The previous patch missed a case. This patch should cover all cases.
Comment 5 Zac Medico gentoo-dev 2009-03-09 02:35:27 UTC
Created attachment 184401 [details, diff]
fix interference triggered by FEATURES=digest 

There was one other thing that I had overlooked. Now it should work perfectly.
Comment 6 Zac Medico gentoo-dev 2009-03-10 09:33:21 UTC
This is fixed in 2.2_rc24 which is in package.mask. I'll close this bug when it's also released in 2.1.6.8.
Comment 7 Zac Medico gentoo-dev 2009-03-13 20:44:46 UTC
This is released in 2.1.6.8.