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

Bug 538980

Summary: sys-apps/portage: validate /dev
Product: Portage Development Reporter: Zac Medico <zmedico>
Component: Core - Interface (emerge)Assignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal Keywords: InVCS
Priority: Normal    
Version: 2.2   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 484436    

Description Zac Medico gentoo-dev 2015-02-05 21:43:46 UTC
If /dev isn't proper, it can lead to all kinds of odd failures. Therefore, it would be useful to validate /dev and and bail out early if appropriate. Two simple tests come to mind:

1) test that /dev/null is a device
2) test that bash process substitution works (relies on /dev/fd), using a simple test like [[ $(< <(echo foo) ) == foo ]]
Comment 1 Alexander Berntsen (RETIRED) gentoo-dev 2015-02-13 12:56:27 UTC
"Portage development" is a bit wide. Do you have something more specific in mind?
Comment 2 Zac Medico gentoo-dev 2015-02-13 16:26:06 UTC
If we just do this check when emerge starts up, then that should be sufficient. We could call it from inside the profile_check function, or close to where that function is called, inside pym/_emerge/main.py.
Comment 3 Alexander Berntsen (RETIRED) gentoo-dev 2015-02-13 18:13:19 UTC
Patch posted for review: <http://news.gmane.org/gmane.linux.gentoo.portage.devel/cutoff=5221>.
Comment 5 Brian Dolbec (RETIRED) gentoo-dev 2015-03-04 21:22:52 UTC
Released in portage-2.2.18