From owner-freebsd-ports@freebsd.org Tue Nov 6 13:11:01 2018 Return-Path: Delivered-To: freebsd-ports@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 3A5FA11234F0 for ; Tue, 6 Nov 2018 13:11:01 +0000 (UTC) (envelope-from adamw@adamw.org) Received: from mail-yw1-xc34.google.com (mail-yw1-xc34.google.com [IPv6:2607:f8b0:4864:20::c34]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2DFF475E79 for ; Tue, 6 Nov 2018 13:11:00 +0000 (UTC) (envelope-from adamw@adamw.org) Received: by mail-yw1-xc34.google.com with SMTP id c126-v6so5089353ywd.8 for ; Tue, 06 Nov 2018 05:11:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adamw-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=H/HfZdUDo12DZKX0LVQh2y4DuBYaVdIC4orCee28buY=; b=GBx4W+hsP6JCX4UuMuUAp+cKHgWd7wHnn9dR7cwHjjFutaRmGyos8XQ1dxObEVsPv6 SyLZ1/4mNDAq8E8QwYKG2rrXhv0vAfxsXRyAzHQh+UeylKwhdw0CqXBG6v3AlMsk7blk 2oSI4Sw2YsZkBaQjzPFRw4Mf3iAbCpOH6HvDvA25PeLep3Ulg/ZHipltyxOF1QxzXy/V YjbDX6uPxk85zZCm16nagLPY2xp+bxvBdoDtbbE/1x528vy8VZ2p55EmFo4cGVvSH8yc uiLtO9yAEqGrao0yBxzsNS/fA8htJhmjEc155DF8mvq+pAA5OFwrsU1hAV4evXWXKQYV Kysw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=H/HfZdUDo12DZKX0LVQh2y4DuBYaVdIC4orCee28buY=; b=fQ393W6e6PvrOzk4pW0L75jMS/DkzLmzHhMIgHF4jrblAwZ81mZvw0Bj0enqeNBFBA oBVnVoufAlO810IVKtltj18BBj2/KXyy6kBu6xAmBKOXuwlsqPHiEc73aBg/jCzgnv+i n64c1nOpx7GcMdC3GIOO5rvOi/LCmKFZMgW3lPvULPQpGJ3CILuctGpeaHA4aLY639pg GNVQEQ4ZmuwfNNCvVik8yBwFzlDIUjxrSmBffyhAOFJKFHBfTKozzYkAu/YMFmhHooLS JUpTbX9uTwSUl7YfMFs5bujIFmxwCT5xxvFj6FAqgWEu+7XWvZ31vcf4N8lD6cfH+iO3 HsoA== X-Gm-Message-State: AGRZ1gK7OlJqCjHdUf4r0kUJzr/Uth3NUliwMC3Z5Mvukf6GPNdD2cLT WsFwWC3/o+wTVIbsDzB+a4xNMX5Wp1QhdaJXMrzJvy83 X-Google-Smtp-Source: AJdET5eia411pDvPp6C3w/tqztr5F7W7CWNYix7d8zNkkttYTjgBgI7xui2oXGuLNRxwLbMHPgvZ7eqgEPW005EqECo= X-Received: by 2002:a81:4f54:: with SMTP id d81-v6mr25222949ywb.451.1541509858981; Tue, 06 Nov 2018 05:10:58 -0800 (PST) MIME-Version: 1.0 References: <1ec31adb-5916-45de-dd9f-ee6be5a97a44@omnilan.de> <61d03ae6-4e88-291e-d68f-bfa35ec33b01@omnilan.de> In-Reply-To: <61d03ae6-4e88-291e-d68f-bfa35ec33b01@omnilan.de> From: Adam Weinberger Date: Tue, 6 Nov 2018 06:10:42 -0700 Message-ID: Subject: Re: Intention of the clean target vs clean-depends To: freebsd@omnilan.de Cc: freebsd-ports@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 2DFF475E79 X-Spamd-Result: default: False [-3.69 / 200.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.96)[-0.964,0]; R_DKIM_ALLOW(-0.20)[adamw-org.20150623.gappssmtp.com]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; NEURAL_HAM_LONG(-0.98)[-0.979,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-ports@freebsd.org]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[adamw.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[adamw-org.20150623.gappssmtp.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[4.3.c.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; MX_GOOD(-0.01)[alt1.aspmx.l.google.com,alt4.aspmx.l.google.com,alt3.aspmx.l.google.com,alt2.aspmx.l.google.com,aspmx.l.google.com]; NEURAL_HAM_SHORT(-0.67)[-0.673,0]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; IP_SCORE(-0.57)[ipnet: 2607:f8b0::/32(-1.30), asn: 15169(-1.45), country: US(-0.08)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Nov 2018 13:11:01 -0000 On Tue, Nov 6, 2018 at 12:38 AM Harry Schmalzbauer wro= te: > > Am 05.11.2018 um 13:03 schrieb Harry Schmalzbauer: > > Hello, > > > > I'm about to overhaul some scripts and continue wondering why 'make > > clean' removes ${WRKDIR} of all dependencies, although there's the > > clean-depends target. > > The comment in bsd.ports.mk makes me think 'clean' shouldn't delete > > dependencies: > > # clean - Remove ${WRKDIR} and other temporary files > > used for building. > > # clean-depends - Do a "make clean" for all dependencies. > > > > Thanks fpr clarification, > > Hello, > > I'm really interested why it is how it is. > I'd highly appreciate if someone can confirm that the current behaviour > of the clean: target is the intended behaviour. > If so, the clean-depends: can be retired, can it? > I'm ignoring this =E2=80=93 to my understanding =E2=80=93 oddity for more= then a decade, > without ever stumbling over any scenario where the behaviour would have > been self clarifiying. > For now I'm using the clean-wrkdir: target instead of clean:, but since > nobody answered yet, I guess my question is unclear or I'm missing > somthing ultimate obvious, so the question isn't unclear but stupid?!? > > Thanks, > > -harry Hi Harry, It is quite intentional. If a port is half-built, or if it's built with a previous version, running "make install" on it can install the wrong version or potentially error out (especially if any of its deps have changed). It's imperative that all dependencies be in a clean state before building a target. "make clean" provides a single entry-point to put the tree in a clean state. Back before packages actually worked and building from the tree was the norm, getting people to run "make clean" before "make install" was like pulling teeth. Separating clean: from clean-depends: would have been disastrous. So no, it's not a mistake, and it works as intended. I think the problem is the comment. The comment for clean-depends should probably be removed, as it's not expected that end-users will run it, and the comment for clean: could be "Remove ${WRKDIR} and other temporary files used for building from this port and all its dependencies." What do you think? # Adam --=20 Adam Weinberger adamw@adamw.org https://www.adamw.org