a keepdir() which creates .keep files only if those file don't exist would solve problems for people who have a read-only /usr/portage, e.g. mounted ro via nfs. example: all sys-apps/baselayout ebuilds do a 'keepdir /usr/portage'; this makes the emerge fail if /usr/portage is is read-only. if /usr/portage/.keep exists, the call to touch(1) in keepdir() is needless. a patch for /usr/lib/portage/ebuild.sh follows.
Created attachment 7541 [details, diff] ebuild.sh patch makes ebuild.sh to create .keep files only they don't exist
typo in patch comment: s/only they/only if they/
modified and integrated for next release
in testing.