Date: Mon, 4 Dec 2017 09:50:46 -0500 From: Dan Langille <dan@langille.org> To: FreeBSD Ports <freebsd-ports@freebsd.org> Subject: FreshPorts and FLAVORS Message-ID: <F1B21356-EC09-4E0F-AEB5-CCA75874DB24@langille.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F1B21356-EC09-4E0F-AEB5-CCA75874DB24>