Re: make run-depends-list-recursive?
On Wednesday 15 April 2009 01:14:23 Chris Whitehouse wrote: Mel Flynn wrote: On Monday 13 April 2009 03:56:15 Tim Judd wrote: On Sun, Apr 12, 2009 at 5:10 PM, Chris Whitehouse cwhi...@onetel.comwrote: Hi Is there a make target which will give a list of _all_ dependencies recursively not just next level up? Or a port? I tried ports-mgmt/pkg_tree but it only seems to work with installed ports. I don't care if I get duplicates as long as every dependency is listed at least once. Thanks Chris make all-depends-list Two things: 1) It surpresses config target and if a port has OPTIONS set, then you may get surprised once you've configured the port and ticked/unticked an option 2) It includes EXTRACT_DEPENDS, PATCH_DEPENDS and BUILD_DEPENDS, which typically don't end up in run dependencies. Looking at the subject this may not be what you need. make -C /usr/ports/category/portname -V LIB_DEPENDS -V RUN_DEPENDS will list the dependencies that will be registered in /var/db/pkg. Recurse through the list, take the second field split by : and run the above for each origin. Something like the script below, which calls the config target if not configured, remembers already visited dependencies and then prints the runtime dependency list. Thanks Mel and Tim. I am trying to determine how much disk space the distfiles for a port would use. I can get the file size from the distinfo file in the port directory. So I need to list dependencies for which a distfile would be downloaded. I guess my question now is which targets or variables need to be included to achieve that. (I know it includes build dependencies. I didn't include build deps in the subject because I figured replies would give me the principle and I could expand from that.) I took a guess at the existence of BUILD_DEPENDS and added it into the script. Running the modified script on multimedia/vlc I get the same number of dependencies as make all-depends-list so make all-depends-list is the same as make -V LIB_DEPENDS -V RUN_DEPENDS -V BUILD-DEPENDS for vlc. Is that all I need for any port? EXTRACT_DEPENDS can matter when distfiles are delivered in formats for which you don't have an unarchiver installed (7zip/zip/cabextract being the most common). But yes, all-depends-list is exactly that, with the provision that it does not take changed OPTIONS into account. -- Mel ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: make run-depends-list-recursive?
On Wednesday 15 April 2009 09:26:11 Jonathan McKeown wrote: On Tuesday 14 April 2009 21:02:08 Mel Flynn wrote: On Monday 13 April 2009 03:56:15 Tim Judd wrote: make all-depends-list Two things: 1) It surpresses config target and if a port has OPTIONS set, then you may get surprised once you've configured the port and ticked/unticked an option I'm not sure what you're saying here, but if you want to avoid a surprise you can run make config to choose options, then re-run make all-depends-list: the dependency list changes according to the config options. In theory, yes. In practice, make config-recursive (which is what you'd use) takes all-depends-list as input and as such suffers from the same flaw: config-recursive - all-depends-list entry = config-conditional make config new dep not in list I found it easier to use this, especially when building multiple ports from a list of origins, rather then waking up to an options screen. -- Mel ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: make run-depends-list-recursive?
On Thursday 16 April 2009 12:27:04 Mel Flynn wrote: But yes, all-depends-list is exactly that, with the provision that it does not take changed OPTIONS into account. That's what I suspected you were saying yesterday, and it seems to be wrong. Try this (assuming you haven't already configured/installed net/freeradius2 and security/krb5) cd /usr/ports/net/freeradius2 make all-depends-list make config# select Kerberos make all-depends-list make -C /usr/ports/security/krb5 config# unselect documentation for krb5 make all-depends-list make -C /usr/ports/security/krb5 rmconfig make rmconfig You will get three different lists of dependencies: in the first case, the main port (net/freeradius2) has the default OPTIONS and doesn't depend on security/krb5 or its dependencies. In the second case you will find teTeX and its dependencies in the list as they are dependencies of krb5 in its default setting. In the third case, you have changed an OPTION of security/krb5 to remove its dependency on teTeX, and net/freeradius2 correctly removes the teTeX dependency from its all-depends-list. This certainly looks like all-depends-list correctly taking account of the changed OPTIONS in the target port and all its dependencies. What *is* a problem is make config-recursive, which doesn't take account of any dependencies added as a result of OPTIONS changes made during the config-recursive process. This is relatively easily fixed, as make config-recursive actually runs make config-conditional for everything in all-depends-list, so if you keep running make config-recursive until nothing happens you can be reasonably sure you've dealt with all the unexpected dialogues that might otherwise pop up. This is worth knowing if you like doing overnight unattended installs and don't want to accept default settings (so can't use BATCH=yes). Until I discovered it I had immense frustration setting an installation/upgrade running only to come back the next day and find a dialogue sitting on the screen. Jonathan ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: make run-depends-list-recursive?
On Thursday 16 April 2009 14:52:34 Jonathan McKeown wrote: On Thursday 16 April 2009 12:27:04 Mel Flynn wrote: But yes, all-depends-list is exactly that, with the provision that it does not take changed OPTIONS into account. That's what I suspected you were saying yesterday, and it seems to be wrong. No, you misunderstood. Try this (assuming you haven't already configured/installed net/freeradius2 and security/krb5) cd /usr/ports/net/freeradius2 make all-depends-list make config# select Kerberos make all-depends-list make -C /usr/ports/security/krb5 config# unselect documentation for krb5 make all-depends-list make -C /usr/ports/security/krb5 rmconfig make rmconfig Correct. But... make -C /usr/ports/net/freeradius2 rmconfig make -C /usr/ports/net/freeradius2 all-depends-list calculate diskspace make -C /usr/ports/net/freeradius2 install Now you're presented with the config dialog and your calculated diskpace may be off. That's what I meant with all-depends-list surpressing config target. You also cannot check for /var/db/ports/*/options file being present, because config-conditional not only checks for the presence of the file, but also if options have been removed/deleted and will represent you with the config dialog if so. So, all in all, when diskspace is critical and you want unattended installation after properly configuring the ports, you will want to read out the variables /after/ calling config-conditional and recurse through the list. -- Mel ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: make run-depends-list-recursive?
On Tuesday 14 April 2009 21:02:08 Mel Flynn wrote: On Monday 13 April 2009 03:56:15 Tim Judd wrote: make all-depends-list Two things: 1) It surpresses config target and if a port has OPTIONS set, then you may get surprised once you've configured the port and ticked/unticked an option I'm not sure what you're saying here, but if you want to avoid a surprise you can run make config to choose options, then re-run make all-depends-list: the dependency list changes according to the config options. This is occasionally useful - for example it's how I found out that security/krb5 can be prevented from bringing in the whole of teTeX and its dependencies: just unselect the documentation (which is selected by default). (On a separate note, does it strike anyone else as a bit excessive to install teTeX - which is well over 100MB of download not counting its own dependencies - behind the scenes as part of installing documentation?) Jonathan ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: make run-depends-list-recursive?
On Monday 13 April 2009 03:56:15 Tim Judd wrote: On Sun, Apr 12, 2009 at 5:10 PM, Chris Whitehouse cwhi...@onetel.comwrote: Hi Is there a make target which will give a list of _all_ dependencies recursively not just next level up? Or a port? I tried ports-mgmt/pkg_tree but it only seems to work with installed ports. I don't care if I get duplicates as long as every dependency is listed at least once. Thanks Chris make all-depends-list Two things: 1) It surpresses config target and if a port has OPTIONS set, then you may get surprised once you've configured the port and ticked/unticked an option 2) It includes EXTRACT_DEPENDS, PATCH_DEPENDS and BUILD_DEPENDS, which typically don't end up in run dependencies. Looking at the subject this may not be what you need. make -C /usr/ports/category/portname -V LIB_DEPENDS -V RUN_DEPENDS will list the dependencies that will be registered in /var/db/pkg. Recurse through the list, take the second field split by : and run the above for each origin. Something like the script below, which calls the config target if not configured, remembers already visited dependencies and then prints the runtime dependency list. -- Mel #!/bin/sh VISITED= if test $# -eq 0; then startdir=`pwd` else startdir=$1 fi config_port() { local ldeps rdeps curdir curdir=$1 make -C ${curdir} config-conditional ldeps=`make -C ${curdir} -V LIB_DEPENDS` rdeps=`make -C ${curdir} -V RUN_DEPENDS` for dep in ${ldeps} ${rdeps}; do dir=${dep#*:} # For 3-part deps where 3rd field is target, ex: # dovecot:${PORTSDIR}/mail/dovecot:build dir=${dir%%:*} case ${VISITED} in * ${dir} *|* ${dir}) ;; *) VISITED=${VISITED} ${dir} config_port ${dir} esac done } config_port $startdir for dir in ${VISITED}; do echo $dir done ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: make run-depends-list-recursive?
Mel Flynn wrote: On Monday 13 April 2009 03:56:15 Tim Judd wrote: On Sun, Apr 12, 2009 at 5:10 PM, Chris Whitehouse cwhi...@onetel.comwrote: Hi Is there a make target which will give a list of _all_ dependencies recursively not just next level up? Or a port? I tried ports-mgmt/pkg_tree but it only seems to work with installed ports. I don't care if I get duplicates as long as every dependency is listed at least once. Thanks Chris make all-depends-list Two things: 1) It surpresses config target and if a port has OPTIONS set, then you may get surprised once you've configured the port and ticked/unticked an option 2) It includes EXTRACT_DEPENDS, PATCH_DEPENDS and BUILD_DEPENDS, which typically don't end up in run dependencies. Looking at the subject this may not be what you need. make -C /usr/ports/category/portname -V LIB_DEPENDS -V RUN_DEPENDS will list the dependencies that will be registered in /var/db/pkg. Recurse through the list, take the second field split by : and run the above for each origin. Something like the script below, which calls the config target if not configured, remembers already visited dependencies and then prints the runtime dependency list. Thanks Mel and Tim. I am trying to determine how much disk space the distfiles for a port would use. I can get the file size from the distinfo file in the port directory. So I need to list dependencies for which a distfile would be downloaded. I guess my question now is which targets or variables need to be included to achieve that. (I know it includes build dependencies. I didn't include build deps in the subject because I figured replies would give me the principle and I could expand from that.) I took a guess at the existence of BUILD_DEPENDS and added it into the script. Running the modified script on multimedia/vlc I get the same number of dependencies as make all-depends-list so make all-depends-list is the same as make -V LIB_DEPENDS -V RUN_DEPENDS -V BUILD-DEPENDS for vlc. Is that all I need for any port? thanks Chris ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
make run-depends-list-recursive?
Hi Is there a make target which will give a list of _all_ dependencies recursively not just next level up? Or a port? I tried ports-mgmt/pkg_tree but it only seems to work with installed ports. I don't care if I get duplicates as long as every dependency is listed at least once. Thanks Chris ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: make run-depends-list-recursive?
On Sun, Apr 12, 2009 at 5:10 PM, Chris Whitehouse cwhi...@onetel.comwrote: Hi Is there a make target which will give a list of _all_ dependencies recursively not just next level up? Or a port? I tried ports-mgmt/pkg_tree but it only seems to work with installed ports. I don't care if I get duplicates as long as every dependency is listed at least once. Thanks Chris make all-depends-list ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org