(Very) bogus package dependencies

Garrett Cooper youshi10 at u.washington.edu
Thu Dec 6 21:44:51 PST 2007


Alex Goncharov wrote:
> ,--- You=Paul (Thu, 06 Dec 2007 22:41:27 -0600) ----*
> |
> | > --------------------
> | ># find /usr/ports/sysutils/hal -type f -exec grep -Hn 'cdrtools' {} \;|
> | ># wc -l
> | >      0
> | > --------------------
> | 
> | That's because you're not looking in the right place.  Open the Makefile 
> | for hal and you find:
> | USE_CDRTOOLS=   yes
>
> The place was right -- the character case was not: with `-i' I would
> have seen it:
>
> --------------------
> # find /usr/ports/sysutils/hal -type f -exec grep -Hni 'cdrtools' {} \;| wc -l
>        1
> --------------------
>
> But thank you -- that's exactly the information I was looking for.
>
> | Now, why cdrtools is required to build the port is a question that is 
> | answered by going to /usr/ports/Mk/bsd.port.mk and reading the section on 
> | USE_CDRTOOLS.  Then continue to trace from there, and you will find that 
> | hal won't build without some file or files that are installed by cdrecord. 
>
> Excellent -- thank you!
>
> | (No, I'm not going to do that for you.)
>
> That's a bit disappointing...
>
> Just kidding -- I'll do it *gladly*, now that you directed me to the
> right places.
>
> | >    So, is it that a port maintainer creates `/var/db/pkg/PKG/*' files
> | >    by hand?  Based on individual ideas?  Not on really "must-to-have"
> | >    things, like dependencies on shared libraries?
> | >
> | Absolutely not!  /var/db/pkg/portname is built by the ports system based 
> | upon how the port is built.  Most maintainers (including me!) would have 
> | no clue what's in the CONTENTS page without looking at it, because we have 
> | "nothing" to do with its creation (other than the fact that we created the 
> | port.)
>
> OK.
>
> | > 2. (Conceptual): How reasonable are these dependencies?
> | >
> | I doubt seriously any port maintainer just picks dependencies willy-nilly. 
> | They're chosen because the source code docs cite them as requirements 
> | and/or because the port won't build without them.
> | 
> | >    In this case, `/usr/sbin/burncd' is all I need to burn CD's.  I
> | >    have no practical reason to have `cdrtools' on my computer.
> | >
> | Of course you do.  Otherwise it wouldn't be there.
>
> I'll read `/usr/ports/Mk/bsd.port.mk' and may agree with you :-)
>
> | >    Why would the "Hardware Abstraction Layer for simplifying device
> | >    access" depend on a specific set of "CD/CD-R[W] and ISO-9660 image
> | >    creation and extraction tools" -- on this set and not on another?
> | >
> | It most likely doesn't.  It depends upon a file or files that are 
> | installed by cdrtools.
>
> Interesting.
>
> | Look at one of my ports, security/barnyard.  It depends on snort.
> | Why?  Because that's the only thing it's designed to work with.
> | Without snort, there's no reason to have barnyard on your system.
> | Another port, devel/byacc, has no dependencies at all.  Another one,
> | security/sguil-server, has multiple dependencies, some because
> | they're required for proper operation, others because the port won't
> | build without those libraries.
>
> That approach I understand... `cdrtools' was a mystery -- and it gave
> me a reason to ask the questions that I had long had in my head.
>
> | If you want to spend time figuring all that out, be my guest, but
> | the maintainers have already done all that work for you, and the
> | committers have verified that it's required and that it works as
> | expected.
>
> | That's the beauty of ports.
>
> I won't dispute the word "beauty" here -- I like the system very much.
> But coming from some eight years of using Debian, I am still mystified
> about the underling mechanics of ports.
>
> Your answers definitely help -- thank you!
>
> -- Alex -- alex-goncharov at comcast.net --
>
> /*
>  * Keep cool, but don't freeze.
>  * 
>  * -- Hellman's Mayonnaise
>  */
>
> _______________________________________________
> freebsd-ports at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-ports
> To unsubscribe, send any mail to "freebsd-ports-unsubscribe at freebsd.org"
>   

    Look for USE_CDRTOOLS in "/usr/ports/sysutils/hal/Makefile"; that's 
where the pkg dependency is coming from.
    If you don't want that option you can roll your own package you 
know. 'cd /usr/ports/sysutils/hal && make config package' (I believe.. 
don't have my FBSD machine in front of me) might yield the knob 
disabling that you desire..
Cheers,
-Garrett


More information about the freebsd-ports mailing list