Bug 214767

Summary: Add make (ports) targets that alias pkg lock/unlock commands to be consistent with other available commands/expectations
Product: Ports & Packages Reporter: Slawomir Wojciech Wojtczak <vermaden>
Component: Ports FrameworkAssignee: Port Management Team <portmgr>
Status: Closed Not Accepted    
Severity: Affects Some People CC: koobs, portmgr, ports-bugs
Priority: --- Keywords: easy, feature, needs-patch
Version: LatestFlags: koobs: maintainer-feedback? (portmgr)
Hardware: Any   
OS: Any   

Description Slawomir Wojciech Wojtczak 2016-11-23 06:51:40 UTC
/usr/ports/x11/nvidia-driver # make deinstall 
===>  Deinstalling for nvidia-driver
===>   Deinstalling nvidia-driver-346.96

nvidia-driver-346.96 is locked and may not be modified
Checking integrity... done (0 conflicting)
Package(s) not found!
*** Error code 65

Stop.
make: stopped in /usr/ports/x11/nvidia-driver




/usr/ports/x11/nvidia-driver # make unlock
make: don't know how to make unlock. Stop

make: stopped in /usr/ports/x11/nvidia-driver
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2016-11-23 07:29:11 UTC
pkg is used for package database/registration functions, as well as being the frontend for binary packages (and their repositories).

That is to say, pkg is used to lock packages, whether installed via ports or packages
Comment 2 Slawomir Wojciech Wojtczak 2016-11-23 09:15:37 UTC
Yep, but while 'make' is able to install/uninstall a package, then why not add make lock/unlock targets for consistency?
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2016-12-03 03:07:46 UTC
Re-open and update summary to clarify this as a consistency/user experience/pola issue.

+1 on the feature

@Vermaden If you would like to and could provide a patch for this, that would be welcome.
Comment 4 Baptiste Daroussin freebsd_committer freebsd_triage 2019-09-05 12:18:20 UTC
I strongly think this is a bad idea. lock and unlock are imho feature that should not be promoted too much has it has a lot of drawbacks and can lead to many problems. Adding new targets in the ports tree will just promote it even more.

Beside that. The ports tree is not a place to do package management. it can install because it is mandatory to be able to build packages. so it does not have to present all commands pkg have via targets.