summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/apt/apt-0.9.9.4/truncate-filename.patch
diff options
context:
space:
mode:
authorIonut Radu <ionutx.radu@intel.com>2013-07-31 16:58:51 +0300
committerSaul Wold <sgw@linux.intel.com>2013-08-02 08:01:39 -0700
commitad69f62e42c131dcccd33b0e39c61a431f581bea (patch)
tree1f27e87776f0c5b72b94dd4bcd0b9e07e04b2f51 /meta/recipes-devtools/apt/apt-0.9.9.4/truncate-filename.patch
parent2158003ea4b9879fdef34488462cc59450638218 (diff)
downloadopenembedded-core-contrib-ad69f62e42c131dcccd33b0e39c61a431f581bea.tar.gz
apt: Upgrade from 0.9.8.2 to 0.9.9.4
makerace.patch: adapted to the new version Signed-off-by: Ionut Radu <ionutx.radu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
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.patch35
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 @@
+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
+