Bug 192603 - ports-mgmt/pkg lock attribute ignored when upgrading from pkg 1.2.7_4 to 1.3.5.1
Summary: ports-mgmt/pkg lock attribute ignored when upgrading from pkg 1.2.7_4 to 1.3.5.1
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-pkg (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-12 02:33 UTC by Adam McDougall
Modified: 2014-12-29 23:42 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam McDougall 2014-08-12 02:33:13 UTC
When I have a locked package and upgrade from pkg 1.2 to 1.3, the lock is ignored:

# pkg lock bmon
bmon-3.3: lock this package? [y/N]: y
Locking bmon-3.3

# pkg upgrade
Updating repository catalogue
digests.txz                                                                       100%   68KB  68.2KB/s  68.2KB/s   00:00    
packagesite.txz                                                                   100%  345KB 345.4KB/s 345.4KB/s   00:00    
Incremental update completed, 1435 packages processed:
1382 packages updated, 13 removed and 53 added.
New version of pkg detected; it needs to be installed first.
Upgrades have been requested for the following 1 packages:

        Upgrading pkg: 1.2.7_4 -> 1.3.5.1 [pkg-egr]

The upgrade will require 1 MB more space

2 MB to be downloaded

Proceed with upgrading packages [y/N]: y
pkg-1.3.5.1.txz                                                                   100% 2217KB   2.2MB/s   2.2MB/s   00:00    
Checking integrity... done
[1/1] Upgrading pkg from 1.2.7_4 to 1.3.5.1... done
If you are upgrading from the old package format, first run:

  # pkg2ng
Updating repository catalogue
pkg-egr repository is up-to-date
All repositories are up-to-date
pkg: Repo pkg-egr needs schema upgrade from 2006 to 2010 but it is opened readonly
pkg: need to re-create repo pkg-egr to upgrade schema version
Updating database digests format: 100%
Checking for upgrades: 100%
Checking integrity... done (0 conflicting)

# pkg update -f
Updating repository catalogue
Fetching meta.txz: 100% of 264 B                                                                                            
Fetching digests.txz: 100% of 68 KB                                                                                         
Fetching packagesite.txz: 100% of 345 KB                                                                                   

Adding new entries: 100%
Incremental update completed, 1435 packages processed:
0 packages updated, 0 removed and 1435 added.

# pkg upgrade
Updating repository catalogue
pkg-egr repository is up-to-date
All repositories are up-to-date
Checking for upgrades: 100%
The following 9 packages will be affected (of 0 checked):

Installed packages to be UPGRADED:
        python27: 2.7.8 -> 2.7.8_2
        nagios-plugins: 2.0.3,1 -> 2.0.3_1,1
        postfix: 2.11.1_1,1 -> 2.11.1_2,1
        openldap-client: 2.4.39 -> 2.4.39_1
        dovecot: 1.2.17_3 -> 1.2.17_4
        pcre: 8.34_1 -> 8.34_2
        libconfuse: 2.7 -> 2.7_1
        ca_root_nss: 3.16.1 -> 3.16.3
        bmon: 3.3 -> 3.3_1           <---------------- should not be upgraded

The operation will free 7 MB
15 MB to be downloaded

Proceed with this action [y/N]: n

After this point, I can lock the package again and it acts properly.

I can reproduce this at will, please let me know if you want me to try more things or provide more information such as a copy of /var/db/pkg.  Thanks.
Comment 1 John Marino freebsd_committer freebsd_triage 2014-08-12 06:22:39 UTC
over to maintainer
Comment 2 Baptiste Daroussin freebsd_committer freebsd_triage 2014-12-29 23:42:06 UTC
It has been fixed since