From owner-freebsd-questions@freebsd.org Wed Dec 12 20:47:29 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B62C21325245 for ; Wed, 12 Dec 2018 20:47:29 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8E6BD80211 for ; Wed, 12 Dec 2018 20:47:28 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([92.193.252.129]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPA (Nemesis) id 1MGA0o-1geqOF3iF2-00GahI; Wed, 12 Dec 2018 21:47:16 +0100 Date: Wed, 12 Dec 2018 21:47:14 +0100 From: Polytropon To: Paul Schmehl Cc: FreeBSD Questions Subject: Re: Forcing port reinstalls without rebuilding over and over again Message-Id: <20181212214714.4017e195.freebsd@edvax.de> In-Reply-To: <296D11C4E1B5870932452073@Pauls-MacBook-Pro.local> References: <47758EF2A172AE3BCA2F6E66@Pauls-MacBook-Pro.local> <1793865D5AEE79C2FC27331F@Pauls-MacBook-Pro.local> <20181212204151.659fb436.freebsd@edvax.de> <296D11C4E1B5870932452073@Pauls-MacBook-Pro.local> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:IcD746vj6qNyd6VFG0v8997Ut7JrSdUHVeKLkIhg13frvI5zxXP Ui3onEOR9S/15E/P/YELd1KodSaaK2IRedNfgy+bF98j7GpzJXIZC0GezsW+2aLw1NFt0qw MeorwtZdNr3V9Jb1XErq2P0IcMLVQoT7zvYx3nJthxYWkS0xltxyRv/qqMeZPuCSNXgbqPw e9MGm3Y7oDqsB5ZMwMzKQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:LPj0QO3DSzU=:tESju52/q9/5qYnT3zMF5i USKy3T55sppQDkKwJs7lSsbrsxYuvNBS/xuPqfvalugGWY0a2QT78SjWTaGoXXyNoixgTD2Fe 02+YsEWtCtNWynQjmE3ysRzmBtEvuY+GA9+bEF9unsPsSKBmd4TIieSMPetHw6k7eP7sLDqH4 XFH5Sf3TQWveSBtgh0iS/OdDiritWVstTkfxV6j0azTnLlRQzL7+JeRvq0xj6t8UxdlTeULmJ +iuSATSkIWT67UPdhhm/B7p74yW4w3YzJ0mLSLz9daOfsJEH7R85a6OtdDqw/yp1fv+cWPuPa 1LVgoFwe5pEWWxEMztcvKrmiw4CcA8V8qr/QcZPD3OtBIWlshAvBMNNOlrtOjKzjdo547EFbT zw54KJKYM5/nDHJ98N2H0OW3hNwj4pFxZUhKMRDuVNknz2Xa8oUf4Mtwbt+kzqwoHEKchqUrd zc9O7GIudeQOZZqZ0ce6wfRwwlPFBxqlV2nSSat1k+NDLnALEs6zGYDReycA0ZKThR52lcWXj afGAP5jQHgSkIuNYKIduQnofRS08oQrZ45JV1qLRSdIZKHGRW8MiE6QVKKw0bZ+2ZiBz3MYYB hFHHnB7d0C2hI3VA8/35tq8qXf1Yj2QZ73e5cAn0EX6eCvcVlB0/3CbtcA9M5TP2dPt7eYj9b eUmHQm/ifWNyrHAFdZsHWJs04/Gk3BpFGLFWJuZYDEU9CeDx3en2fOol3kzek7qI9tBf8jmwk as/7O7XEqt6lHlvsX+bLP2KODXeECdpuSjt/CCVv27MpdM6/C8WHH/Kw65U= X-Rspamd-Queue-Id: 8E6BD80211 X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [2.94 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[freebsd@edvax.de]; MV_CASE(0.50)[]; HAS_ORG_HEADER(0.00)[]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[cached: mx00.schlund.de]; RCPT_COUNT_TWO(0.00)[2]; RECEIVED_SPAMHAUS_PBL(0.00)[129.252.193.92.zen.spamhaus.org : 127.0.0.10]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.05)[0.051,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[edvax.de]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.63)[0.626,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[13.17.227.212.list.dnswl.org : 127.0.5.0]; MID_CONTAINS_FROM(1.00)[]; R_SPF_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE(-0.13)[ipnet: 212.227.0.0/16(-0.54), asn: 8560(-0.09), country: DE(-0.01)] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 20:47:29 -0000 On Wed, 12 Dec 2018 13:55:01 -0600, Paul Schmehl wrote: > --On December 12, 2018 at 8:41:51 PM +0100 Polytropon > wrote: > > > On Wed, 12 Dec 2018 12:52:36 -0600, Paul Schmehl wrote: > >> --On December 12, 2018 at 2:07:35 AM -0600 Paul Schmehl > >> wrote: > >> > >> > Is there a way, using portmaster, to force the rebuild of all ports > >> > without rebuilding the same ports over and over and over again? > >> > > >> > I've noticed that using portmaster -f forces the rebuild of every > >> > dependency. I think I've now rebuild perl and python at least 20 or 30 > >> > times. Once should be enough. I guess if you're going to rebuild > >> > everything, it would be ok to ignore dependencies for ports, since > >> > they're all going to be rebuilt anyway. > >> > > >> > What's the magic potion for that? > >> > >> After reading through the man page, I thought that portmaster -Rfd would > >> do the trick, but it didn't. > >> > >> ISTM that, when you're building every port on a box, you shouldn't need > >> to build all the dependencies for every port, because they're all going > >> to be built anyway. Rebuilding perl (for example) repeatedly, makes no > >> sense at all. It would be nice if there were a > >> --force-with-no-dependencies switch so that every port could be built > >> once and once only. > > > > Maybe I'm thinking into the wrong direction, but how about > > the following thoughts? > > > > The task of building is different from the task of installing. > > If you run each build task separatedly, both depencency trees > > (build dependencies + runtime dependencies) need to be resolved > > from scratch. > > > > For normal usage, and taking your perl example, the following > > situation would be present: > > > > 1. port "foo" requires perl as a build dependency > > > > 2. port "perl" is installed and can then be used > > > > 3. port "foo" is built, using the just installed perl > > > > 4. port "bar" requires perl as a build dependency > > > > 5. port "bar" is build, using the already installed perl > > (and perl is not built again) > > > > It should work the same with runtime dependencies. This thought > > experiment includes the assumtion that the correct _versions_ of > > perl are always the same. ;-) > > It should, but it doesn't seem to. > > I found this near the end of the man page. I believe I'll try this next > time. > > Using portmaster to do a complete reinstallation of all ports: > 1. portmaster --list-origins > ~/installed-port-list > 2. Update the ports tree > 3. portmaster -ty --clean-distfiles > 4. portmaster -Faf > 5. pkg delete -afy > 6. rm -rf /usr/local/lib/compat/pkg > 7. Back up any files in /usr/local you wish to save, > such as configuration files in /usr/local/etc > 8. Manually check /usr/local and /var/db/pkg > to make sure that they are really empty > 9. Install ports-mgmt/pkg and then ports-mgmt/portmaster. > Remove both from ~/installed-port-list. > 10. portmaster --no-confirm `cat ~/installed-port-list` This instruction contains one little thing that _might_ be a problem, or at least a nuisance: Let's say your installation contains a port "foo" which requires the dependency "bar". Step 1 will add "foo" and "bar" to your ports list. After the ports tree update in step 2, a newer version of "foo" is described, and it no longer requires "bar". Step 10 will use the list from step 1, and in addition to "foo" (the program you want to use), it will also install its dependency "bar" (which you have absolutely no interest in). In my opinion, it's a little better to create your own "top ports list" instead of saving the current state (or at least have both lists at hand, but only use your own). In that "top ports list", you list the things you actually want to use, and you do not care about their depencencies, simply because portmaster can resolve them on its own. So first, your list is much more readable (as it will only contain the software you are interested in, and nothing of the software you might need to build or run them), and second, your list will be much more portable and also deal with the "port not needed, but still installed" problem described above. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...