diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2012-07-04 18:16:28 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-07-09 16:58:16 +0100 |
commit | 9a0c0393871eda4bbcecfdd4b595f0c1b8e42edf (patch) | |
tree | f4945504c96af443e93df355ff843fe855a6e9e5 /meta/recipes-devtools/apt/apt-0.7.14 | |
parent | 0d2d59420b5924491ccd5c091c823b9c277a6721 (diff) | |
download | openembedded-core-9a0c0393871eda4bbcecfdd4b595f0c1b8e42edf.tar.gz openembedded-core-9a0c0393871eda4bbcecfdd4b595f0c1b8e42edf.tar.bz2 openembedded-core-9a0c0393871eda4bbcecfdd4b595f0c1b8e42edf.zip |
apt 0.7.14: runtime error: filename too long (tmpdir length)
when the tmpdir dir is longer than 220, there is no files saved in
tmp/sysroots/x86_64-linux/var/lib/apt/lists/ after run apt-get update,
this is because apt-get uses the path as the file name, but the file
name can't be longer than 255 according to /usr/include/linux/limits.h.
[YOCTO #2688]
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Diffstat (limited to 'meta/recipes-devtools/apt/apt-0.7.14')
-rw-r--r-- | meta/recipes-devtools/apt/apt-0.7.14/truncate-filename.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/meta/recipes-devtools/apt/apt-0.7.14/truncate-filename.patch b/meta/recipes-devtools/apt/apt-0.7.14/truncate-filename.patch new file mode 100644 index 0000000000..db1c42b66c --- /dev/null +++ b/meta/recipes-devtools/apt/apt-0.7.14/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 + |