Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 350045 - doins -r fails for some filenames
Summary: doins -r fails for some filenames
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Ebuild Support (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 349307
  Show dependency tree
 
Reported: 2010-12-29 15:24 UTC by Ulrich Müller
Modified: 2010-12-31 10:03 UTC (History)
0 users

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


Attachments
Minimal test ebuild to reproduce the error (foo-1.ebuild,359 bytes, text/plain)
2010-12-29 15:26 UTC, Ulrich Müller
Details
Patch for doins that fixes the problem for me (doins.patch,332 bytes, patch)
2010-12-29 15:31 UTC, Ulrich Müller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Müller gentoo-dev 2010-12-29 15:24:06 UTC
If a directory contains a file with a backslash in its name, doins -r will error out.

Example ebuild and patch will follow.
Comment 1 Ulrich Müller gentoo-dev 2010-12-29 15:26:27 UTC
Created attachment 258357 [details]
Minimal test ebuild to reproduce the error

This produces the following output:

>>> Install foo-1 into /var/tmp/portage/app-misc/foo-1/image/ category app-misc
install: cannot stat `./barbaz': No such file or directory
!!! doins: ./barbaz does not exist
doins failed
 * ERROR: app-misc/foo-1 failed:
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line  56:  Called src_install
 *   environment, line 206:  Called die
 * The specific snippet of code:
 *       doins -r . || die
Comment 2 Ulrich Müller gentoo-dev 2010-12-29 15:31:03 UTC
Created attachment 258358 [details, diff]
Patch for doins that fixes the problem for me

There are several other occurences of
   find ... -print0 | while read -d $'\0' x; do ...; done
in portage's bash scripts which are likely to suffer from the same problem.

I suggest that a -r option is added to all of them.
Comment 4 Zac Medico gentoo-dev 2010-12-31 10:03:50 UTC
This is fixed in 2.1.9.27.