[PATCH] pkgng forcing pkg register
Tomasz Sowa
t.sowa at ttmath.org
Wed Dec 12 11:47:23 UTC 2012
Hi
I'm testing the new pkgng from 10-CURRENT but it seems to not having an
option for forcing registering a package. I have got a lot texlive-*
packages (more than 1000) but I cannot upgrade them, I still got:
Installing [pkg_name]: [pkg_name] conflicts with [other_pkg_name]
(installs files into the same place)
Googling through "(installs files into the same place)" shows that a lot
of people have such a problem with other ports. So I wonder why there is
no an option to force registering a port?
Below is a small patch for pkg, after setting FORCE_PKG_REGISTER env
variable you can force registering a port. May it should be other var
than FORCE_PKG_REGISTER?
--
Tomek
--- pkg-1.0.3.oryginal/libpkg/pkgdb.c 2012-12-12 11:19:29.000000000 +0100
+++ pkg-1.0.3/libpkg/pkgdb.c 2012-12-12 11:33:05.000000000 +0100
@@ -1795,9 +1795,12 @@
lic_t licenselogic;
int64_t flatsize;
int64_t i;
+ bool force_register;
assert(db != NULL);
+ force_register = (getenv("FORCE_PKG_REGISTER") != 0);
+
if (pkg_is_valid(pkg) != EPKG_OK) {
pkg_emit_error("the package is not valid");
return (EPKG_FATAL);
@@ -1872,7 +1875,7 @@
const char *pkg_sum = pkg_file_cksum(file);
ret = run_prstmt(FILES, pkg_path, pkg_sum, package_id);
- if (ret == SQLITE_DONE)
+ if (force_register || ret == SQLITE_DONE)
continue;
if (ret != SQLITE_CONSTRAINT) {
ERROR_SQLITE(s);
More information about the freebsd-ports
mailing list