portupgrade

Andrew Konstantinov andrei at andruxa.sytes.net
Fri Jul 11 22:39:28 PDT 2003


Hello,
  I've written a simple script to make my life easier, but there is a problem with that script and I can't figure out the source of that problem.

      if [ "$variables" != "" ]; then
	echo "portupgrade -m '$variables' $progname"
	(portupgrade -m \'$variables\' $progname)
      else
	echo "portupgrade $progname"
	(portupgrade $progname)
      fi

  The problem is simple. Whenever this script confronts a program which needs to be upgraded, portupgrade removes the old version and then script terminates without any error messages, while several instances of bash and linker continue to run in the background for several seconds, and then also terminate. The new version of the program never gets installed. What I can't understand is the reason why the script terminates without any error messages while it still has several cycle to go. It doesn't terminate if there aren't any programs that need to be upgraded (portupgrade simply responds with the message that there is nothing to upgrade), and goes through the same cycles without spitting out any error messages. My guess is that something weird happens when portupgrade starts to install the upgraded version of the removed program, but I have no idea what exactly that is. I'd be more than thankful if you could point out the place where I do something in a wrong way. I also have attached a full version of that script, in case if you want to take a look at it.

  Thanks


More information about the freebsd-hackers mailing list