Bug 217339 - ports-mgmt/portupgrade: "pkg lock" does not appear to work
Summary: ports-mgmt/portupgrade: "pkg lock" does not appear to work
Status: Closed Not A Bug
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Fernando Apesteguía
Depends on:
Reported: 2017-02-25 05:39 UTC by Terry Kennedy
Modified: 2023-05-22 07:12 UTC (History)
3 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Terry Kennedy 2017-02-25 05:39:07 UTC
I tried locking a port with "pkg lock", which apparently succeeded:

test2:/tmp# pkg lock -l
Currently locked packages:

I then edited the /usr/ports/dns/bind99/Makefile to show a hypothetical 9.9.9P7:

test2:/usr/ports/dns/bind99# diff Makefile.bak Makefile
< ISCVERSION=   9.9.9-P6
> ISCVERSION=   9.9.9-P7

I then did a "portupgrade -a":

test2:/tmp# portupgrade -a
[Reading data from pkg(8) ... - 326 packages found - done]
--->  Upgrading 'bind99-9.9.9P6' to 'bind99-9.9.9P7' (dns/bind99)
--->  Building '/usr/ports/dns/bind99'
===>  Cleaning for bind99-9.9.9P7
===>  License ISCL accepted by the user
===>  Found saved configuration for bind99-9.9.9
===>   bind99-9.9.9P7 depends on file: /usr/local/sbin/pkg - found

This is with the latest pkg version:

test2:/tmp# pkg -v

This is on a recent 10-STABLE amd64:

test2:/tmp# uname -a
FreeBSD test2.glaver.org 10.3-STABLE FreeBSD 10.3-STABLE #0 r313280: Sun Feb  5 
05:06:43 EST 2017     terry@test2.glaver.org:/usr/obj/usr/src/sys/GENERIC  amd64

Am I doing something wrong? If so, what is the proper method to prevent portupgrade from updating a particular port? In the old days, there was a way to set "Package held by user" or somesuch in /etc/make.conf, but I forget what it was.

[Note: I filed this under "Package Infrastructure" rather than against ports-mgmt/pkg. If it is more appropriate there, feel free to assign it.]
Comment 1 Mathieu Arnold freebsd_committer freebsd_triage 2017-02-26 20:30:37 UTC
This looks like a portupgrade thing.
Comment 2 Terry Kennedy 2017-03-28 04:12:45 UTC
(In reply to Mathieu Arnold from comment #1)

Do we need to request someone to look at this? It was reassigned to portupgrade > 30 days ago.
Comment 3 Terry Kennedy 2017-05-09 18:49:03 UTC
(In reply to Terry Kennedy from comment #2)

Again, can we get someone to look at this?
Comment 4 Tilman Keskinoz freebsd_committer freebsd_triage 2017-11-21 15:39:40 UTC
over to maintainer
Comment 5 Fernando Apesteguía freebsd_committer freebsd_triage 2023-05-22 07:12:36 UTC
I don't think there is a bug here.

pkg works on packages, not ports and it does not know nothing about portupgrade or other port-related tools.

pkg lock will prevent for instance a pkg upgrade of that package if/when there is a newer version of the package available at the repo pointed by pkg.conf.