summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/apt/apt-0.9.7.8/truncate-filename.patch
diff options
context:
space:
mode:
authorEric Bénard <eric@eukrea.com>2013-04-25 00:08:01 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-29 14:45:07 +0100
commitf94519c617b23df28d93e1313c3325eddf59d59d (patch)
tree3611a1571d8a766b1b9425ec9a9a6336b8e3f4fc /meta/recipes-devtools/apt/apt-0.9.7.8/truncate-filename.patch
parent60589dd60ce0e088a2976b98ed8b914b26a83a03 (diff)
downloadast2050-yocto-poky-f94519c617b23df28d93e1313c3325eddf59d59d.zip
ast2050-yocto-poky-f94519c617b23df28d93e1313c3325eddf59d59d.tar.gz
apt: update to 0.9.7.8
(From OE-Core rev: 09b3a782bf1c0738ddd7f9622a7fa4a1d51225ca) Signed-off-by: Eric Bénard <eric@eukrea.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.7.8/truncate-filename.patch')
-rw-r--r--meta/recipes-devtools/apt/apt-0.9.7.8/truncate-filename.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/meta/recipes-devtools/apt/apt-0.9.7.8/truncate-filename.patch b/meta/recipes-devtools/apt/apt-0.9.7.8/truncate-filename.patch
new file mode 100644
index 0000000..db1c42b
--- /dev/null
+++ b/meta/recipes-devtools/apt/apt-0.9.7.8/truncate-filename.patch
@@ -0,0 +1,35 @@
+strutl.cc: the filename can't be longer than 255
+
+The URItoFileName translates the path into the filename, but the
+filename can't be longer than 255 according to
+/usr/include/linux/limits.h.
+
+Truncate it when it is longer than 240 (leave some spaces for
+".Packages" and "._Release" suffix)
+
+Upstream-Status: Pending
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ apt-pkg/contrib/strutl.cc | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc
+--- a/apt-pkg/contrib/strutl.cc
++++ b/apt-pkg/contrib/strutl.cc
+@@ -399,7 +399,12 @@ string URItoFileName(const string &URI)
+ // "\x00-\x20{}|\\\\^\\[\\]<>\"\x7F-\xFF";
+ string NewURI = QuoteString(U,"\\|{}[]<>\"^~_=!@#$%^&*");
+ replace(NewURI.begin(),NewURI.end(),'/','_');
+- return NewURI;
++
++ // Truncate from the head when it is longer than 240
++ if(NewURI.length() > 240)
++ return NewURI.substr(NewURI.length() - 240, NewURI.length() - 1);
++ else
++ return NewURI;
+ }
+ /*}}}*/
+ // Base64Encode - Base64 Encoding routine for short strings /*{{{*/
+--
+1.7.10.4
+
OpenPOWER on IntegriCloud