Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Dec 2017 14:47:02 +1100
From:      Aristedes Maniatis <ari@ish.com.au>
To:        Mel Pilgrim <list_freebsd@bluerosetech.com>,  freebsd-pkg@freebsd.org
Cc:        matthew@freebsd.org
Subject:   Re: How to upgrade php or python
Message-ID:  <etPan.5a28b9b6.17a76fd2.8082@ish.com.au>
In-Reply-To: <fdc460f5-50ed-0732-d7aa-2f237c340690@bluerosetech.com>
References:  <etPan.5a2781a5.1e226b1b.8082@ish.com.au> <fdc460f5-50ed-0732-d7aa-2f237c340690@bluerosetech.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Matthew wrote:


> Assuming you have built your own pkg repository with poudriere and set
> the default php version to whatever you want, then a simple 'pkg
> upgrade' will do the trick. =C2=A0This pretty much works for changing t=
he
> default version of php as well as just patch-level updates.

> The trick with pkg(8) is not to try and upgrade things piecemeal -- it
> is much more complicated than it at first appears, and the likelyhood i=
s
> you will end up with inconsistencies and even software failures. =C2=A0=
It's
> pkg(8)'s entire reason for existence to sort out all of this sort of
> dependency relationships, and at the moment it does that best when it's=

> allowed to consider all of the packages you have installed.

Although I understand the words you=E2=80=99ve written, that doesn=E2=80=99=
t match up with the reality of my actual server management or of how pkgn=
g is designed:


=3D=3D=3D Reality

=46or real servers, you may need to patch PHP for a security issue but no=
t want to upgrade java. That=E2=80=99s just the reality of server managem=
ent. I might want to upgrade vim but not apache24.


=3D=3D=3D pkgng

Thankfully pkg already has a feature for that.=C2=A0

=C2=A0 =C2=A0pkg upgrade vim


That=E2=80=99s a real thing which you are now telling me is catastrophica=
lly =5B1=5D broken and should not be used.

Even worse, there is a feature

=C2=A0 =C2=A0pkg upgrade -g php71-*


which is broken twice over. =46irst you are telling me it should never be=
 used. Secondly, it doesn=E2=80=99t behave the way it is documented since=
 it installs ALL php71 packages even if you hadn=E2=80=99t previously ins=
talled them. So it ignores the =E2=80=9Cupgrade=E2=80=9D command and inst=
ead behaves like =E2=80=9Cinstall=E2=80=9D.



=3D=3D=3D What should happen

pkg already is able to consider all the packages I=E2=80=99ve installed. =
It has a database in which that list is stored and it should understand d=
ependencies. In fact it does that just fine. When I run

=C2=A0 =C2=A0pkg upgrade vim

it detects that a dependency also needs upgrading and sorts that out for =
me. Lovely. Thanks pkg.


If =22pkg upgrade -g=E2=80=9D worked as documented, then we=E2=80=99d als=
o be happy. That=E2=80=99s identical to =22pkg upgrade php71 php71-sessio=
n php71-mysqli php71-ctype=E2=80=9D, just a convenient way to not have to=
 type what might be 20 packages.



So Matthew, I=E2=80=99m not having a go at you (and I=E2=80=99m thankful =
for the work you do), but to say I=E2=80=99m doing it wrong is perhaps mi=
ssing the point. pkgng has a bug and I=E2=80=99m looking for workarounds.=
 If I cannot patch security vulnerabilities in PHP without restarting all=
 my java applications, then security issues will not be patches as often.=
 And that=E2=80=99s bad.

I like that pkg=E2=80=99s entire reason for existing is to work out depen=
dencies, but if you are saying I=E2=80=99m not allowed to use pkg for tha=
t purpose and I=E2=80=99m only supposed to upgrade everything to the late=
st version of everything, then there is a problem.


Please cc me, since I=E2=80=99m not on the list.

Cheers
Ari





=5B1=5D =22inconsistencies and even software failures=E2=80=9D which coul=
d result in loss of service


-- =20
--------------------------> =20
Aristedes Maniatis =20
CEO, ish =20
https://www.ish.com.au =20
GPG fingerprint CB=46B 84B4 738D 4E87 5E5C 5E=46A E=466A 7D2E 3E49 102A



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?etPan.5a28b9b6.17a76fd2.8082>