diff options
author | Ionut Radu <ionutx.radu@intel.com> | 2013-07-31 16:58:51 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-08-03 10:33:08 +0100 |
commit | 8d68f1695c7a57bb5b3d5635a48cf2987d589cd3 (patch) | |
tree | 8f69b6da2f7a8aac251fce5d47826673b1ea615c /meta/recipes-devtools/apt/apt-0.9.9.4/truncate-filename.patch | |
parent | 338b0e7b0ff24aac2a81775dacb523b45ee83fbd (diff) | |
download | poky-8d68f1695c7a57bb5b3d5635a48cf2987d589cd3.tar.gz |
apt: Upgrade from 0.9.8.2 to 0.9.9.4
makerace.patch: adapted to the new version
(From OE-Core rev: ad69f62e42c131dcccd33b0e39c61a431f581bea)
Signed-off-by: Ionut Radu <ionutx.radu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/apt/apt-0.9.9.4/truncate-filename.patch')
-rw-r--r-- | meta/recipes-devtools/apt/apt-0.9.9.4/truncate-filename.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/meta/recipes-devtools/apt/apt-0.9.9.4/truncate-filename.patch b/meta/recipes-devtools/apt/apt-0.9.9.4/truncate-filename.patch new file mode 100644 index 0000000000..db1c42b66c --- /dev/null +++ b/meta/recipes-devtools/apt/apt-0.9.9.4/truncate-filename.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | strutl.cc: the filename can't be longer than 255 | ||
2 | |||
3 | The URItoFileName translates the path into the filename, but the | ||
4 | filename can't be longer than 255 according to | ||
5 | /usr/include/linux/limits.h. | ||
6 | |||
7 | Truncate it when it is longer than 240 (leave some spaces for | ||
8 | ".Packages" and "._Release" suffix) | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
12 | --- | ||
13 | apt-pkg/contrib/strutl.cc | 7 ++++++- | ||
14 | 1 file changed, 6 insertions(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc | ||
17 | --- a/apt-pkg/contrib/strutl.cc | ||
18 | +++ b/apt-pkg/contrib/strutl.cc | ||
19 | @@ -399,7 +399,12 @@ string URItoFileName(const string &URI) | ||
20 | // "\x00-\x20{}|\\\\^\\[\\]<>\"\x7F-\xFF"; | ||
21 | string NewURI = QuoteString(U,"\\|{}[]<>\"^~_=!@#$%^&*"); | ||
22 | replace(NewURI.begin(),NewURI.end(),'/','_'); | ||
23 | - return NewURI; | ||
24 | + | ||
25 | + // Truncate from the head when it is longer than 240 | ||
26 | + if(NewURI.length() > 240) | ||
27 | + return NewURI.substr(NewURI.length() - 240, NewURI.length() - 1); | ||
28 | + else | ||
29 | + return NewURI; | ||
30 | } | ||
31 | /*}}}*/ | ||
32 | // Base64Encode - Base64 Encoding routine for short strings /*{{{*/ | ||
33 | -- | ||
34 | 1.7.10.4 | ||
35 | |||