Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Dec 2014 13:28:56 +0000
From:      Matthew Seaman <matthew@FreeBSD.org>
To:        freebsd-pkg@freebsd.org
Subject:   Re: Bad upgrade behaviour with 1.4.0
Message-ID:  <548D9098.2050002@FreeBSD.org>
In-Reply-To: <548D2BA7.2090203@bluerosetech.com>
References:  <548D2BA7.2090203@bluerosetech.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--25Bga3HIdHfjrw1RkMNQwnigIcG3VVaX3
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On 14/12/2014 06:18, Darren Pilgrim wrote:
> # pkg upgrade php5-pgsql
> Updating FreeBSD repository catalogue...
> FreeBSD repository is up-to-date.
> All repositories are up-to-date.
>=20
> nginx-1.6.2_1,2 is locked and may not be modified
>=20
> openssh-portable-6.7.p1,1 is locked and may not be modified
>=20
> dovecot2-2.2.15_1 is locked and may not be modified
>=20
> dovecot-pigeonhole-0.4.6 is locked and may not be modified
>=20
> postfix-2.11.3_3,1 is locked and may not be modified
>=20
> postgresql92-server-9.2.9_1 is locked and may not be modified
> Checking integrity... done (1 conflicting)
> Checking integrity... done (0 conflicting)
> The following 7 packages will be affected (of 0 checked):
>=20
> Installed packages to be REMOVED:
>         postgresql92-client-9.2.9_1
>         dovecot2-2.2.15_1
>         dovecot-pigeonhole-0.4.6
>         postfix-2.11.3_3,1
>         postgresql92-server-9.2.9_1
>=20
> New packages to be INSTALLED:
>         postgresql93-client: 9.3.5
>=20
> Installed packages to be REINSTALLED:
>         php5-pgsql-5.4.35 (direct dependency changed)
>=20
> The operation will free 46 MB.
>=20
> Proceed with this action? [y/N]: n
>=20
> The reasoning here is fairly obvious: it's going to replace the
> postgresql client with a new version, and you can't have more than one
> version of the client installed, so it needs to delete
> postgresql92-client.  I guess the public repo bumped the postgresql
> version used.
>=20
> I keep dovecot2, postfix and several other ports locked because I build=

> them from ports due to needing non-default options.  In prior versions
> of pkg, this worked fine: pkg would complain about the lock, but an
> upgrade would carry on ignoring the locked ports.
>=20
> But pkg 1.4.0 doesn't.  It ignores the lock and tries to delete those
> package anyway, making the upgrade process fail outright.
>=20
> If I unlock everything, I still get broken behaviour:
>=20
> # pkg upgrade php5-pgsql
> Updating FreeBSD repository catalogue...
> FreeBSD repository is up-to-date.
> All repositories are up-to-date.
> Checking integrity... done (1 conflicting)
> Checking integrity...pkg: cannot load files from dovecot2 to check
> integrity
>  done (0 conflicting)
> The following 6 packages will be affected (of 0 checked):
>=20
> Installed packages to be REMOVED:
>         postgresql92-client-9.2.9_1
>         postfix-2.11.3_3,1
>         postgresql92-server-9.2.9_1
>=20
> New packages to be INSTALLED:
>         postgresql93-client: 9.3.5
>=20
> Installed packages to be REINSTALLED:
>         php5-pgsql-5.4.35 (direct dependency changed)
>         dovecot2-2.2.15_1 (options changed)
>=20
> The operation will free 29 MB.
> 3 MB to be downloaded.
>=20
> Proceed with this action? [y/N]:
>=20
> Here it wants to upgrade dovecot, but not postfix, which is really biza=
rre.
>=20
> There's nothing in UPDATING about this.
>=20
> How do I upgrade php5-pgsql and the postgresql client?

The default postgresql client in the public repositories is postgresql92
-- any reference to postgresql93 must be due to locally compiled packages=
=2E

Yes, this is buggy behaviour by pkg(8) -- it works very well when all
your packages come from a single repository, but can have problems if
you configure multiple repositories or (apparently) mix locally compiled
ports and the main FreeBSD repositories.

Assuming that you want Postgresql 92 rather than 93, then you can:

     # pkg fetch  php5-pgsql
     # pkg add /var/cache/pkg/php5-pgsql-5.4.35.txz

(Note this will also install any dependencies it needs if the files are
present in /var/cache/pkg)

If you want to use postgresql93-client then you're going to have to
build your own packages of anything that has a direct dependency on
postgresql client.  That generally equates to anything that includes
binaries linked against libpq.so.X.Y.Z, which here would include
php5-pgsql and also postfix and dovecot given you've selected the
options that enable that.  Nowadays you can 'make package' and then 'pkg
add' the result, but you'ld have to sort out the dependencies manually.
 Instead, I'd recommend setting up your own poudriere instance to build
your locally customized ports: it is really much the easiest and
cleanest approach even if you've only got one machine to maintain.

Note bug #1094 (https://github.com/freebsd/pkg/issues/1094) with
multiple repositories though -- this will occur even if everything is up
to date. (In which case, just press 'N' when pkg upgrade asks if you
want to proceed.)  Despite this, pkg-1.4.0 does contain some useful
fixes for multirepo usage, including restoring the priority ordering of
repositories based on the ordering of /usr/local/etc/pkg/repos/*.conf

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey



--25Bga3HIdHfjrw1RkMNQwnigIcG3VVaX3
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.20 (Darwin)

iQJ8BAEBCgBmBQJUjZChXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NTNBNjhCOTEzQTRFNkNGM0UxRTEzMjZC
QjIzQUY1MThFMUE0MDEzAAoJELsjr1GOGkATPyYP/14sJxpTUWSy8l3hS8l0T+nj
JK1TLDRXmATku8PUIJNqzB4+9Rr50WXaUWlEX/xMWIJ0K5DN96H9TPLQ8Snh8jPt
c7nHiD78xy8eXHIEFjTM/ULZyjH3bz4/ABx58GI1mlIs94+Re9TIqW8H8G6e0RnJ
LBnmQ0acfRv0qEXC8BYcd8TR4vfE4TajnLXCH1WQ/V0G0ccl7PoPzLe72WyVQ3XF
WiRYqD5J9H7rOdpf5LmACfKxiHkj1Pp/at+nkwUipWn0D9X4bsMc1QOffOtoFYR+
Jpncae639vYWyZIJZjWq1mgZWuvUxtlAsPNy50wNYsIF/n0MSDBvt4mWBIAwf+ZU
rYAznjVnkH7I5zRY/MmxMcaDjrJSzPwvECeBxtYPj+DWJspgF7n5KFw9ZW1qwPU0
BAAq58zHHohIP2+ylreUzabzasVyBrxk1IWo09Yc4z77s7aw3A6xHJfKMYJIHxIK
XWZYOmB0yJN88UmnWYpwek7imTdc0i7gVczaO6Yh5p+QFlzjmy9RIS0Qp7loSNyV
r5uzfj87byrwUa195JNH1e3owRdIYJnQ6uWj8Nj6Hw0IMVHgUeqRbk9wqgZGpcmL
sXLpQkAWYJ/i60769kaDvXcWGDCqpLlITnTcpcK2Qshq2TN5NAyaO43or4/ooWWo
nLOW5VOTb/yz1Zhnyh0g
=Gaqh
-----END PGP SIGNATURE-----

--25Bga3HIdHfjrw1RkMNQwnigIcG3VVaX3--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?548D9098.2050002>