pkg icon indicating copy to clipboard operation
pkg copied to clipboard

pkg upgrade with glob tries to install new packages

Open cstdenis opened this issue 11 years ago • 4 comments

See output below. Trying to upgrade all php packages with "pkg upgrade" using a glob, but it's also trying to install what appears to be ALL packages that start with php5- rather than just the ones already installed.

"pkg help upgrade" says "Moreover, pkg upgrade cannot install new packages" so this should not happen.

It's possible it's just a display bugged caused by the -n, have not tried without the -n because I don't want to risk it making a huge mess installing all that.

root@kagami:/usr/ports/www/nginx # pkg -v
1.3.8

root@kagami:/usr/ports/www/nginx # pkg upgrade -g -n php5-\*
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
The following 152 packages will be affected (of 0 checked):

New packages to be INSTALLED:
    indexinfo: 0.2
    perl5: 5.16.3_11
    db5: 5.3.28_2
    giflib-nox11: 4.2.3_3
    fontconfig: 2.11.0_3,1
    libXpm: 3.5.11_2
    postgresql92-client: 9.2.9
    php5-Ice: 3.5.1_3
    Ice: 3.5.1_3
    mcpp: 2.7.2_2
    php5-arcanist: 20140828
    php5-simplexml: 5.4.33_1
    php5-curl: 5.4.33_1
    curl: 7.38.0_2
    ca_root_nss: 3.17.1
    php5-libphutil: 20140828
    php5-bcmath: 5.4.33_1
    php5-blitz: 0.8.2
    php5-blitz-devel: 0.7.2
    php5-bsdconv: 11.1.0
    bsdconv: 11.1
    php5-bz2: 5.4.33_1
    php5-calendar: 5.4.33_1
    php5-creole: 1.0.2
    php5-dav: 1.2
    neon29: 0.29.6_6
    php5-dba: 5.4.33_1
    php5-dom: 5.4.33_1
    php5-exif: 5.4.33_1
    php5-extensions: 1.7
    php5-xmlwriter: 5.4.33_1
    php5-xmlreader: 5.4.33_1
    php5-posix: 5.4.33_1
    php5-filter: 5.4.33_1
    php5-tokenizer: 5.4.33_1
    php5-sqlite3: 5.4.33_1
    sqlite3: 3.8.6
    php5-pdo_sqlite: 5.4.33_1
    php5-iconv: 5.4.33_1
    php5-phar: 5.4.33_1
    php5-ffmpeg: 0.6.0.20120114
    ffmpeg: 2.3.3,1
    gnutls: 3.2.18
    trousers-tddl: 0.3.10_7
    p11-kit: 0.22.1
    libtasn1: 4.2
    libffi: 3.0.13_2
    nettle: 2.7.1
    gmp: 5.1.3_2
    libidn: 1.29
    xvid: 1.3.2,1
    x264: 0.136.2358_4
    gpac-libgpac: 0.5.0,1
    schroedinger: 1.0.11_2
    orc: 0.4.21
    libvpx: 1.3.0
    libtheora: 1.1.1_6
    libvorbis: 1.3.4_1,3
    libogg: 1.3.2,4
    opencv-core: 2.4.9_1
    libgd: 2.1.0_4,1
    gcc: 4.8.3_2
    mpfr: 3.1.2_2
    mpc: 1.0.2_1
    gcc-ecj: 4.5
    binutils: 2.24_1
    icu: 53.1
    libxslt: 1.1.28_4
    libgcrypt: 1.6.1_5
    libgpg-error: 1.16
    recode: 3.6_12
    boost-libs: 1.55.0_4
    php5-ftp: 5.4.33_1
    php5-geshi: 1.0.8.11
    php5-gettext: 5.4.33_1
    php5-gmp: 5.4.33_1
    php5-imap: 5.4.33_1
    cclient: 2007f_1,1
    php5-interbase: 5.4.33_1
    firebird25-client: 2.5.3
    php5-ldap: 5.4.33_1
    openldap-client: 2.4.40
    php5-msgpack: 2012.05.05
    php5-mssql: 5.4.33_1
    freetds: 0.91.103_1,1
    php5-mysql: 5.4.33_1
    php5-mysqli: 5.4.33_1
    php5-odbc: 5.4.33_1
    unixODBC: 2.3.2_1
    php5-pcntl: 5.4.33_1
    php5-pdo_cassandra: 0.2.1_4
    thrift-cpp: 0.9.1_2,1
    libevent2: 2.0.21_2
    php5-pdo_dblib: 5.4.33_1
    php5-pdo_firebird: 5.4.33_1
    php5-pdo_mysql: 5.4.33_1
    php5-pdo_odbc: 5.4.33_1
    php5-phabricator: 20140828
    git: 2.1.0
    p5-Authen-SASL: 2.16
    p5-GSSAPI: 0.28
    p5-Digest-HMAC: 1.03
    p5-Net-SMTP-SSL: 1.01_2
    p5-IO-Socket-SSL: 1.998
    p5-Mozilla-CA: 20130114
    p5-Net-SSLeay: 1.66
    p5-Socket: 2.015
    p5-IO-Socket-IP: 0.32
    p5-Error: 0.17022
    cvsps: 2.1_1
    p5-MIME-Base64: 3.14
    php5-pinba: 2012.03.20_2
    protobuf: 2.6.0
    php5-propel: 1.1.1
    php5-pspell: 5.4.33_1
    php5-readline: 5.4.33_1
    php5-recode: 5.4.33_1
    php5-redis: 2.2.5
    php5-shmop: 5.4.33_1
    php5-snappy: 0.0.2_1
    snappy: 1.1.1_1
    php5-snmp: 5.4.33_1
    net-snmp: 5.7.2_16
    php5-soap: 5.4.33_1
    php5-sockets: 5.4.33_1
    php5-swfed: 0.62
    php5-sybase_ct: 5.4.33_1
    php5-sysvmsg: 5.4.33_1
    php5-sysvsem: 5.4.33_1
    php5-sysvshm: 5.4.33_1
    php5-tarantool: 20131031
    php5-thrift: 0.9.1
    php5-tidy: 5.4.33_1
    tidy-lib: 090315.c_2
    php5-wddx: 5.4.33_1
    php5-xmlrpc: 5.4.33_1
    php5-xsl: 5.4.33_1
    php5-zip: 5.4.33_1

Installed packages to be UPGRADED:
    php5-openssl: 5.4.27_1 -> 5.4.33_1
    php5-pdo_pgsql: 5.4.7 -> 5.4.33_1
    php5-fileinfo: 5.4.27_1 -> 5.4.33_1
    php5-gd: 5.4.7 -> 5.4.33_1
    php5-mbstring: 5.4.21 -> 5.4.33_1
    php5-mcrypt: 5.4.7 -> 5.4.33_1
    php5-pdo: 5.4.7 -> 5.4.33_1
    php5-session: 5.4.7 -> 5.4.33_1
    php5-zlib: 5.4.7 -> 5.4.33_1
    php5-json: 5.4.7 -> 5.4.33_1
    php5-xml: 5.4.7 -> 5.4.33_1
    php5-ctype: 5.4.7 -> 5.4.33_1
    php5-hash: 5.4.7 -> 5.4.33_1
    php5-pgsql: 5.4.7 -> 5.4.33_1

The process will require 971 MB more space.
176 MB to be downloaded.


root@kagami:/usr/ports/www/nginx # pkg version -v
...
    pgbouncer-1.5.2                    <   needs updating (index has 1.5.4_6)
php-xdebug-2.2.0                   <   needs updating (index has 2.2.5)
php5-5.4.34                        =   up-to-date with index
php5-ctype-5.4.7                   <   needs updating (index has 5.4.34)
php5-fileinfo-5.4.27_1             <   needs updating (index has 5.4.34)
php5-gd-5.4.7                      <   needs updating (index has 5.4.34)
php5-hash-5.4.7                    <   needs updating (index has 5.4.34)
php5-json-5.4.7                    <   needs updating (index has 5.4.34)
php5-mbstring-5.4.21               <   needs updating (index has 5.4.34)
php5-mcrypt-5.4.7                  <   needs updating (index has 5.4.34_1)
php5-openssl-5.4.27_1              <   needs updating (index has 5.4.34)
php5-pdo-5.4.7                     <   needs updating (index has 5.4.34)
php5-pdo_pgsql-5.4.7               <   needs updating (index has 5.4.34)
php5-pgsql-5.4.7                   <   needs updating (index has 5.4.34)
php5-session-5.4.7                 <   needs updating (index has 5.4.34)
php5-xml-5.4.7                     <   needs updating (index has 5.4.34)
php5-zlib-5.4.7                    <   needs updating (index has 5.4.34)
pico-alpine-2.00_1                 <   needs updating (index has 2.11_1)
pkg-1.3.8_3                        =   up-to-date with index
pkgconf-0.8.9                      <   needs updating (index has 0.9.7)
...

cstdenis avatar Oct 24 '14 01:10 cstdenis

Hello, Everyone!

Has just faced the same «surprising» behaviour with:

# pkg --version
1.10.1

It is worth noting that I have used the pkg with the --glob argument.

It would be great to have this fixed.

Best regards, Sergey Brunov.

svbrunov avatar Apr 21 '17 09:04 svbrunov

I can reproduce this problem with 1.10.2.

pkg upgrade -g php71-* will install 21 new php71 packages. But pkg upgrade will show only 8 php71 packages to be upgraded.

My only workaround (if I don't want to upgrade every installed package is to put all 8 on the command line like this:

pkg upgrade php71 php71-ctype php71-curl php71-json php71-mbstring php71-mysqli php71-pdo php71-pdo_mysql

and that works fine. Basically I cannot trust the -g switch in pkg.

ari avatar Nov 27 '17 23:11 ari

Has this ever been solved? I just want to upgrade the installed python + py37 packages with the command: pkg --version 1.15.6 pkg upgrade -g py*

and I got:

Updating FreeBSD repository catalogue... FreeBSD repository is up to date. All repositories are up to date. The following 5898 package(s) will be affected (of 0 checked):

New packages to be INSTALLED: [list of 5898 packages deleted]

nachtbraker avatar Oct 05 '20 14:10 nachtbraker