Bug 8161 - Can't use "\" characters in SRC_URI entries - not even escaped
Summary: Can't use "\" characters in SRC_URI entries - not even escaped
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 3.3
Assignee: Unassigned
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2015-08-14 10:34 UTC by Andrei Gherzan
Modified: 2021-04-22 15:27 UTC (History)
7 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.