summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/server.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-06-18 05:25:07 +0200
committerDan McGee <dan@archlinux.org>2007-09-28 07:16:43 +0200
commitf7bbfe4052ca1060d2d1021dacd77923d8ab6786 (patch)
treec1013c79b1148874ff30effe4c84c99eb69b5a86 /lib/libalpm/server.c
parent0758012b6617fd25f3af84853611b9adaf65f674 (diff)
downloadpacman-f7bbfe4052ca1060d2d1021dacd77923d8ab6786.tar.gz
pacman-f7bbfe4052ca1060d2d1021dacd77923d8ab6786.tar.xz
Remove package name dependency from libalpm
Previously, package names must match a specified scheme or they will cause pacman add operations to fail. This is not a very intelligent or necessary way to act, so remove the dependency on the name of the package to be installed and read all relevant information from the metadata instead. This does have one causality to be addressed later- pacman cache cleaning functionality, which has never been phenomenal, just lost most capability. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/server.c')
-rw-r--r--lib/libalpm/server.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/lib/libalpm/server.c b/lib/libalpm/server.c
index 5fdc41a6..8d9c6f87 100644
--- a/lib/libalpm/server.c
+++ b/lib/libalpm/server.c
@@ -187,22 +187,15 @@ int _alpm_downloadfiles_forreal(alpm_list_t *servers, const char *localpath,
char output[PATH_MAX];
char *fn = (char *)lp->data;
char pkgname[PKG_NAME_LEN];
- char *p;
fileurl = url_for_file(server, fn);
if(!fileurl) {
return(-1);
}
- /* Try to get JUST the name of the package from the filename */
- memset(pkgname, 0, PKG_NAME_LEN);
- if((p = strstr(fn, PKGEXT))) {
- _alpm_pkg_splitname(fn, pkgname, NULL, 1);
- }
- if(!strlen(pkgname)) {
- /* just use the raw filename if we can't find crap */
- strncpy(pkgname, fn, PKG_NAME_LEN);
- }
+ /* use the raw filename for download progress */
+ /* TODO maybe strip the normal pkg.tar.gz extension? */
+ strncpy(pkgname, fn, PKG_NAME_LEN);
_alpm_log(PM_LOG_DEBUG, "using '%s' for download progress\n", pkgname);
snprintf(realfile, PATH_MAX, "%s%s", localpath, fn);