Bug 8161

Summary: Can't use "\" characters in SRC_URI entries - not even escaped
Product: [Build System, Metadata & Runtime] BitBake Reporter: Andrei Gherzan <andrei>
Component: bitbakeAssignee: Unassigned <unassigned>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: Leif.Middelschulte, meta.mr.watcher, meta.watcher, poky.bs.watcher, poky.watcher, randy.macleod, richard.purdie
Version: unspecified   
Target Milestone: 3.3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Yes (doc changes required)

Description Andrei Gherzan 2015-08-14 10:34:30 UTC
There are cases where special characters need to be used in SRC_URI entries. A simple example is mount systemd services. A file like this which would mount /test-test would need to be named "test\x2dtest". For more examples check systemd-escape. 
Additional info: http://www.freedesktop.org/software/systemd/man/systemd.mount.html

Adding a file like this in SRC_URI makes the fetcher fail.
Comment 1 Ross Burton 2015-08-14 10:40:44 UTC
What escaping did you try, backslash or URI escaping?  eg "test%5Cx2dtest"
Comment 2 Andrei Gherzan 2015-08-14 11:09:49 UTC
Backslash. 

SRC_URI += "test\\x2dtest.mount"
Comment 3 Ross Burton 2015-08-20 14:34:09 UTC
Did you try URI escaping as this is a URI?
Comment 4 Andrei Gherzan 2015-08-21 06:35:38 UTC
Hi,

(In reply to comment #3)
> Did you try URI escaping as this is a URI?

I tried escaping it with URI escape sequence too: "%5C". Fails at unpack.

Andrei
Comment 6 Richard Purdie 2021-04-22 15:20:28 UTC
That was fixed as linked above.
Comment 8 Randy MacLeod 2021-04-22 15:27:56 UTC
Re-opened by accident when adding the actual commit link.