mirror of
https://github.com/pygos/pkg-utils.git
synced 2024-11-22 04:49:46 +01:00
install: make sure package dependencies have no trivial cycles
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
This commit is contained in:
parent
98b655f133
commit
82c888bcbf
1 changed files with 7 additions and 0 deletions
|
@ -42,6 +42,13 @@ int collect_dependencies(int repofd, struct pkg_dep_list *list)
|
||||||
|
|
||||||
buffer[dep.name_length] = '\0';
|
buffer[dep.name_length] = '\0';
|
||||||
|
|
||||||
|
if (strcmp((char *)buffer, it->name) == 0) {
|
||||||
|
fprintf(stderr,
|
||||||
|
"%s: package depends on itself\n",
|
||||||
|
it->name);
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
it->deps[i] = find_pkg(list, (char *)buffer);
|
it->deps[i] = find_pkg(list, (char *)buffer);
|
||||||
if (it->deps[i] == NULL) {
|
if (it->deps[i] == NULL) {
|
||||||
it->deps[i] = append_pkg(list, (char *)buffer);
|
it->deps[i] = append_pkg(list, (char *)buffer);
|
||||||
|
|
Loading…
Reference in a new issue