[Frugalware-darcs] pacman: _alpm_fetch_pkgurl(): download packages
to the cache dir, not to the current working directory
VMiklos
vmiklos at frugalware.org
Fri Nov 17 01:56:03 CET 2006
Darcsweb-Url: http://darcs.frugalware.org/darcsweb/darcsweb.cgi?r=pacman;a=darcs_commitdiff;h=20061117005524-e2957-0357f8cef58f2e8a845c28efd3e7045364c73055.gz;
[_alpm_fetch_pkgurl(): download packages to the cache dir, not to the current working directory
VMiklos <vmiklos at frugalware.org>**20061117005524] {
hunk ./lib/libalpm/server.c 515
- char spath[PATH_MAX];
+ char spath[PATH_MAX], lpath[PATH_MAX], lcache[PATH_MAX];
hunk ./lib/libalpm/server.c 540
+ snprintf(lcache, PATH_MAX, "%s%s", handle->root, handle->cachedir);
+ snprintf(lpath, PATH_MAX, "%s%s/%s", handle->root, handle->cachedir, fn);
hunk ./lib/libalpm/server.c 545
- if(stat(fn, &buf) == 0) {
- _alpm_log(PM_LOG_DEBUG, _(" %s is already in the current directory\n"), fn);
+ if(stat(lpath, &buf) == 0) {
+ _alpm_log(PM_LOG_DEBUG, _("%s is already in the cache\n"), fn);
hunk ./lib/libalpm/server.c 562
- if(_alpm_downloadfiles(servers, ".", files)) {
+ if(_alpm_downloadfiles(servers, lcache, files)) {
hunk ./lib/libalpm/server.c 573
- return(strdup(fn));
+ return(strdup(lpath));
hunk ./lib/libalpm/server.c 575
- return(strndup(fn, PATH_MAX));
+ return(strndup(lpath, PATH_MAX));
}
More information about the Frugalware-darcs
mailing list