On Tue, Dec 14, 2021 at 10:01:04AM -0800, Chris Bennett wrote:
> Hi.
> 
> I have a mountain of good and bad versions of many single ports stored
> that I wanted to go through and discard the garbage from.
> 
> I needed to see what I could find that would let me diff these different
> versions of Makefiles, DESCR, etc.
> 
> I saw one CPAN Perl module that I wasn't clear about, so I did a portgen on
> it. After looking for a test depend I also saw what would be added.
> I don't intend to port this in or probably use it either.
> Please ignore what these depends below are in particular.
> 
> I have 2 questions about this.
> 1. What is the correct way to write up something like this?

I really don't follow quite what "something like this" is, so I'm
probably going to answer the wrong question.

My guess as to the question is, how do you decide what to put into the
different *_DEPENDS?

For perl ports, I generally start with what the author added to their
META files, which is reflected in what portgen(1) does.  It used to be
perl didn't separate BUILD from TEST depends, so lots of modules still
don't do that, so sometimes it makes sense to move them around.


> 2. More important, why is that the right way?
>    I would like to know where to look in which code for ports process to
>        get a better understanding of how this plays out.

This is not "official", but it is my best practices for what to put in
each of these.

BUILD_DEPENDS are the minimum list of dependencies needed to
successfully and repeatable build a package.  The fewer you can have,
the faster bulk builds go.

TEST_DEPENDS are the maximum list of dependencies to get the best test
coverage.  Sometimes it isn't worth porting a whole set of extra
dependencies just for a single optional test, so there is a balance.

RUN_DEPENDS are the dependencies that give the person installing the
best experience.  If there is some large dependency that is for a seldom
used feature that has useful error messages that make it clear you need
to install additional dependencies if you try to use it, then you
probably can leave it out.  Otherwise, if it makes the port more usable,
probably add it.



> If I can only get one answer, question 2 would be far preferred.
> Any help better than copy/paste would be great.
> I would like to move beyond the idiot level of porting.
> I want to fully understand the answer to question 1 by looking at the
> OpenBSD porting code and knowing also what is done a certain way:
> "just because that's SOP, no intrinsic reason"
> 
> 
> BUILD_DEPENDS =       devel/p5-Test-Compile>=1.2.1 \
>               devel/p5-Test-Pod>=1.48
> 
> RUN_DEPENDS =         devel/p5-Algorithm-Diff>=1.1903 \
>                       devel/p5-Test-Compile>=1.2.1 \
>                       devel/p5-Test-Pod>=1.48 \
>                       textproc/p5-Regexp-Common>=201331301
> 
> TEST_DEPENDS = devel/p5-Test-Pod>=1.48
> 
> -- 
> Chris Bennett
> 
> 

-- 
andrew

At the source of every error which is blamed on the computer, you
will find at least two human errors, including the error of blaming
it on the computer.

Reply via email to