From owner-freebsd-ports@freebsd.org Wed May 3 15:53:56 2017 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5CC24D5C2F8 for ; Wed, 3 May 2017 15:53:56 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [IPv6:2001:8b0:151:1:c4ea:bd49:619b:6cb3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.infracaninophile.co.uk", Issuer "infracaninophile.co.uk" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id DE490C9A for ; Wed, 3 May 2017 15:53:55 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from host-4-75.office.adestra.com (unknown [85.199.232.226]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: m.seaman@infracaninophile.co.uk) by smtp.infracaninophile.co.uk (Postfix) with ESMTPSA id 18CB1566B for ; Wed, 3 May 2017 15:53:50 +0000 (UTC) Authentication-Results: smtp.infracaninophile.co.uk; dmarc=none header.from=infracaninophile.co.uk DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=infracaninophile.co.uk; s=201601-infracaninophile; t=1493826830; bh=S3EjwSDTFM+sXqEv+lxpUxDx187bp3R5+T+ZQwtVMBg=; h=Subject:To:References:From:Date:In-Reply-To; z=Subject:=20Re:=20pkg=20and=20packages|To:=20freebsd-ports@freebsd .org|References:=20=0D =0A=20|From:=20M atthew=20Seaman=20|Date:=20Wed,=2 03=20May=202017=2016:53:41=20+0100|In-Reply-To:=20; b=Vfcq3kzbtehFCRjj1zSOyLMWSqrufjRwPTDQ89aaG2/q4PeWN3VuLhrKZ8CyKCRql rmEobKH6UDEAL58YEE6wQN+K/MJPo6h6mzLQnSvAq7fqDKrnuuYpQZCWcgYUwGwQ0m TBfM5yQQN9PaCAQp6I/pr52t0YeAXZzfX0UHjO7s= Subject: Re: pkg and packages To: freebsd-ports@freebsd.org References: From: Matthew Seaman Message-ID: <2c69cd39-2cd2-3b6d-a2e0-f28a9fda7e05@infracaninophile.co.uk> Date: Wed, 3 May 2017 16:53:41 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="E7Ckpp2dWRum3JKHl0B02G73HmbW8Pgos" X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RDNS_NONE,SPF_FAIL autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on smtp.infracaninophile.co.uk X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 May 2017 15:53:56 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --E7Ckpp2dWRum3JKHl0B02G73HmbW8Pgos Content-Type: multipart/mixed; boundary="dXtRvG7k6OVngbbUjB7egoBSHdeh8ABG7"; protected-headers="v1" From: Matthew Seaman To: freebsd-ports@freebsd.org Message-ID: <2c69cd39-2cd2-3b6d-a2e0-f28a9fda7e05@infracaninophile.co.uk> Subject: Re: pkg and packages References: In-Reply-To: --dXtRvG7k6OVngbbUjB7egoBSHdeh8ABG7 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 2017/05/03 15:53, Chris H wrote: > On Wed, 03 May 2017 08:03:36 -0400 wrote >=20 >> After doing a general pkg upgrade on my server-of-all-work, I >> discovered after some research that the Big Grey Background I was >> left with was due to pkg having deleted, but not replaced, xfce4 >> desktop. This is an annoying effect when it happens unexpectedly. However, I can't see how pkg(8) could behave otherwise. What happens is that if you say: pkg install foo pkg(8) works under the quite reasonable impression that you want foo installed. Now, if foo conflicts with another package you have installed, say 'bar', then pkg(8) will deinstall bar as an essential step towards getting foo installed. In general, this is what you would want to happen. 'Conflicts' here means either that the packages in question each install one or more files of the same name as one from the other package, or that one installs a shared library with an ABI version that matches the other package. The problem from your point of view is that as an intelligent being you see samba44 and samba46 as essentially different versions of the same thing. pkg(8) (all appearances to the contrary) is not at all intelligent, and can only treat the two different samba packages as completely distinct things. What would be great is if we could give a list of alternates as dependencies when creating packages, but unfortunately the packaging system does not have that capability. Yet. >> Trying to install the desktop package, I discovered that it's >> bundled with at least 2 unrelated pieces of software: Thunar, >> and samba44. That bothered me, but I needed the desktop. 'Bundling' isn't the right term -- Thunar and samba44 are /dependencies/ of the xfce4-desktop. That is: other packages that need to be installed before the package in question will work. Sorting out dependency trees like this is much of what pkg(8) exists for. >> pkg got totally confused during the install, first downloading 44 >> and THEN noticing the conflict with 46. So it downloaded 46, >> too(!), deleted the existing 46, installed 44, and then tried to >> re-install 46, failing with a complaint because it had just >> installed 44 and that created a conflict. >> >> But it gets better. Trying to reinstall the samba46 package, I >> discovered that I'd have to sacrifice the desktop that I just >> installed. >> >> Clearly, no good can come of packaging unrelated software >> together, so there needs to be a way to prevent that, or at least >> criticise those who do it. >> >> And pkg should (a) check for later versions *before* downloading >> older ones, (b) preferably not install old versions over newer >> without explicit permission, and (c) as a fallback should allow >> packages to be decomposed at install time such that installation >> is not a yes/no all-or-nothing choice. >=20 > In pkg(8)'s humble defense; it simply *expedites* your request. > It isn't the QA dept. for [port] Maintainers. > Mind you; I *fully* appreciate your position. I'm simply trying to > indicate *where*, or at *whom* to point fingers. :-) Yes, indeed. pkg(8) does have a tendency to do exactly what you tell it, and sometimes that is not what you would intuitively expect. The thing that seems to trip most people up is thinking they can substitute some other package instead of the exact dependency listed in the package metadata. This is not an unreasonable request, especially when you know your alternate package does exactly the same thing as the one you want to replace. Unfortunately it just doesn't work right now, and it would take quite a lot of disruptive change in the ports tree and to pkg(8) itself to make that happen. Cheers, Matthew --dXtRvG7k6OVngbbUjB7egoBSHdeh8ABG7-- --E7Ckpp2dWRum3JKHl0B02G73HmbW8Pgos Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQJ8BAEBCgBmBQJZCf0MXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQxOUYxNTRFQ0JGMTEyRTUwNTQ0RTNGMzAw MDUxM0YxMEUwQTlFNEU3AAoJEABRPxDgqeTnfXQQAKcf+h5aBORgE7nGmh8dNxGJ OuUsk20W4zEgGck453apITwSqRf1hOr1XaBU8q3AqFWSx+tn5RInmOacwNLDAp6N tLFfFwUNZ0iG7luGOhxOkYlWOn8stfaNTLdo/NuQw9BdqUFA0XEGp1J1Fw3ROEtt xYq/ug2t/26fSMrNr/JFVo3WFus17C5BsNVK1rXGEBTxgsv8ZWVmZWvkEL4SIOKp y0+EXoRbqPrEFzZy5cAXYqAqc287Ro9j4WFHD9GRG9QxirzqSDO/24Mfv82enAyq prgkVgBP8kv6Zr1RbDe0RxOc6fvucmq0XbtgZQIIHa0xgd3b0hlayeKUIdu/KQmU 8E3LK8ggNsntS4dQ7ov/jvw7Fp0cTwWOsGxNQ3/KOUZIoIGzA+BLrqG1LUJnCO64 TPdmmZ3b09HNYYat6IHdJkNtt2agbqM+9dgEPoTZLs2OCQc/tnsRtGj6kVXZGrTU fjUYlNKhZ0W5rVySZPKFTbdfiZMFs+XcJz0HFurWzluqOQLRz0CR5F6wsuLFZgY8 4Id8dNt+fdc03wLY5FQsDN6S8ckJWuZ9QKX11hk8wdo/MlHfpMBkB8/IJYc24LMp TF2+DvpqzO0TXi+l5GM06MQC9XCCEROgF32QMy0WrdLwSeEBrSFNKSrUXNI1xg7X UNw/2u5MjvTaZwtkYLQ5 =QxiK -----END PGP SIGNATURE----- --E7Ckpp2dWRum3JKHl0B02G73HmbW8Pgos--