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

Bug 336285

Summary: portage can hang on unzip asking what to do on disk error (e.g. disk full)
Product: Portage Development Reporter: Paweł Hajdan, Jr. (RETIRED) <phajdan.jr>
Component: Core - External InteractionAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: minor CC: rdwald
Priority: High Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 335925    
Attachments: patch

Description Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2010-09-06 21:19:49 UTC
Steps to repro:

1. Download all distfiles for games-fps/alienarena
2. Make the disk full
3. Try to unpack games-fps/alienarena

Expected result:

emerge fails immediately with an error about insufficient disk space

Actual result:

emerge waits for user's response to unzip's prompt:

>>> Unpacking source...
>>> Unpacking alienarena7_45-Linux20100726.zip to /var/tmp/portage/games-fps/alienarena-20100726/work
alienarena7_45/data1/textures/arena7/tekwall3_hm.tga:  write error (disk full?).  Continue? (y/n/^C)
Comment 1 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2010-09-06 21:20:40 UTC
Created attachment 246307 [details, diff]
patch

This is the simples workaround patch I could think of. I have tested in and it works (emerge fails immediately).
Comment 3 Zac Medico gentoo-dev 2010-09-07 00:27:44 UTC
This is fixed in 2.1.9.1 and 2.2_rc76.
Comment 4 Randall Wald 2010-09-25 23:08:46 UTC
This fix appears to be breaking my instance of portage (portage-2.2_rc86); when attempting to compile a package which requires unpacking a zip file (in particular, liberation-fonts-1.05), I get an endless repetition of the following:

/usr/lib64/portage/bin/ebuild.sh: line 393: echo: write error: Broken pipe

I can't think of another package offhand which requires unpacking a zip file (the alienarena package discussed in this bug has dependencies I don't want to install just for a test), but I'm pretty sure this is the code which is causing my problem.
Comment 5 Zac Medico gentoo-dev 2010-09-25 23:15:15 UTC
(In reply to comment #4)
I can unpack liberation-fonts-1.05 with no problems here, using unzip-6.0-r1 and bash-4.1_p7. Which versions of unzip and bash do you have?
Comment 6 Randall Wald 2010-09-25 23:22:42 UTC
(In reply to comment #5)
> (In reply to comment #4)
> I can unpack liberation-fonts-1.05 with no problems here, using unzip-6.0-r1
> and bash-4.1_p7. Which versions of unzip and bash do you have?
> 

I have unzip-6.0-r1 and bash-4.0_p37, but I have no problem just going to /tmp/liberation and doing "unzip liberation-fonts-ttf-1.05.zip"; the problem only occurs when portage tries to unpack this zip file. I can't be more specific about which stage in the unpacking is where the problem actually occurs, because the aforementioned error messages fly by so fast, no matter how quickly I hit ctrl+c everything else has already scrolled past my buffer. It's definitely very early in the ebuild, though, probably during the unpack step (given that the referenced line in ebuild.sh is the one talking about unpacking zip files).
Comment 7 Zac Medico gentoo-dev 2010-09-26 00:00:58 UTC
(In reply to comment #6)
> I have unzip-6.0-r1 and bash-4.0_p37, but I have no problem just going to
> /tmp/liberation and doing "unzip liberation-fonts-ttf-1.05.zip"; the problem
> only occurs when portage tries to unpack this zip file.

Now I've installed bash-4.0_p37 and it still works for me, so apparently there are some other factors besides bash and unzip involved (maybe libc version). Please file a new bug and post emerge --info output there.