The command make reinstall does not work anymore (after the changes with FLAVOR). Also FORCE_PKG_REGISTER does not work. It ends with "Error Code 70". Baptiste Daroussin wrote: because it should have always been like that, the real reinstallation was make deinstall reinstall, the fact one needs not to run deinstall first was a bug introduced very very long ago. If it is so, so please obsolete these two commands .
Forgot the link to Bapt's statement https://github.com/freebsd/pkg/commit/7991c49665419916210ad589d4a85fd2a7f58b37#commitcomment-25649084
I vote for removing FORCE_PKG_REGISTER and reinstall.
So just do 'make install clean'?
(In reply to Rob Belics from comment #3) Sorry. Ignore. I mis-read it.
"make xyz install" complains about the package already being installed, "make xyz reinstall" has just been disabled. I don't really care about the sematics but I need to be able to reinstall a package. Am I missing something?
Remove the "xyz" bit - the make target is install or reinstall, of course. I was thinking along the lines of my upgrade script which goes through a list of packages I need to be compiled from source because of changed options, patched source, etc.
I would say remove FORCE_PKG_REGISTER. But make something like a alias. reinstall as alias for deinstall install. It is more handy for typing the command.
I just finished rolling back my entire system after hitting this issue. My problem in detail: * Most of my packages are installed via pkg * A few packages are installed via ports because I need custom patches, debug information, different build options, etc. I (and probably quite a few others) need an option to reinstall a package via ports in a system generally maintained via pkg.
I just read the few existing comments and commit logs again. And again. And eventually it occurred to me that this is exclusively about pkg and package management and the believe that the "ports reinstall" sequence is broken. Thus, there had to be a way considered to be correct for pkg to reinstall something, and there is: pkg install -f ... IMHO, it's unfortunate that this was released without a corresponding fix to the ports project. For others who are wondering how reinstall an installed package from ports: - run "make package" in ports - run "pkg install -f /usr/ports/packages/..." Would it be possible to consider mapping the "make reinstall" target to doing something along those lines as well?
I ran into this problem too where trying to upgrade any installed package through ports would result in "make reinstall" throwing error 70. This is all the more frustrating because running "make install" specifically tells the user to run "make reinstall" which will always fail. I think the "make reinstall" command should probably, instead of simply failing with error 70, tell the user something like: "Run 'make package ; pkg install -f work/pkg/package-name" Alternatively it would be nice if "make reinstall" did that automatically, so "make reinstall" functioned as an alias for "make package; pkg install -f". This would best reflect what the user was trying to do.
I see no big work, if I am right all what is to do is: bsd.port.mk 3703 reinstall: 3704 @${RM} ${INSTALL_COOKIE} ${PACKAGE_COOKIE} 3705 - @cd ${.CURDIR} && DEPENDS_TARGET="${DEPENDS_TARGET}" ${MAKE} install 3706 + @cd ${.CURDIR} && ${MAKE} deinstall && ${MAKE} install 3707 .endif
(In reply to w.schwarzenfeld from comment #11) > I see no big work, if I am right all what is to do is: > bsd.port.mk > 3703 reinstall: > 3704 @${RM} ${INSTALL_COOKIE} ${PACKAGE_COOKIE} > 3705 - @cd ${.CURDIR} && DEPENDS_TARGET="${DEPENDS_TARGET}" ${MAKE} > install > 3706 + @cd ${.CURDIR} && ${MAKE} deinstall && ${MAKE} install > 3707 .endif Pretty much it looks right. I don't know what's up with DEPENDS_TARGET there.
A copy and paste error. The original line is @cd ${.CURDIR} && DEPENDS_TARGET="${DEPENDS_TARGET}" ${MAKE} -DFORCE_PKG_REGISTER install
But that is only for "reinstall". The were still the problem with "install".
> Alternatively it would be nice if "make reinstall" did that automatically +1
Whatever, I hope someone would soon solve this annoying problem.
2018-05-21: some problem. Really, none of the FreeBSD developers do not suffer from this, only users ;-)?
The silly issue being the ports framework is still lying to its users ;) https://github.com/freebsd/freebsd-ports/blob/master/Mk/bsd.port.mk#L3480-L3481
I don't understand why nobody removes "-DFORCE_PKG_REGISTER" or change only one line (see comment11).
Created attachment 207181 [details] svn-diff-bsd.port.mk
Created attachment 207182 [details] svn-diff-bsd.port.mk Attached the wrong file.
A commit references this bug: Author: bapt Date: Wed Sep 4 12:01:20 UTC 2019 New revision: 511086 URL: https://svnweb.freebsd.org/changeset/ports/511086 Log: Fix the reinstall target to make it follow a proper sequence first deinstall then reinstall. For now keep the DEPENDS_TARGET, which should probably die, but let study that in a second step PR: 224244 Submitted by: Walter Schwarzenfeld <w.schwarzenfeld@utanet.at> Changes: head/Mk/bsd.port.mk
Sorry for the delay, I somehow completly missed that PR over the years. Thanks for the fix. Note that I kept the DEPENDS_TARGET for now. More work is needed imho on the DEPENDS_TARGET, to deornit it or at the very least cleaning it up