Make deinstall reinstall

Hallo,

I install some port using command:

[cmd=]make install clean[/cmd]

When I want to reinstall this port should I use:

[cmd=]make deinstall reinstall[/cmd]

or

[cmd=]make install clean[/cmd]?
 
Don't do make deinstall. Only use that if you are deinstalling the exact same version as the port. Use pkg_delete(1) to remove an installed port.
 
Yeah, "make deinstall" uses the information in the port Makefile and pkg-plist to see what to remove. If the version in the Makefile is not identical to the installed version, files can be left behind or accidentally deleted.

"pkg_delete" uses the information in /var/db/pkg, which corresponds to what's actually on the disk.

"make deinstall" and "make reinstall" should really only be used for testing. "pkg_delete" and "make install" are better, more reliable tools.
 
phoenix said:
Yeah, "make deinstall" uses the information in the port Makefile and pkg-plist to see what to remove. If the version in the Makefile is not identical to the installed version, files can be left behind or accidentally deleted.

# less +/deinstall: /usr/ports/Mk/bsd.port.mk shows that 'make deinstall' actually just runs 'pkg_delete -f' on the installed version.

So 'make deinstall' and 'pkg_delete' are the same, except that 'make deinstall' has some additional checks and so is actually safer. pkg_delete -f will blindly delete whatever package you tell it, while deinstall will actually look up the correct package.

But back to the original question:# make reinstall lets you reinstall a port without deinstalling it first. If there's a need to redo a port, I usually use deinstall, look for leftover files, then install.
 
wblock said:
# less +/deinstall: /usr/ports/Mk/bsd.port.mk shows that 'make deinstall' actually just runs 'pkg_delete -f' on the installed version.

That's right. They changed how this works last year, to remove the possible mismatch. I always forget this. Thanks for the reminder. One of these days, I'll remember it. :D

So 'make deinstall' and 'pkg_delete' are the same, except that 'make deinstall' has some additional checks and so is actually safer. pkg_delete -f will blindly delete whatever package you tell it, while deinstall will actually look up the correct package.

Adding -xi to pkg_delete makes it much safer as well. :)
 
phoenix said:
That's right. They changed how this works last year, to remove the possible mismatch. I always forget this. Thanks for the reminder. One of these days, I'll remember it. :D

make deinstall as pkg_delete has been around since... well, a long time. Maybe you're thinking of that horrible "this conflicts with something you have installed so you can't even download it" change last year.
 
When trying to update my psp, it said I had to do a make deinstall and make reinstall first, which I did. Now it will not install properly, not creating or populating the extensions directory of 20090626 for one. So I guess I need to do a pkg_delete of the old version now. Problem is, I don't know the exact version number of the old version, and cannot find it since the new version has been installed. I know it is 5.2.XXXX, but that is all, and pkg_delete requires the proper version number to work. Is there any way I can find out what versions of php still need deleting?

Marshall
 
Back
Top