| Summary: |
apt-native 0.7.14: Method file has died unexpectedly when run (tmpdir length) |
| Product: |
[Build System, Metadata & Runtime] OE-Core
|
Reporter: |
Robert Yang <liezhi.yang> |
| Component: |
devtools / tool chain | Assignee: |
Robert Yang <liezhi.yang> |
| Status: |
VERIFIED
FIXED
|
QA Contact: |
|
| Severity: |
normal
|
|
|
| Priority: |
Medium
|
CC: |
jessica.zhang, liang.li2, meta.mr.watcher, meta.watcher, sgw, song.liu, zhenfeng.zhao
|
| Version: |
1.3 | |
|
| Target Milestone: |
1.3 M4 | |
|
| Hardware: |
x86 | |
|
| OS: |
Multiple | |
|
| Whiteboard: |
(P2) (QA Testing Completed)(Done) |
|
OS type for building Yocto:
|
---
|
Type of Regression:
|
---
|
|
Verified:
|
|
Documentation change:
|
---
|
| Bug Depends on: |
|
|
|
| Bug Blocks: |
2434
|
|
|
When the length of the tmpdir is longer than 400, there is an error when run "apt-get update": Method file has died unexpectedly! This is caused by the following code in apt-pkg/acquire-method.cc: // AcqMethod::URIStart - Indicate a download is starting /*{{{*/ // --------------------------------------------------------------------- /* */ void pkgAcqMethod::URIStart(FetchResult &Res) { if (Queue == 0) abort(); char S[1024] = ""; char *End = S; End += snprintf(S,sizeof(S),"200 URI Start\nURI: %s\n",Queue->Uri.c_str()); if (Res.Size != 0) End += snprintf(End,sizeof(S)-4 - (End - S),"Size: %lu\n",Res.Size); if (Res.LastModified != 0) End += snprintf(End,sizeof(S)-4 - (End - S),"Last-Modified: %s\n", TimeRFC1123(Res.LastModified).c_str()); if (Res.ResumePoint != 0) End += snprintf(End,sizeof(S)-4 - (End - S),"Resume-Point: %lu\n", Res.ResumePoint); strcat(End,"\n"); if (write(STDOUT_FILENO,S,strlen(S)) != (signed)strlen(S)) exit(100); } The S[1024] is not enough when the tmpdir is very long, assign a bigger value would fix the problem, for example, 2048.