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=201712041212.vb4ccwu4059...@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=markup&pathrev=455509 FreshPorts converts this line: BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest-runner>=0:devel/py-pytest-runner@${FLAVOR} to: py27-pytest-runner>=0: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 #!/usr/local/bin/perl my $depends = 'devel/py-setuptools@py27'; ($depends, undef) = split /[@\:]/, $depends; print "'$depends'\n"; [dan@pro02:~/tmp] $ perl depends.pl '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. -- Dan Langille - BSDCan / PGCon [email protected] _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "[email protected]"
