You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suppose we have repo1 and repo2 configured as repositories.
Then there is a package 'bar' with origin 'foo/bar'.
The package is installed, it is annotated with repo2.
The package is also outdated. Let's say its version is 1.1 while both repo1 and repo2 have version 1.2.
jobs_solve_upgrade would call get_remote_pkg with foo/bar as a pattern.
pkgdb_rquery would return an iterator over both remote package (one in each repository). Let's presume that the package from repo1 would be the first.
newer_than_local_pkg would return false for the package from repo1 because the repository name would not match the annotation on the locally installed package. As a result, the remote package from repo1 would be added to j->seen hash table.
On the next iteration, we would work on the package from repo2. A lookup in j->seen, which is done by origin, would find the previously seen package from repo1. Thus the code flow would go into the following block with 'seen' set to true:
if (p1 != NULL) {
pkg_get(p1, PKG_VERSION, &buf1);
pkg_get(p, PKG_VERSION, &buf2);
p->direct = root;
if (seen) {
if (pkg_version_cmp(buf1, buf2) >= 0)
continue;
} else {
if (pkg_version_cmp(buf1, buf2) == 1)
continue;
HASH_DEL(j->bulk, p1);
pkg_free(p1);
}
}
Because the packages from repo1 and repo2 have exactly the same version the repo2 package would simply be skipped.
It seems that the quoted code does not account for the fact that p1 might have been previously skipped for reasons other than unsatisfactory version.
The text was updated successfully, but these errors were encountered:
Suppose we have repo1 and repo2 configured as repositories.
Then there is a package 'bar' with origin 'foo/bar'.
The package is installed, it is annotated with repo2.
The package is also outdated. Let's say its version is 1.1 while both repo1 and repo2 have version 1.2.
jobs_solve_upgrade would call get_remote_pkg with foo/bar as a pattern.
pkgdb_rquery would return an iterator over both remote package (one in each repository). Let's presume that the package from repo1 would be the first.
newer_than_local_pkg would return false for the package from repo1 because the repository name would not match the annotation on the locally installed package. As a result, the remote package from repo1 would be added to j->seen hash table.
On the next iteration, we would work on the package from repo2. A lookup in j->seen, which is done by origin, would find the previously seen package from repo1. Thus the code flow would go into the following block with 'seen' set to true:
Because the packages from repo1 and repo2 have exactly the same version the repo2 package would simply be skipped.
It seems that the quoted code does not account for the fact that p1 might have been previously skipped for reasons other than unsatisfactory version.
The text was updated successfully, but these errors were encountered: