Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 287297 - Should portage delete on IOError?
Summary: Should portage delete on IOError?
Status: RESOLVED OBSOLETE
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-02 03:36 UTC by Pablo Cholaky
Modified: 2017-08-18 08:36 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pablo Cholaky 2009-10-02 03:36:49 UTC
Hi there

Sometimes im out of disk on installations and i get a IOError installing and files remains there.

Maybe portage should delete that "pseudo" installed files. Ex.

Installing bar...
->bar.foo1
->bar.foo2
->bar.foo3
->bar.foo4
1) IOError
1) Blah blah blah blah blah
1) Blah blah blah blah blah
2)

1) Should display "Sorry, out of space, you need (compiled folder size - current HD free space)
2) Should delete all bar.foo (all installed files)
Comment 1 Fabio Erculiani (RETIRED) gentoo-dev 2009-10-02 06:36:02 UTC
Please give us more information like:
- Attach "emerge --info" output
- Full Portage error output (traceback) that concerns you
- how to reproduce it (it seems missing and "blah blah blah" don't help)
- Explain your issue more clearly

Thanks!
Comment 2 Zac Medico gentoo-dev 2009-10-02 07:02:52 UTC
We can use os.statvfs() to check for free space prior to merge. That way, we can bail out about the same time as the collision protection code that's called from dblink.treewalk() in vartree.py. The code will have to account for mount points like /usr and /var, which make it a little complex but still doable.
Comment 3 Pablo Cholaky 2009-10-02 09:05:18 UTC
Oh, sorry, is not a bug, is a wishlist, sorry

Well... another thing...

When im 'emerging' some package and fails or ctrl+c is caugh, /var/tmp/portage/<package> still there using space...

If im going to recompile that package, is deleted... but if im not going to compile it anymore? Will be there forever? (well, im thinking on special case if this computer will not be turn off for large time)

Ex.

$emerge foo
*Emerging bar/Foo-0.1
-Checking bar.h... fail
******************
* Error various
*
*****************

$du /var/tmp/
1043534         /var/tmp/
1043534         /var/tmp/bar/foo/...


In reply to Fabio Erculiani... thats what im saying...

Today:
$df
Filesystem Use%
/                  90%
$emerge foo
*Emerging bar/Foo-0.1
⁻ Checking bar.h
* Compiling Foo-0.1
- cc bar.c
* Compiled Foo-0.1
* Installing Foo-0.1
-> foo  /bin/foo
******************
* Error about space
*
*****************

IOError: No space on disk

$df
Filesystem Use%
/                  100%

Thats because when im installing and fails, installed files remains on disk, same for /var/tmp/<package>, leaving a system with 0b


My idea:
$df
Filesystem Use%
/                  90%
$emerge foo
*Emerging bar/Foo-0.1
⁻ Checking bar.h
* Compiling Foo-0.1
- cc bar.c
* Compiled Foo-0.1
* Installing Foo-0.1
-> foo  /bin/foo
(except IOError:   #Im installing, but my harddisk isnt enough)
Portage Error: Your hd space is insufficient, you need at least 250MB free available.

$df
Filesystem Use%
/                  90%


Where 250MB = size of /var/tmp/<current package> - size of / (after delete /var/tmp/<current package>)