From owner-freebsd-ports@freebsd.org Mon Dec 4 14:50:59 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 4BE2DDFE67C for ; Mon, 4 Dec 2017 14:50:59 +0000 (UTC) (envelope-from dan@langille.org) Received: from clavin1.langille.org (clavin.langille.org [162.208.116.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "clavin.langille.org", Issuer "BSD Cabal Headquarters" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2E8616AD1B for ; Mon, 4 Dec 2017 14:50:58 +0000 (UTC) (envelope-from dan@langille.org) Received: from (clavin1.int.langille.org (clavin1.int.unixathome.org [10.4.7.7]) (Authenticated sender: hidden) with ESMTPSA id 91782F36 for ; Mon, 4 Dec 2017 14:50:48 +0000 (UTC) From: Dan Langille Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: FreshPorts and FLAVORS Message-Id: Date: Mon, 4 Dec 2017 09:50:46 -0500 To: FreeBSD Ports X-Mailer: Apple Mail (2.3273) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 14:50:59 -0000 I've been reading up on FLAVORS = (https://wiki.freebsd.org/Ports/FlavorsAndSubPackages) and creating a plan for FreshPorts. Since FLAVORS came in, FreshPorts has been reporting false sanity test = failures like this: = https://www.freshports.org/sanity_test_failures.php?message_id=3D201712041= 212.vB4CCwu4059472@repo.freebsd.org e.g. ### devel/py-flake8: NOTE: this particular sanity test is very experimental A port specified in the BUILD_DEPENDS of devel/py-flake8 does not exist: 'devel/py-pytest-runner@py27' on branch 'head'. NOTE: this particular sanity test is very experimental A port specified in the BUILD_DEPENDS of devel/py-flake8 does not exist: 'devel/py-setuptools@py27' on branch 'head'. NOTE: this particular sanity test is very experimental A port specified in the RUN_DEPENDS of devel/py-flake8 does not exist: 'devel/py-mccabe@py27' on branch 'head'. ... ### Some background based on the Makefile for the above commit: = https://svnweb.freebsd.org/ports/head/devel/py-flake8/Makefile?view=3Dmark= up&pathrev=3D455509 FreshPorts converts this line:=20 BUILD_DEPENDS=3D = ${PYTHON_PKGNAMEPREFIX}pytest-runner>=3D0:devel/py-pytest-runner@${FLAVOR}= to:=20 py27-pytest-runner>=3D0:devel/py-pytest-runner@py27 The part before the : is dropped, leaving us with the port upon which = devel/py-flake8 is dependent: py-pytest-runner@py27 FreshPorts looks for that in the ports tree, and fails. As such, = FreshPorts needs to learn about FLAVORS. Or more precisely, at least in the short term, how to ignore FLAVORS. The solution I have is: ### [dan@pro02:~/tmp] $ cat depends.pl=20 #!/usr/local/bin/perl my $depends =3D 'devel/py-setuptools@py27'; ($depends, undef) =3D split /[@\:]/, $depends; print "'$depends'\n"; [dan@pro02:~/tmp] $ perl depends.pl=20 'devel/py-setuptools' ### This results in a port which FreshPorts can find in the tree. I plan to = start coding and testing this approach later today. This solution also caters for depends such as devel/git:configure which = also created false positives. I suspect this will only be a short term solution. short term issues: * I am not yet sure about duplicate depends. If a port has = devel/py-setuptools@py27 and devel/py-setuptools@py36, what will happen? * looking at the depends on FreshPorts, you cannot tell which FLAVORS = are available / in use. long term issues: * Should FreshPorts discern between different FLAVORS? How useful would = that be? * How should FreshPorts display FLAVORS available in a port. Comments and suggestions welcome. So are patches. --=20 Dan Langille - BSDCan / PGCon dan@langille.org