index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Aurelien Foret <aurelien@archlinux.org> | 2005-11-07 09:43:25 +0000 |
---|---|---|
committer | Aurelien Foret <aurelien@archlinux.org> | 2005-11-07 09:43:25 +0000 |
commit | 6a2230dce1544418112c85bf46f3669cc7fed7dc (patch) | |
tree | 02644dc12ad45891aebc18ce9be6d4618633799c /lib/libalpm | |
parent | 096e531236c48e3dfaed236a9653a473b146ee00 (diff) |
-rw-r--r-- | lib/libalpm/package.c | 9 |
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c index 93f234e7..33b9d079 100644 --- a/lib/libalpm/package.c +++ b/lib/libalpm/package.c @@ -267,6 +267,11 @@ pmpkg_t *pkg_load(char *pkgfile) RET_ERR(PM_ERR_MEMORY, NULL); } + /* ORE + * We should get the name and version information from the file name + * by using pkg_splitname() + */ + for(i = 0; !th_read(tar); i++) { if(config && filelist && scriptcheck) { /* we have everything we need */ @@ -281,16 +286,20 @@ pmpkg_t *pkg_load(char *pkgfile) tar_extract_file(tar, descfile); /* parse the info file */ if(parse_descfile(descfile, info, 0) == -1) { + _alpm_log(PM_LOG_ERROR, "could not parse the package description file"); + pm_errno = PM_ERR_PKG_INVALID; FREE(descfile); goto error; } if(!strlen(info->name)) { _alpm_log(PM_LOG_ERROR, "missing package name in %s", pkgfile); + pm_errno = PM_ERR_PKG_INVALID; FREE(descfile); goto error; } if(!strlen(info->version)) { _alpm_log(PM_LOG_ERROR, "missing package version in %s", pkgfile); + pm_errno = PM_ERR_PKG_INVALID; FREE(descfile); goto error; } |