Bug 249917 - ports-mgmt/pkg: pkg 1.15.6 : pkg clean also removes newly installed packages
Summary: ports-mgmt/pkg: pkg 1.15.6 : pkg clean also removes newly installed packages
Status: New
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: 2020-09-26 14:11 UTC by Trond.Endrestol
Modified: 2020-09-26 14:11 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (pkg)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Trond.Endrestol 2020-09-26 14:11:31 UTC
This is possibly a pilot error on my part. I always run a string of pkg(8) commands when upgrading my systems. Up until the 1.15 series of ports-mgmt/pkg, pkg clean did only remove outdated packages, but only when a certain limit was reached. It would not always remove all outdated packages in one go. Now, it seems it almost wants to blow away the entire local package cache. This is on amd64, stable/12, r365314.

# pkg update -f && pkg upgrade && pkg clean
Updating builder01 repository catalogue...
Fetching meta.conf: 100%    163 B   0.2kB/s    00:01
Fetching packagesite.txz: 100%  189 KiB 193.4kB/s    00:01
Processing entries: 100%
builder01 repository update completed. 677 packages processed.
All repositories are up to date.
Updating builder01 repository catalogue...
builder01 repository is up to date.
All repositories are up to date.
New version of pkg detected; it needs to be installed first.
The following 1 package(s) will be affected (of 0 checked):

Installed packages to be UPGRADED:
        pkg: 1.15.4 -> 1.15.6

Number of packages to be upgraded: 1

8 MiB to be downloaded.

Proceed with this action? [y/N]: y
[1/1] Fetching pkg-1.15.6.txz: 100%    8 MiB   8.0MB/s    00:01
Checking integrity... done (0 conflicting)
[1/1] Upgrading pkg from 1.15.4 to 1.15.6...
[1/1] Extracting pkg-1.15.6: 100%
Updating builder01 repository catalogue...
builder01 repository is up to date.
All repositories are up to date.
Checking for upgrades (7 candidates): 100%
Processing candidates (7 candidates): 100%
The following 7 package(s) will be affected (of 0 checked):

Installed packages to be UPGRADED:
        bind-tools: 9.16.6 -> 9.16.7
        ca_root_nss: 3.56 -> 3.57
        cairo: 1.16.0,3 -> 1.16.0_1,3
        emacs-nox: 27.1,3 -> 27.1_1,3
        glib: 2.56.3_9,1 -> 2.66.0_1,1
        libxml2: 2.9.10 -> 2.9.10_1
        nss: 3.56 -> 3.57

Number of packages to be upgraded: 7

49 MiB to be downloaded.

Proceed with this action? [y/N]: y
[1/7] Fetching nss-3.57.txz: 100%    2 MiB   2.0MB/s    00:01
[2/7] Fetching libxml2-2.9.10_1.txz: 100%  826 KiB 845.6kB/s    00:01
[3/7] Fetching glib-2.66.0_1,1.txz: 100%    2 MiB   2.2MB/s    00:01
[4/7] Fetching emacs-nox-27.1_1,3.txz: 100%   39 MiB  40.4MB/s    00:01
[5/7] Fetching cairo-1.16.0_1,3.txz: 100%    1 MiB   1.1MB/s    00:01
[6/7] Fetching ca_root_nss-3.57.txz: 100%  285 KiB 291.5kB/s    00:01
[7/7] Fetching bind-tools-9.16.7.txz: 100%    4 MiB   4.3MB/s    00:01
Checking integrity... done (0 conflicting)
[1/7] Upgrading libxml2 from 2.9.10 to 2.9.10_1...
[1/7] Extracting libxml2-2.9.10_1: 100%
[2/7] Upgrading glib from 2.56.3_9,1 to 2.66.0_1,1...
[2/7] Extracting glib-2.66.0_1,1: 100%
No schema files found: doing nothing.
[3/7] Upgrading nss from 3.56 to 3.57...
[3/7] Extracting nss-3.57: 100%
[4/7] Upgrading emacs-nox from 27.1,3 to 27.1_1,3...
[4/7] Extracting emacs-nox-27.1_1,3: 100%
[5/7] Upgrading cairo from 1.16.0,3 to 1.16.0_1,3...
[5/7] Extracting cairo-1.16.0_1,3: 100%
[6/7] Upgrading ca_root_nss from 3.56 to 3.57...
[6/7] Extracting ca_root_nss-3.57: 100%
[7/7] Upgrading bind-tools from 9.16.6 to 9.16.7...
[7/7] Extracting bind-tools-9.16.7: 100%
The following package files will be deleted:
        /var/cache/pkg/php72-pgsql-7.2.33.txz
        /var/cache/pkg/libxml2-2.9.10.txz
        /var/cache/pkg/php72-openssl-7.2.33-31cef81672.txz
        /var/cache/pkg/libxml2-2.9.10_1~41d1fe6151.txz <== Hey, you just installed this one! Why do you want to to remove it?
        /var/cache/pkg/php72-7.2.33-e2ff17d93a.txz
        /var/cache/pkg/emacs-nox-27.1_1,3~5e52c7e66b.txz <== Hey, you just installed this one! Why do you want to to remove it?
        /var/cache/pkg/emacs-nox-27.1,3-1a60b72082.txz
        /var/cache/pkg/pkg-1.15.4-d83943d7a4.txz
        /var/cache/pkg/glib-2.66.0_1,1.txz <== Hey, you just installed this one! Why do you want to to remove it?
        /var/cache/pkg/libxml2-2.9.10-9f8039cde2.txz
        /var/cache/pkg/cairo-1.16.0_1,3.txz <== Hey, you just installed this one! Why do you want to to remove it?
        /var/cache/pkg/ca_root_nss-3.57~ec3bc4201c.txz <== Hey, you just installed this one! Why do you want to to remove it?
        /var/cache/pkg/php72-pgsql-7.2.33-83d5696f58.txz
        /var/cache/pkg/apache24-2.4.46.txz
        /var/cache/pkg/php72-zlib-7.2.33-f23c8a821f.txz
        /var/cache/pkg/php72-json-7.2.33-68450bd8db.txz
        /var/cache/pkg/bind-tools-9.16.7~c1f49e7dd1.txz <== Hey, you just installed this one! Why do you want to remove it?
        /var/cache/pkg/ca_root_nss-3.57.txz
        /var/cache/pkg/php72-xml-7.2.33-4162a6bcc7.txz
        /var/cache/pkg/ca_root_nss-3.56-7667a45152.txz
        /var/cache/pkg/bind-tools-9.16.7.txz <== Hey, you just installed this one! Why do you want to remove it?
        /var/cache/pkg/pkg-1.15.6.txz <== Hey, you just installed this one! Why do you want to remove it?
        /var/cache/pkg/amanda-client-3.3.9_4,1.txz
        /var/cache/pkg/emacs-nox-27.1_1,3.txz <== Hey, you just installed this one! Why do you want to remove it?
        /var/cache/pkg/nss-3.57.txz <== Hey, you just installed this one! Why do you want to remove it?
        /var/cache/pkg/emacs-nox-27.1,3.txz
        /var/cache/pkg/nss-3.57~8f087328c7.txz <== Hey, you just installed this one! Why do you want to remove it?
        /var/cache/pkg/php72-session-7.2.33-a11b0363fb.txz
        /var/cache/pkg/php72-hash-7.2.33-adc1712add.txz
        /var/cache/pkg/amanda-client-3.3.9_4,1-36d9da8a4c.txz
        /var/cache/pkg/php72-json-7.2.33.txz
        /var/cache/pkg/mc-nox11-4.8.24-f22aeb3572.txz
        /var/cache/pkg/mc-nox11-4.8.24.txz
        /var/cache/pkg/postgresql11-contrib-11.9.txz
        /var/cache/pkg/postgresql11-contrib-11.9-ae1c78215d.txz
        /var/cache/pkg/libxml2-2.9.10_1.txz <== Hey, you just installed this one! Why do you want to remove it?
        /var/cache/pkg/php72-openssl-7.2.33.txz
        /var/cache/pkg/ca_root_nss-3.56.txz
        /var/cache/pkg/php72-zlib-7.2.33.txz
        /var/cache/pkg/glib-2.66.0_1,1~47f326b2dc.txz <== Hey, you just installed this one! Why do you want to remove it?
        /var/cache/pkg/apache24-2.4.46-a2e3ac4fa4.txz
        /var/cache/pkg/php72-hash-7.2.33.txz
        /var/cache/pkg/pkg-1.15.6~dee248db4a.txz
        /var/cache/pkg/php72-mbstring-7.2.33.txz
        /var/cache/pkg/php72-xml-7.2.33.txz
        /var/cache/pkg/php72-mbstring-7.2.33-bfb8823175.txz
        /var/cache/pkg/php72-session-7.2.33.txz
        /var/cache/pkg/php72-7.2.33.txz
        /var/cache/pkg/cairo-1.16.0_1,3~0deca7e1e2.txz <== Hey, you just installed this one! Why do you want to remove it?
The cleanup will free 116 MiB

Proceed with cleaning the cache? [y/N]: y
Deleting files: 100%
All done