Date: Tue, 29 Jul 2014 23:45:46 +0200 From: Baptiste Daroussin <bapt@FreeBSD.org> To: Gyrd Thane Lange <gyrd-se@thanelange.no> Cc: bdrewery@FreeBSD.org, Andrea Venturoli <ml@netfence.it>, freebsd-ports@freebsd.org, portmgr@FreeBSD.org Subject: Re: Strange pkg_deinstall behaviour with pkgng Message-ID: <20140729214546.GA37672@ivaldir.etoilebsd.net> In-Reply-To: <20140729232310.75487900@onyx.thanelange.no> References: <53D69662.6020503@netfence.it> <53D7C1E0.1000204@netfence.it> <20140729184118.GG68875@ivaldir.etoilebsd.net> <20140729232310.75487900@onyx.thanelange.no>
next in thread | previous in thread | raw e-mail | index | archive | help
--bg08WKrSYDhXBjb5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 29, 2014 at 11:23:10PM +0200, Gyrd Thane Lange wrote: > On Tue, 29 Jul 2014 20:41:18 +0200 > Baptiste Daroussin <bapt@FreeBSD.org> wrote: >=20 > > On Tue, Jul 29, 2014 at 05:46:40PM +0200, Andrea Venturoli wrote: > > > On 07/28/14 20:28, Andrea Venturoli wrote: > > > > Hello. > > > > > > > > I was forced to switch to pkgng on a 9.2 box and I'm now noticing > > > > a strange behaviour. > > > > > > > > Before, "pkg_deinstall -R foo" would deinstall foo and all ports > > > > on which foo depended, except those who were needed by other > > > > ports. > > > > > > > > Now, "pkg_deinstall -R foo" will deinstall foo, all ports on > > > > which foo depends and all ports depending on the ports on which > > > > foo depends. > > > > > > > > E.g. > > > > Port A depends on B > > > > Port B depends on C > > > > Port D depends on C > > > > > > > > With the old behaviour, "pkg_deinstall -R A" would deinstall A > > > > and B (but not C). > > > > Now it will deinstall A, B, C and D. > > >=20 > > > After some investigation, this broke after the upgrade to pkg 1.3, > > > in which *by default* "pkg delete" seems to be the same as "pkg > > > delete -R". > > >=20 > > > From what I can tell, there is no flags to "pkg delete" which > > > makes it act as it used to and as portupgrade expects, so I cannot > > > easily fix it. > > >=20 > > pkg delete -f is not recursive >=20 > This is true, but is very hard to guess based on the pkg-delete(8) man > page. My first reading of the options led me to believe that -f was > an alias for -y and that it would forcefully and recursively delete > without asking. This could certainly be better worded in the man page. > -f should explicitly state that it is non-recursive (now that -R is > implicit and there is no other option to turn it off) and that a > confirmation is still required, either interactively or through the -y > option. It was with trepidation that I first used the -f option. >=20 > Also, since the -R option now does nothing, it should either be removed > or complemented with an -r option (for non-recursive) >=20 > BTW, pkg info use -d for showing dependencies instead of -R (used by > pkg_info), so the options are different from pkg_tools. Also the > options are not consistently named across the pkg commands.=20 >=20 > General gripe about pkg(8): The command structure and options are very > similar to the previous pkg_tools but with enough changes in options > and behaviour that it trips up an unwary user. I feel this is a POLA > violation. It is almost like it is baiting the user into making a > mistake. Is is similar enough to the old tools that the user think it is > sufficient to just replace the hyphen with a space (as in pkg-delete and > pkg delete) but sometimes with subtle changes in options or behaviour, > most of them with no clear rationale for the change. >=20 > I suppose that the superficial likeness was to make it more familiar > for existing users of pkg_tools, but since it is not 100% compatible > (would be better if it was) it would perhaps have been better to make a > clean break to remove preconceptions about operations. >=20 making a clean break would have made the tool completly rejected, the fact = we were quite closed did the trick to help the project moving to pkg. regards, Bapt --bg08WKrSYDhXBjb5 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlPYFgoACgkQ8kTtMUmk6EwwtACfYdzaUo6tOpa1UCtY/74hHE8c MZ0AoJP19J8iteStaaaL1ac11oyJgNhw =p532 -----END PGP SIGNATURE----- --bg08WKrSYDhXBjb5--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140729214546.GA37672>