Date: Thu, 3 Oct 2013 10:30:27 -0500 From: Bryan Drewery <bryan@shatow.net> To: "bw.mail.lists" <bw.mail.lists@gmail.com> Cc: freebsd-pkg@freebsd.org Subject: Re: pkgng install/upgrade and puppet or similar Message-ID: <20131003153027.GA98118@admin.xzibition.com> In-Reply-To: <524D3525.4000201@gmail.com> References: <524D3525.4000201@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--ZGiS0Q5IWpPtfppv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 03, 2013 at 11:13:09AM +0200, bw.mail.lists wrote: > The fact that pkg first upgrades itself then exits successfully when=20 > trying to install a package is unexpected behavior and can trip quite a= =20 > few things. >=20 > Case in point. >=20 > I have a manifest that installs postfix, stops sendmail, then installs=20 > mailer.conf and main.cf in /usr/local/etc/postfix. Quite standard stuff.= =20 > However, if there is an upgrade to pkg what will happen is puppet will=20 > run 'pkg install -y postfix' which will in fact upgrade pkg and exit=20 > successfully, while postfix is not actually installed. Next the manifest= =20 > will stop sendmail and change mailer.conf to point to postfix, because=20 > it thinks it was installed successfully, then try to install main.cf in= =20 > a nonexistent directory, which fails. This leaves the system with no MTA= =20 > running, since sendmail was stopped but postfix was not installed.=20 > Obviously not good, even if postfix will (probably!) get installed the=20 > next time puppet runs. >=20 > I see two obvious choices, either > - exit with an error if pkg didn't execute what was actually requested,= =20 > because I asked for postfix to be installed, not pkg to be upgraded > or > - let pkg upgrade itself then execute what was actually requested and=20 This one is coming in 1.2.0. pkg will re-execute the original command after upgrade now. > return the error code of the second operation, assuming it got to it. If= =20 > pkg insists on upgrading itself IMHO this would be the better way. >=20 > I hope I didn't miss it, but I didn't see any argument that can be=20 > passed to pkg to make it ignore the upgrade in the man page. > _______________________________________________ > freebsd-pkg@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-pkg > To unsubscribe, send any mail to "freebsd-pkg-unsubscribe@freebsd.org" --ZGiS0Q5IWpPtfppv Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQJ8BAEBCgBmBQJSTY2RXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQzNkZFQkU5OTJGNTI4MERGNDgxMTM2MkE2 RTc4MkFDMDNDOUIwQ0Y5AAoJEG54KsA8mwz5cBEP/04I4XKC9qhvwP/OVIbT2V5Q M3Emcn/Q97Je+uBachWIxb8Qb876rGoZYD1e69ZeBYgVz0TMps2G5GUX5+7QDmI9 zuelxxLvCznJ3AlTvWlQIa3D9S1uX/ppqdPUog6JXyThOMoVhkU1UzSAvwo6P4oB 8pu1BgeF91i0BNQ7AT/moPaIxBKINnfQVLF32fSF0y09M6qUiLS7WI9AGn2V+x05 0H2bnbBsSoBDPkNcsMMjdG3lPSoUd3gbMARjaBZUQuhorC6Ncg8hM9pr2slbCBaX Rwon0qv8ta9B4ODy7iTka/t+p5YwIWpI2xEeCbO895YYey3y+sdKYgESQUqvnUDk RdfkXaeOeqdwT2rWltvrLZGLUNiapx5gzvWhqCwktzeFMh0HMfqKORp1svvUVIke 3MvT0jH1owqt2dHoFI/tfIe0CKOCT9n2Vnswc0YNRSkQn+Xa4IPz/d7d1vPrH2b5 cEB9hDxuqxwpWctK4ctbdPkzOilSCTkGjeNDK3RgSbeCgfotHzjXCxuzCwqQauok JcoxrR0xXAaEQC7PsJ1uspS+h+Q+vASfYdqbYulC+GaCFWIZnzoEddgafpZCilJH I3qM52wcRdZiWJm4NiIBCkaUuCWFG4/JJODv6SGhc+wDSZk261gGh0EpQyDrq6lr 6gP/hVQOC30LM2K/ZMgC =0cwz -----END PGP SIGNATURE----- --ZGiS0Q5IWpPtfppv--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131003153027.GA98118>