From owner-freebsd-questions@freebsd.org Mon Sep 9 20:27:10 2019 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 32F47DFD23 for ; Mon, 9 Sep 2019 20:27:10 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46S07x2QG0z4bL1 for ; Mon, 9 Sep 2019 20:27:08 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([188.102.101.54]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPA (Nemesis) id 1MPGmZ-1hmqzn0huX-00PfZF; Mon, 09 Sep 2019 22:26:50 +0200 Date: Mon, 9 Sep 2019 22:26:47 +0200 From: Polytropon To: "@lbutlr" Cc: freebsd-questions@freebsd.org Subject: Re: pkg lock Message-Id: <20190909222647.6fbf2378.freebsd@edvax.de> In-Reply-To: <7C016F5C-FEA9-4EF0-9F5C-D0838A6CD2FF@kreme.com> References: <7C016F5C-FEA9-4EF0-9F5C-D0838A6CD2FF@kreme.com> 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:nichr3Oi8rARboINvdy9ji/EKK+JcuNqazhttd1+oLkcBq9sIxQ x5Lcvth0APE5JBZ8hEVOUQzmbI6IVXFi4dqvMFito27EsjMXlrrBBPk9HpHqousEmOd8lvQ x99yfZCUgMOaS2G+LPPoFP6PEhov7Z+vq1wcJND1RehS46p0TqGXy3nf5RLdkteJVaXk/MX xeZgqfJx982DiV3FRiEqw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:zrfORo4cAu0=:Zd9um0LNxNhoHhyEvu1owu jJZnWoZ5XrGnBR/HOpoWl7vd9hmlFntnXH4HKvzGk76VDCJiEQgi/RfaqwaAZMwbgqi8SUjYg PPZP9+lGcqa7sZkomFehcmoJGQGjouCJmYUDGQoUjRkKRoe+d0F1rYS2l2nPELYnu6yqiTLu6 3ybl4n3Uc8pC9ZN7RkXwuSAo40vOm3DchZfVXgHR4y9IfFG0j/8Q6XGrqWo/2jkXy+ly3D0kU 1hr3IDMmcpibZUBm5sVSMxdUbiAPUVuRWswNtwl3MlfuAYlM/hSpwGgphCIADAVHdiBs6cQWX ofQPq18pBFEKMzqpWDKIUJpuhJQ/uctczTNZTJLailpPtQEyy3aR75jQQXAHhJwzxwEBb8i8c swFMBqCX+Ac1fqbcmDcWRDfGos7vIry36qlDiw+JxyhC4VqYUXEti1VY+0AZa57R2OUoqAtlD hjEXWpHj2PrgA2tAD7C6HagQySd3JzHwRg8l5O63E+F1FeFQ3npcEddz68Q9eeH1lVDGVazcw 2I8TQJz1PkEAJG9KapoPr2fBKK/MmmIXK5r+D8Vo39bFCZciQ6ESdR3ODvaauaDCuAdwRt8O6 OmiHVnQ/70193TNhvPqUNOyBdMX/ynnmEg0ZkiLeg+T7Lf6Ehr7MaD5C2BFjlCo9r/grGsc2U gW0UXvzntmqwFCD7rytItBimL6n74x0a/NtmoWEBzaYzWaHlkhng4cJe38t2p+kKdV4WQt4nz SNLilgcjkdfuh8Ee83txFQUDrnZ/rpFPUwd23DHQqiFaplMQE2XTb3/oHwHzRUH0pl0fR7Tk2 xvpb7aZv9Zj43G0SjLn0JgUVE9xxD1uEB73x0VQX7Lh/d8+e7s= X-Rspamd-Queue-Id: 46S07x2QG0z4bL1 X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@edvax.de has no SPF policy when checking 217.72.192.74) smtp.mailfrom=freebsd@edvax.de X-Spamd-Result: default: False [3.80 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[freebsd@edvax.de]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; HAS_ORG_HEADER(0.00)[]; RWL_MAILSPIKE_EXCELLENT(0.00)[74.192.72.217.rep.mailspike.net : 127.0.0.20]; RCPT_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:8560, ipnet:217.72.192.0/20, country:DE]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[edvax.de]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.10)[0.100,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.99)[0.986,0]; RCVD_IN_DNSWL_NONE(0.00)[74.192.72.217.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.31)[ip: (-0.80), ipnet: 217.72.192.0/20(0.22), asn: 8560(2.16), 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: Mon, 09 Sep 2019 20:27:10 -0000 On Mon, 9 Sep 2019 09:21:13 -0600, @lbutlr wrote: > If I want to prevent pkg update from overwriting a package I built > from ports, I need to issue a pkg lock first, then if I want > to rebuild it with postmaster I pkg unlock , rebuild/update > the port, and then lock the port again, yes? That is the correct order. It also applies if you use pkg to update your software. Rule: "lock around update step". :-) > And there is no one-step way to say via flags or something, unlock, > rebuild, then lock at once? Not that I'm aware of. I (ab)use a custom Makefile for this task: 1. lock the custom ports 2. perform a pkg upgrade (typically uses monthly repository) 3. obtain current ports tree 4. unlock the custom ports 5. run "make deinstall" and "make reinstall" for custom ports 6. hope that everything went well ;-) This is on systems that have few (!) ports with custom options, and use pkg-based installing and updating (binary packages, no ports built for "normal" things). > Also, is there anyway to tell what has been installed via ports and > what has been installed via pkg? Or better, what has been installed > with custom options that differ from the pkg versions? Technically not, because if you install something using portmaster or plain "make install", what happens is that a "pkg-kind of package" is built, and _this_ package then is installed. So to pkg, it's just another package. However, you could compare the options used to build a specific port (standard values) and compare them to the options you used to build it (custom values). As far as I know, this task is not automated. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...