Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 384597 - portage mishandles \r within filenames
Summary: portage mishandles \r within filenames
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 381649
  Show dependency tree
 
Reported: 2011-09-27 04:18 UTC by Joe Pelkey
Modified: 2011-09-29 18:49 UTC (History)
0 users

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


Attachments
app-arch/filename-test/filename-test-1.0.ebuild (filename-test-1.0.ebuild,2.27 KB, text/plain)
2011-09-27 04:20 UTC, Joe Pelkey
Details
app-arch/filename-test/filename-test-1.0-r1.ebuild (filename-test-1.0-r1.ebuild,2.27 KB, text/plain)
2011-09-27 04:21 UTC, Joe Pelkey
Details
filename-test-1.0 build log (filename-test-1.0:20110927-041136.log,2.51 KB, text/plain)
2011-09-27 04:25 UTC, Joe Pelkey
Details
filename-test-1.0-r1 build log (filename-test-1.0-r1:20110927-041240.log,3.54 KB, text/plain)
2011-09-27 04:27 UTC, Joe Pelkey
Details
/var/db/pkg/app-arch/filename-test-1.0-r1/CONTENTS (CONTENTS,1.43 KB, text/plain)
2011-09-27 04:28 UTC, Joe Pelkey
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joe Pelkey 2011-09-27 04:18:10 UTC
Portage correctly handles \n within a filename by dying if a filename to be installed contains a \n.  However, it does not check for \r which leads to a CONTENTS file parsing error.


Reproducible: Always

Steps to Reproduce:
1. emerge filename-test-1.0 to see \n in a filename fail
2. emerge filename-test-1.0-r1 to see \r succeed yet cause parsing errors

Actual Results:  
for 1:
 * This package installs one or more files containing a newline (\n) character:
 *
 *      /usr/share/doc/filename-test-1.0/LF_\n
 *
 * package app-arch/filename-test-1.0 NOT merged
 *

for 2:
!!! Parse error in '/var/db/pkg/app-arch/filename-test-1.0-r1/CONTENTS'
!!!   line 13: Unrecognized CONTENTS entry
!!!   line 14: Unrecognized CONTENTS entry
>>> app-arch/filename-test-1.0-r1 merged.


Expected Results:  
for 2:
 * This package installs one or more files containing a newline (\n or \r) character:
 *
 *      /usr/share/doc/filename-test-1.0/CR_\r
 *
 * package app-arch/filename-test-1.0 NOT merged
 *
Comment 1 Joe Pelkey 2011-09-27 04:20:31 UTC
Created attachment 287869 [details]
app-arch/filename-test/filename-test-1.0.ebuild
Comment 2 Joe Pelkey 2011-09-27 04:21:03 UTC
Created attachment 287871 [details]
app-arch/filename-test/filename-test-1.0-r1.ebuild
Comment 3 Joe Pelkey 2011-09-27 04:25:14 UTC
Created attachment 287875 [details]
filename-test-1.0 build log
Comment 4 Joe Pelkey 2011-09-27 04:27:33 UTC
Created attachment 287877 [details]
filename-test-1.0-r1 build log
Comment 5 Joe Pelkey 2011-09-27 04:28:36 UTC
Created attachment 287879 [details]
/var/db/pkg/app-arch/filename-test-1.0-r1/CONTENTS
Comment 7 Zac Medico gentoo-dev 2011-09-29 18:49:09 UTC
This is fixed in 2.1.10.20 and 2.2.0_alpha60.