depends++;
}
+ for(i = 0; i < pkg->depends_count; i++){
+ parseDepends(depends, hash, pkg->depends_str[i]);
+ depends++;
+ }
+
for(i = 0; i < pkg->recommends_count; i++){
parseDepends(depends, hash, pkg->recommends_str[i]);
depends->type = RECOMMEND;
depends->type = SUGGEST;
depends++;
}
-
- for(i = 0; i < pkg->depends_count; i++){
- parseDepends(depends, hash, pkg->depends_str[i]);
- depends++;
- }
}
/*
}
index -= pkg->pre_depends_count;
+ if (index < pkg->depends_count) {
+ return pkg->depends_str[index];
+ }
+ index -= pkg->depends_count;
+
if (index < pkg->recommends_count) {
return pkg->recommends_str[index];
}
if (index < pkg->suggests_count) {
return pkg->suggests_str[index];
}
- index -= pkg->suggests_count;
- if (index < pkg->depends_count) {
- return pkg->depends_str[index];
- }
fprintf(stderr, "pkg_depend_str: index %d out of range for pkg=%s\n", index, pkg->name);
return NULL;
}
+/*
+ * WARNING: This function assumes pre_depends and depends are at the
+ * start of the pkg->depends array.
+ */
void buildDependedUponBy(pkg_t * pkg, abstract_pkg_t * ab_pkg)
{
compound_depend_t * depends;