Bug 218875

Summary: ports-mgmt/portupgrade: Does not install dependencies
Product: Ports & Packages Reporter: Helmut Ritter <freebsd-ports>
Component: Individual Port(s)Assignee: Bryan Drewery <bdrewery>
Status: New ---    
Severity: Affects Only Me CC: bdrewery, w.schwarzenfeld
Priority: --- Flags: bugzilla: maintainer-feedback? (bdrewery)
Version: Latest   
Hardware: Any   
OS: Any   

Description Helmut Ritter 2017-04-25 14:44:09 UTC
[helmut@BSDHelmut ~]$ sudo portupgrade -P ftp/wget
[Reading data from pkg(8) ... - 325 packages found - done]
--->  Checking for the latest package of 'ftp/wget'
--->  Found a package of 'ftp/wget': /usr/ports/packages/All/wget-1.19.1.txz (wget-1.19.1)
--->  Upgrading 'wget-1.19' to 'wget-1.19.1' (ftp/wget) using a package
--->  Backing up the old version
--->  Uninstalling the old version
[Reading data from pkg(8) ... - 325 packages found - done]
--->  Deinstalling 'wget-1.19'
Updating database digests format: 100%
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
        wget-1.19

Number of packages to be removed: 1

The operation will free 3 MiB.
[1/1] Deinstalling wget-1.19...
[1/1] Deleting files for wget-1.19: 100%
[Reading data from pkg(8) ... - 324 packages found - done]
--->  Installing the new version via the package
Installing wget-1.19.1...
pkg: Missing dependency 'libidn2'

Failed to install the following 1 package(s): /usr/ports/packages/All/wget-1.19.1.txz
** Command failed [exit code 70]: /usr/bin/script -qa /tmp/portupgrade20170425-12069-192woed /usr/bin/env UPGRADE_TOOL=portupgrade UPGRADE_PORT=wget-1.19.1 UPGRADE_PORT_VER=1.19.1 /usr/local/sbin/pkg add /usr/ports/packages/All/wget-1.19.1.txz
--->  Restoring the old version
Installing wget-1.19...
Extracting wget-1.19: 100%
** Fix the package's problem and try again.
** Listing the failed packages (-:ignored / *:skipped / !:failed)
        ! ftp/wget (wget-1.19)  (pkg_add failed)
[helmut@BSDHelmut ~]$

Or:

[helmut@BSDHelmut ~]$ sudo portupgrade -P open-vm-tools-nox11-1280544_17,1
[Reading data from pkg(8) ... - 325 packages found - done]
--->  Checking for the latest package of 'emulators/open-vm-tools-nox11'
--->  Found a package of 'emulators/open-vm-tools-nox11': /usr/ports/packages/All/open-vm-tools-nox11-10.1.0_2,2.txz (open-vm-tools-nox11-10.1.0_2,2)
--->  Upgrading 'open-vm-tools-nox11-1280544_17,1' to 'open-vm-tools-nox11-10.1.0_2,2' (emulators/open-vm-tools-nox11) using a package
--->  Backing up the old version
--->  Uninstalling the old version
[Reading data from pkg(8) ... - 325 packages found - done]
--->  Deinstalling 'open-vm-tools-nox11-1280544_17,1'
--->  Preserving /usr/local/lib/libguestlib.so.0.0.0 as /usr/local/lib/compat/pkg/libguestlib.so.0.0.0
--->  Preserving /usr/local/lib/libhgfs.so.0.0.0 as /usr/local/lib/compat/pkg/libhgfs.so.0.0.0
--->  Preserving /usr/local/lib/libvmtools.so.0.0.0 as /usr/local/lib/compat/pkg/libvmtools.so.0.0.0
Updating database digests format: 100%
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
        open-vm-tools-nox11-1280544_17,1

Number of packages to be removed: 1

The operation will free 2 MiB.
[1/1] Deinstalling open-vm-tools-nox11-1280544_17,1...
[1/1] Deleting files for open-vm-tools-nox11-1280544_17,1: 100%
[Reading data from pkg(8) ... - 324 packages found - done]
--->  Installing the new version via the package
Installing open-vm-tools-nox11-10.1.0_2,2...
pkg: Missing dependency 'xerces-c3'

Failed to install the following 1 package(s): /usr/ports/packages/All/open-vm-tools-nox11-10.1.0_2,2.txz
** Command failed [exit code 70]: /usr/bin/script -qa /tmp/portupgrade20170425-13818-bh8pe9 /usr/bin/env UPGRADE_TOOL=portupgrade UPGRADE_PORT=open-vm-tools-nox11-10.1.0_2,2 UPGRADE_PORT_VER=10.1.0_2,2 /usr/local/sbin/pkg add /usr/ports/packages/All/open-vm-tools-nox11-10.1.0_2,2.txz
--->  Restoring the old version
Installing open-vm-tools-nox11-1280544_17,1...
Extracting open-vm-tools-nox11-1280544_17,1: 100%
Message from open-vm-tools-nox11-1280544_17,1:
*******************************************************************
To run the Open Virtual Machine tools at startup, add the following
settings to your /etc/rc.conf

vmware_guest_vmblock_enable="YES"
vmware_guest_vmhgfs_enable="YES"
vmware_guest_vmmemctl_enable="YES"
vmware_guest_vmxnet_enable="YES"
vmware_guestd_enable="YES"

*******************************************************************
** Fix the package's problem and try again.
** Listing the failed packages (-:ignored / *:skipped / !:failed)
        ! emulators/open-vm-tools-nox11 (open-vm-tools-nox11-1280544_17,1)      (pkg_add failed)
[helmut@BSDHelmut ~]$
Comment 1 Walter Schwarzenfeld freebsd_triage 2018-01-10 03:56:06 UTC
wget has 1.19.2 openvm-tools 10.2.0_7253323. Does the problem still exist?
Resp. maintainer feedback (maintainer seems not automatically asigned).
Comment 2 Helmut Ritter 2018-01-10 14:37:44 UTC
(In reply to w.schwarzenfeld from comment #1)

It's not an issue with wget but with portupgrade with ignores dependencies:

[helmut@BSDHelmut ~]$ sudo pkg delete oniguruma-6.6.1_1
Updating database digests format: 100%
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
        oniguruma-6.6.1_1

Number of packages to be removed: 1

The operation will free 2 MiB.

Proceed with deinstalling packages? [y/N]: y
[1/1] Deinstalling oniguruma-6.6.1_1...
[1/1] Deleting files for oniguruma-6.6.1_1: 100%
[helmut@BSDHelmut ~]$

And then:

[helmut@BSDHelmut ~]$ sudo portupgrade -fPP php70-mbstring-7.0.26_2
[Reading data from pkg(8) ... - 302 packages found - done]
--->  Checking for the latest package of 'converters/php70-mbstring'
--->  Fetching the package(s) for 'php70-mbstring-7.0.26_2' (converters/php70-mbstring)
Updating MyRepo repository catalogue...
MyRepo repository is up to date.
All repositories are up to date.
--->  Fetching php70-mbstring-7.0.26_2
pkg: php70-mbstring-7.0.26_2: duplicate dependency listing: php70, ignoring
pkg: php70-mbstring-7.0.26_1: duplicate dependency listing: php70, ignoring
pkg: php70-mbstring-7.0.26_2: duplicate dependency listing: php70, ignoring
The following packages will be fetched:

New packages to be FETCHED:
        php70-mbstring-7.0.26_2 (717 KiB: 100.00% of the 717 KiB to download)

Number of packages to be fetched: 1

717 KiB to be downloaded.
Fetching php70-mbstring-7.0.26_2.txz: 100%  717 KiB 734.6kB/s    00:01
--->  Downloaded as php70-mbstring-7.0.26_2.txz
--->  Identifying the package /var/tmp/portupgradeqamKjqMU/All/php70-mbstring-7.0.26_2.txz
--->  Saved as /usr/ports/packages/All/php70-mbstring-7.0.26_2.txz
--->  Found a package of 'converters/php70-mbstring': /usr/ports/packages/All/php70-mbstring-7.0.26_2.txz (php70-mbstring-7.0.26_2)
--->  Located a package version 7.0.26_2 (/usr/ports/packages/All/php70-mbstring-7.0.26_2.txz)
--->  Reinstalling 'php70-mbstring-7.0.26_2' (converters/php70-mbstring) using a package
--->  Backing up the old version
--->  Uninstalling the old version
[Reading data from pkg(8) ... - 302 packages found - done]
--->  Deinstalling 'php70-mbstring-7.0.26_2'
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
        php70-mbstring-7.0.26_2

Number of packages to be removed: 1

The operation will free 3 MiB.
[1/1] Deinstalling php70-mbstring-7.0.26_2...
[1/1] Deleting files for php70-mbstring-7.0.26_2: 100%
[Reading data from pkg(8) ... - 301 packages found - done]
--->  Installing the new version via the package
Installing php70-mbstring-7.0.26_2...
pkg: Missing dependency 'oniguruma'

Failed to install the following 1 package(s): /usr/ports/packages/All/php70-mbstring-7.0.26_2.txz
** Command failed [exit code 70]: /usr/bin/script -qa /tmp/portupgrade20180110-4141-vcp2rf /usr/bin/env UPGRADE_TOOL=portupgrade UPGRADE_PORT=php70-mbstring-7.0.26_2 UPGRADE_PORT_VER=7.0.26_2 /usr/local/sbin/pkg add /usr/ports/packages/All/php70-mbstring-7.0.26_2.txz
--->  Restoring the old version
Installing php70-mbstring-7.0.26_2...
pkg: Missing dependency 'oniguruma6'

Failed to install the following 1 package(s): /var/tmp/portupgrade323dDkuU/php70-mbstring-7.0.26_2.txz
** Command failed [exit code 70]: /usr/local/sbin/pkg add /var/tmp/portupgrade323dDkuU/php70-mbstring-7.0.26_2.txz
--->  Skipping 'converters/php70-mbstring'
** Listing the failed packages (-:ignored / *:skipped / !:failed)
        * converters/php70-mbstring (php70-mbstring-7.0.26_2)
[helmut@BSDHelmut ~]$
Comment 3 Bryan Drewery freebsd_committer 2018-01-24 19:32:33 UTC
What if you add -R?
Comment 4 Helmut Ritter 2018-01-25 13:00:56 UTC
No difference:

[helmut@BSDHelmut ~]$ pkg info -ix oni
oniguruma-6.7.0
py27-monotonic-1.4
[helmut@BSDHelmut ~]$ sudo pkg delete -f oniguruma-6.7.0
Updating database digests format: 100%
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
        oniguruma-6.7.0

Number of packages to be removed: 1

Proceed with deinstalling packages? [y/N]: y
[1/1] Deinstalling oniguruma-6.7.0...
[1/1] Deleting files for oniguruma-6.7.0: 100%
[helmut@BSDHelmut ~]$ sudo portupgrade -FPP php70-mbstring
[Reading data from pkg(8) ... - 302 packages found - done]
[helmut@BSDHelmut ~]$ sudo portupgrade -fPP php70-mbstring
[Reading data from pkg(8) ... - 302 packages found - done]
--->  Checking for the latest package of 'converters/php70-mbstring'
--->  Fetching the package(s) for 'php70-mbstring-7.0.27' (converters/php70-mbstring)
Updating MyRepo repository catalogue...
MyRepo repository is up to date.
All repositories are up to date.
--->  Fetching php70-mbstring-7.0.27
pkg: php70-mbstring-7.0.27: duplicate dependency listing: php70, ignoring
pkg: php70-mbstring-7.0.27: duplicate dependency listing: php70, ignoring
pkg: php70-mbstring-7.0.27: duplicate dependency listing: oniguruma, ignoring
pkg: php70-mbstring-7.0.26_1: duplicate dependency listing: php70, ignoring
pkg: php70-mbstring-7.0.26_1: duplicate dependency listing: php70, ignoring
pkg: php70-mbstring-7.0.26_2: duplicate dependency listing: php70, ignoring
pkg: php70-mbstring-7.0.26_2: duplicate dependency listing: php70, ignoring
pkg: php70-mbstring-7.0.26_2: duplicate dependency listing: oniguruma, ignoring
pkg: php70-mbstring-7.0.27: duplicate dependency listing: php70, ignoring
pkg: php70-mbstring-7.0.27: duplicate dependency listing: php70, ignoring
pkg: php70-mbstring-7.0.27: duplicate dependency listing: oniguruma, ignoring
The following packages will be fetched:

New packages to be FETCHED:
        php70-mbstring-7.0.27 (715 KiB: 100.00% of the 715 KiB to download)

Number of packages to be fetched: 1

715 KiB to be downloaded.
Fetching php70-mbstring-7.0.27.txz: 100%  715 KiB 732.7kB/s    00:01
--->  Downloaded as php70-mbstring-7.0.27.txz
--->  Identifying the package /var/tmp/portupgradeD7GvdsZG/All/php70-mbstring-7.0.27.txz
--->  Saved as /usr/ports/packages/All/php70-mbstring-7.0.27.txz
--->  Found a package of 'converters/php70-mbstring': /usr/ports/packages/All/php70-mbstring-7.0.27.txz (php70-mbstring-7.0.27)
--->  Located a package version 7.0.27 (/usr/ports/packages/All/php70-mbstring-7.0.27.txz)
--->  Reinstalling 'php70-mbstring-7.0.27' (converters/php70-mbstring) using a package
--->  Backing up the old version
--->  Uninstalling the old version
[Reading data from pkg(8) ... - 302 packages found - done]
--->  Deinstalling 'php70-mbstring-7.0.27'
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
        php70-mbstring-7.0.27

Number of packages to be removed: 1

The operation will free 3 MiB.
[1/1] Deinstalling php70-mbstring-7.0.27...
[1/1] Deleting files for php70-mbstring-7.0.27: 100%
[Reading data from pkg(8) ... - 301 packages found - done]
--->  Installing the new version via the package
Installing php70-mbstring-7.0.27...
pkg: Missing dependency 'oniguruma'

Failed to install the following 1 package(s): /usr/ports/packages/All/php70-mbstring-7.0.27.txz
** Command failed [exit code 70]: /usr/bin/script -qa /tmp/portupgrade20180125-10842-xcl3dl /usr/bin/env UPGRADE_TOOL=portupgrade UPGRADE_PORT=php70-mbstring-7.0.27 UPGRADE_PORT_VER=7.0.27 /usr/local/sbin/pkg add /usr/ports/packages/All/php70-mbstring-7.0.27.txz
--->  Restoring the old version
Installing php70-mbstring-7.0.27...
pkg: Missing dependency 'oniguruma'

Failed to install the following 1 package(s): /var/tmp/portupgradekPLsEFJV/php70-mbstring-7.0.27.txz
** Command failed [exit code 70]: /usr/local/sbin/pkg add /var/tmp/portupgradekPLsEFJV/php70-mbstring-7.0.27.txz
--->  Skipping 'converters/php70-mbstring'
** Listing the failed packages (-:ignored / *:skipped / !:failed)
        * converters/php70-mbstring (php70-mbstring-7.0.27)
[helmut@BSDHelmut ~]$ sudo portupgrade -fRPP php70-mbstring
[Reading data from pkg(8) ... - 301 packages found - done]
[Exclude up-to-date packages  done]
[helmut@BSDHelmut ~]$ sudo portupgrade -fNRPP php70-mbstring
[Reading data from pkg(8) ... - 301 packages found - done]
--->  Checking for the latest package of 'converters/php70-mbstring'
--->  Found a package of 'converters/php70-mbstring': /usr/ports/packages/All/php70-mbstring-7.0.27.txz (php70-mbstring-7.0.27)
--->  Installing 'php70-mbstring-7.0.27' from a package
--->  Installing the new version via the package
Installing php70-mbstring-7.0.27...
pkg: Missing dependency 'oniguruma'

Failed to install the following 1 package(s): /usr/ports/packages/All/php70-mbstring-7.0.27.txz
** Command failed [exit code 70]: /usr/bin/script -qa /tmp/portupgrade20180125-12886-m4xki8 /usr/bin/env UPGRADE_TOOL=portupgrade UPGRADE_PORT=php70-mbstring-7.0.27 UPGRADE_PORT_VER=7.0.27 /usr/local/sbin/pkg add /usr/ports/packages/All/php70-mbstring-7.0.27.txz
** Fix the package's problem and try again.
** Listing the failed packages (-:ignored / *:skipped / !:failed)
        ! converters/php70-mbstring     (pkg_add failed)
[helmut@BSDHelmut ~]$

I still need to install the dependency first:

[helmut@BSDHelmut ~]$ sudo portupgrade -fNPP oniguruma
[Reading data from pkg(8) ... - 301 packages found - done]
--->  Checking for the latest package of 'devel/oniguruma'
--->  Found a package of 'devel/oniguruma': /usr/ports/packages/All/oniguruma-6.7.0.txz (oniguruma-6.7.0)
--->  Installing 'oniguruma-6.7.0' from a package
--->  Installing the new version via the package
Installing oniguruma-6.7.0...
Extracting oniguruma-6.7.0: 100%
[helmut@BSDHelmut ~]$ sudo portupgrade -fNPP php70-mbstring
[Reading data from pkg(8) ... - 302 packages found - done]
--->  Checking for the latest package of 'converters/php70-mbstring'
--->  Found a package of 'converters/php70-mbstring': /usr/ports/packages/All/php70-mbstring-7.0.27.txz (php70-mbstring-7.0.27)
--->  Installing 'php70-mbstring-7.0.27' from a package
--->  Installing the new version via the package
Installing php70-mbstring-7.0.27...
Extracting php70-mbstring-7.0.27: 100%
[helmut@BSDHelmut ~]$