fixed a regression (patch from VMiklos <vmiklos@frugalware.org>)
This commit is contained in:
parent
ad2c7463c9
commit
839a64df41
2 changed files with 2 additions and 4 deletions
|
@ -292,7 +292,6 @@ void *alpm_db_getinfo(PM_DB *db, unsigned char parm)
|
||||||
int alpm_db_update(PM_DB *db, char *archive)
|
int alpm_db_update(PM_DB *db, char *archive)
|
||||||
{
|
{
|
||||||
PMList *lp;
|
PMList *lp;
|
||||||
char path[PATH_MAX];
|
|
||||||
|
|
||||||
/* Sanity checks */
|
/* Sanity checks */
|
||||||
ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
|
ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
|
||||||
|
@ -323,9 +322,8 @@ int alpm_db_update(PM_DB *db, char *archive)
|
||||||
/* ORE
|
/* ORE
|
||||||
we should not simply unpack the archive, but better parse it and
|
we should not simply unpack the archive, but better parse it and
|
||||||
db_write each entry (see sync_load_dbarchive to get archive content) */
|
db_write each entry (see sync_load_dbarchive to get archive content) */
|
||||||
snprintf(path, PATH_MAX, "%s/%s", db->path, db->treename);
|
|
||||||
_alpm_log(PM_LOG_FLOW2, "unpacking %s", archive);
|
_alpm_log(PM_LOG_FLOW2, "unpacking %s", archive);
|
||||||
if(_alpm_unpack(archive, path, NULL)) {
|
if(_alpm_unpack(archive, db->path, NULL)) {
|
||||||
RET_ERR(PM_ERR_SYSTEM, -1);
|
RET_ERR(PM_ERR_SYSTEM, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -330,7 +330,7 @@ int _alpm_db_read(pmdb_t *db, unsigned int inforeq, pmpkg_t *info)
|
||||||
|
|
||||||
/* INSTALL */
|
/* INSTALL */
|
||||||
if(inforeq & INFRQ_SCRIPLET) {
|
if(inforeq & INFRQ_SCRIPLET) {
|
||||||
snprintf(path, PATH_MAX, "%s/%s/%s-%s/install", db->path, db->treename, info->name, info->version);
|
snprintf(path, PATH_MAX, "%s/%s-%s/install", db->path, info->name, info->version);
|
||||||
if(!stat(path, &buf)) {
|
if(!stat(path, &buf)) {
|
||||||
info->scriptlet = 1;
|
info->scriptlet = 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue