Re: overnight upgrade interrupted by questions
On Tue, 15 Apr 2008 20:02:19 +0200 Mel [EMAIL PROTECTED] wrote: If you wanted to script the first case, you'd do the following in every origin that needs updating: I have a similar script, that works globally, recursing down from each out-of-date port through any missing origins. If you call it with -a it runs over all installed ports - useful if you want to clear everything and start again. # cat /root/bin/portsconf #!/bin/sh IFS= : ${PORTSDIR:=/usr/ports} if [ ${1}x = -ax ] ; then pvflags='-oq' else pvflags=-oql\\ fi visited_origins= recurse_origins(){ cd ${PORTSDIR}/${1} # need to configure before recursing in case dependencies change make config-conditional for d in `make build-depends-list run-depends-list | grep -Eo [^/]+/[^/]+$` ;do installed=`pkg_info -qO ${d}` if [ -z $installed ] ;then if ! echo $visited_origins | grep $d /dev/null ; then visited_origins=$visited_origins $d recurse_origins $d fi fi done } for orig in `pkg_version ${pvflags} ` ; do recurse_origins $orig done ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: overnight upgrade interrupted by questions
Mel wrote: On Tuesday 15 April 2008 22:10:41 Chris Whitehouse wrote: Do something like [sorry not exact syntax as I don't have access to a freebsd machine]: foreach i (`cat portlist`) foreach? cd /usr/ports/$i make config You should 'make config-conditional' to save yourself some work. make config always shows you the dialogue, while config-conditional checks to see if the variablenames have changed and if not, just moves on using what you already have in /var/db/ports. That's very useful thank you Chris These are the ports that will bite you: # find /usr/ports -name 'configure' -path '*/scripts/*' \ -exec grep -l '/usr/bin/dialog' {} + /usr/ports/emulators/vmware3/scripts/configure /usr/ports/japanese/typist/scripts/configure /usr/ports/misc/sonytv/scripts/configure /usr/ports/print/apsfilter/scripts/configure /usr/ports/print/ghostscript-gnu/scripts/configure /usr/ports/print/ghostscript-gpl/scripts/configure ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: overnight upgrade interrupted by questions
Pollywog wrote: I did 'portupgrade -aP' last night but this morning I found that one package had some questions for me about how I want to compile the package (wants to know which options I want). This meant that no packages were compiled since the cups package asked questions. Is there a way to circumvent this problem when upgrading with portupgrade? I know how to avoid this when installing a single port but not how to avoid it when upgrading all available packages. thanks ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] Try the --batch option of portupgrade ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
overnight upgrade interrupted by questions
I did 'portupgrade -aP' last night but this morning I found that one package had some questions for me about how I want to compile the package (wants to know which options I want). This meant that no packages were compiled since the cups package asked questions. Is there a way to circumvent this problem when upgrading with portupgrade? I know how to avoid this when installing a single port but not how to avoid it when upgrading all available packages. thanks ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: overnight upgrade interrupted by questions
A lot of people would reply that they'd like to configure the ports themselves before launching the installation, leading people to suggest scripts such as: #!/bin/sh plist=`pkg_version -ovl'' |awk '{ print $1 }'` for porg in $plist ; do cd /usr/ports/${porg} make config-recursive done Before I go and annoy someone on the portupgrade list, does anyone here know if the portupgrade people have decided this is unnecessary functionality? Sincerely, -- Ned Ruggeri On Tue, Apr 15, 2008 at 8:49 AM, Manolis Kiagias [EMAIL PROTECTED] wrote: Pollywog wrote: I did 'portupgrade -aP' last night but this morning I found that one package had some questions for me about how I want to compile the package (wants to know which options I want). This meant that no packages were compiled since the cups package asked questions. Is there a way to circumvent this problem when upgrading with portupgrade? I know how to avoid this when installing a single port but not how to avoid it when upgrading all available packages. thanks ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] Try the --batch option of portupgrade ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: overnight upgrade interrupted by questions
On Tuesday 15 April 2008 15:26:42 Edward Ruggeri wrote: A lot of people would reply that they'd like to configure the ports themselves before launching the installation, leading people to suggest scripts such as: #!/bin/sh plist=`pkg_version -ovl'' |awk '{ print $1 }'` for porg in $plist ; do cd /usr/ports/${porg} make config-recursive done Sorry to disappoint you, but that wont work for two reasons: 1) make config-recursive is flawed by design, because it makes a dependency list based on current settings and if you alter dependencies during your recursive configuring, it will not update the list. 2) If you hit an interactive configure (not config, configure) target, then you will still end up with a dialog. Prime example: print/ghostscript-gpl. If you wanted to script the first case, you'd do the following in every origin that needs updating: #!/bin/sh VISITED= config_port() { local ldeps rdeps bdeps ldeps=`make -V LIB_DEPENDS` rdeps=`make -V RUN_DEPENDS` bdeps=`make -V BUILD_DEPENDS` make config-conditional for dep in ${ldeps} ${rdeps} ${bdeps}; do dir=${dep##*:} case ${VISITED} in * ${dir}*) ;; *) echo --- $dir VISITED=${VISITED} ${dir} cd ${dir} config_port esac done } config_port -- Mel Problem with today's modular software: they start with the modules and never get to the software part. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: overnight upgrade interrupted by questions
Mel wrote: On Tuesday 15 April 2008 15:26:42 Edward Ruggeri wrote: A lot of people would reply that they'd like to configure the ports themselves before launching the installation, leading people to suggest scripts such as: #!/bin/sh plist=`pkg_version -ovl'' |awk '{ print $1 }'` for porg in $plist ; do cd /usr/ports/${porg} make config-recursive done Sorry to disappoint you, but that wont work for two reasons: 1) make config-recursive is flawed by design, because it makes a dependency list based on current settings and if you alter dependencies during your recursive configuring, it will not update the list. 2) If you hit an interactive configure (not config, configure) target, then you will still end up with a dialog. Prime example: print/ghostscript-gpl. If you wanted to script the first case, you'd do the following in every origin that needs updating: #!/bin/sh VISITED= config_port() { local ldeps rdeps bdeps ldeps=`make -V LIB_DEPENDS` rdeps=`make -V RUN_DEPENDS` bdeps=`make -V BUILD_DEPENDS` make config-conditional for dep in ${ldeps} ${rdeps} ${bdeps}; do dir=${dep##*:} case ${VISITED} in * ${dir}*) ;; *) echo --- $dir VISITED=${VISITED} ${dir} cd ${dir} config_port esac done } config_port This process has always worked for me upgrading a fairly standard desktop machine: Get a list of status of installed ports portmanager -s somelist Extract list of category/port needing updating, with vi, whatever Do something like [sorry not exact syntax as I don't have access to a freebsd machine]: foreach i (`cat portlist`) foreach? cd /usr/ports/$i make config foreach? end I've never installed print/ghostscript-gpl so I don't know if my method would break with it, but I do have to obviously treat java/jdk15 specially. Chris ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: overnight upgrade interrupted by questions
On Tuesday 15 April 2008 22:10:41 Chris Whitehouse wrote: Do something like [sorry not exact syntax as I don't have access to a freebsd machine]: foreach i (`cat portlist`) foreach? cd /usr/ports/$i make config You should 'make config-conditional' to save yourself some work. make config always shows you the dialogue, while config-conditional checks to see if the variablenames have changed and if not, just moves on using what you already have in /var/db/ports. These are the ports that will bite you: # find /usr/ports -name 'configure' -path '*/scripts/*' \ -exec grep -l '/usr/bin/dialog' {} + /usr/ports/emulators/vmware3/scripts/configure /usr/ports/japanese/typist/scripts/configure /usr/ports/misc/sonytv/scripts/configure /usr/ports/print/apsfilter/scripts/configure /usr/ports/print/ghostscript-gnu/scripts/configure /usr/ports/print/ghostscript-gpl/scripts/configure -- Mel Problem with today's modular software: they start with the modules and never get to the software part. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]