summaryrefslogtreecommitdiff
path: root/lib/libalpm/be_files.c
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-11-20 09:10:23 +0000
committerAaron Griffin <aaron@archlinux.org>2006-11-20 09:10:23 +0000
commitaa1c0ba9f8787fc3b1a1190103e394b0c1c95922 (patch)
treeed0c9675f7fc5da043a69b36e0b8c6c8e05cb583 /lib/libalpm/be_files.c
parentb8b9596b13de957566211b0e1db3e473ed66e147 (diff)
downloadpacman-aa1c0ba9f8787fc3b1a1190103e394b0c1c95922.tar.xz
* repo-add script - to add entries to a db file directly from package data (no PKGBUILD)
* libalpm api changes - move from a _getinfo(p, WHAT_WE_WANT) scheme to a typesafe _get_what_we_want(p) scheme [not 100% complete yet] * some const correctness changes * removal of PM_* types in alpm.h in favor of the pm*_t types used throughout libalpm
Diffstat (limited to 'lib/libalpm/be_files.c')
-rw-r--r--lib/libalpm/be_files.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libalpm/be_files.c b/lib/libalpm/be_files.c
index 8f81235f..33dd78b5 100644
--- a/lib/libalpm/be_files.c
+++ b/lib/libalpm/be_files.c
@@ -43,6 +43,7 @@
#include "alpm.h"
#include "error.h"
#include "handle.h"
+#include "package.h"
/* This function is used to convert the downloaded db file to the proper backend
@@ -199,6 +200,9 @@ int _alpm_db_read(pmdb_t *db, unsigned int inforeq, pmpkg_t *info)
_alpm_log(PM_LOG_FUNCTION, _("loading package data for %s : level=%d"), info->name, inforeq);
+ /* clear out 'line', to be certain - and to make valgrind happy */
+ memset(line, 513, 0);
+
snprintf(path, PATH_MAX, "%s/%s-%s", db->path, info->name, info->version);
if(stat(path, &buf)) {
/* directory doesn't exist or can't be opened */
@@ -410,7 +414,7 @@ int _alpm_db_read(pmdb_t *db, unsigned int inforeq, pmpkg_t *info)
}
/* INSTALL */
- if(inforeq & INFRQ_SCRIPLET) {
+ if(inforeq & INFRQ_SCRIPTLET) {
snprintf(path, PATH_MAX, "%s/%s-%s/install", db->path, info->name, info->version);
if(!stat(path, &buf)) {
info->scriptlet = 1;