Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 795690 - ebuild leaves tmp files on fetch failed
Summary: ebuild leaves tmp files on fetch failed
Status: UNCONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Ebuild Support (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-13 02:30 UTC by Anton Bolshakov
Modified: 2021-06-13 04:52 UTC (History)
1 user (show)

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 Anton Bolshakov 2021-06-13 02:30:05 UTC
Hello,

I was hunting for this annoying bug for a while and got it finally.

During ebuild development it, a developer might provide an invalid SRC_URI.
Later, a developer would run a "ebuild test.ebuild manifest" command and it would fail, returning 404. The portage does not delete TMP file in this case and it will be /var/tmp/tmpxxx empty directory left over in the tmp directory.

Could you please catch the exception and remove this directory?

Thanks.

sys-apps/portage-3.0.18
Comment 1 Zac Medico gentoo-dev 2021-06-13 04:44:20 UTC
It sounds like this mkdtemp call:

https://gitweb.gentoo.org/proj/portage.git/tree/lib/portage/package/ebuild/_spawn_nofetch.py?h=portage-3.0.19#n70

It's supposed to be cleaned up by this shutil.rmtree call in the _nofetch_exit method:

https://gitweb.gentoo.org/proj/portage.git/tree/lib/portage/package/ebuild/_spawn_nofetch.py?h=portage-3.0.19#n104