return pkg_set_architecture(pkg, s, e - s);
}
-int pkg_parse_line(void *ptr, const char *line, uint mask)
+int pkg_parse_line(void *ptr, char *line, uint mask)
{
pkg_t *pkg = (pkg_t *) ptr;
abstract_pkg_t *ab_pkg = NULL;
+ conffile_list_t *cl;
/* these flags are a bit hackish... */
static int reading_conffiles = 0, reading_description = 0;
static char *description = NULL;
- char *s;
int ret = 0;
/* Exclude globally masked fields. */
if ((mask & PFM_CONFFILES) && is_field("Conffiles", line)) {
reading_conffiles = 1;
reading_description = 0;
+
+ cl = xcalloc(1, sizeof(*cl));
+ conffile_list_init(cl);
+ pkg_set_ptr(pkg, PKG_CONFFILES, cl);
+
goto dont_reset_flags;
} else if ((mask & PFM_CONFLICTS)
&& is_field("Conflicts", line))
if (ab_pkg && (ab_pkg->state_flag & SF_NEED_DETAIL)) {
if (!(pkg->state_flag & SF_NEED_DETAIL)) {
- opkg_msg(DEPEND, "propagating abpkg flag to pkg %s\n", pkg->name);
+ opkg_msg(DEBUG, "propagating abpkg flag to pkg %s\n", pkg->name);
pkg->state_flag |= SF_NEED_DETAIL;
}
}
case 'S':
if ((mask & PFM_SECTION) && is_field("Section", line))
pkg_set_string(pkg, PKG_SECTION, line + strlen("Section") + 1);
-#ifdef HAVE_SHA256
else if ((mask & PFM_SHA256SUM) && is_field("SHA256sum", line))
pkg_set_sha256(pkg, line + strlen("SHA256sum") + 1);
-#endif
else if ((mask & PFM_SIZE) && is_field("Size", line)) {
pkg_set_int(pkg, PKG_SIZE, strtoul(line + strlen("Size") + 1, NULL, 0));
} else if ((mask & PFM_SOURCE) && is_field("Source", line))