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
It would seem reasonable, that, when the conflicting files do not actually exist on the filesystem, the installation should not fail. Instead of seeking, how to modify pkg's command line to "force" the installation, it may be easier to just delete the few problematic entries (when there are only a few, that is).
The below patch may be incomplete -- the same method may need extending to the config-files and directories -- but gives an idea, of what I mean...
--- libpkg/pkgdb.c 2023-07-12 03:48:26.000000000 -0400+++ libpkg/pkgdb.c 2023-07-25 22:30:14.525498000 -0400@@ -43,4 +43,5 @@
#include <sys/param.h>
#include <sys/mount.h>
+#include <sys/stat.h>
#include <assert.h>
@@ -1671,4 +1672,6 @@
while (pkg_files(pkg, &file) == EPKG_OK) {
bool permissive = false;
+ struct stat sb;+
if (match_ucl_lists(file->path,
pkg_config_get("FILES_IGNORE_GLOB"),
@@ -1709,4 +1712,19 @@
ERROR_STMT_SQLITE(s, STMT(FILES_REPLACE));
goto cleanup;
+ }+ if (stat(file->path, &sb) != 0) {+ switch (errno) {+ case ENOENT:+ case ENAMETOOLONG:+ case ELOOP:+ pkg_emit_error("%s-%s seems to conflict with %s-%s, "+ "but the problematic %s does not exist, ignoring",+ pkg->name, pkg->version, pkg2->name, pkg2->version,+ file->path);+ pkg_free(pkg2);+ continue;+ default:+ warn("%s: stat", file->path);+ }
}
if (!forced) {
The text was updated successfully, but these errors were encountered:
One example is when a family of related ports is rearranged, and trying to portupgrade them causes conflicts. Such as the multimedia/gstreamer1-plugins-ugly used to install a shared object, which is now provided by the multimedia/gstreamer1-plugins-bad...
It would seem reasonable, that, when the conflicting files do not actually exist on the filesystem, the installation should not fail. Instead of seeking, how to modify
pkg
's command line to "force" the installation, it may be easier to just delete the few problematic entries (when there are only a few, that is).The below patch may be incomplete -- the same method may need extending to the config-files and directories -- but gives an idea, of what I mean...
The text was updated successfully, but these errors were encountered: