K 10 svn:author V 5 dougb K 8 svn:date V 27 2010-04-25T22:39:25.730497Z K 7 svn:log V 1651 Improve the handling of various situations where there is no ORIGIN recorded in the +CONTENTS file. This is almost always an error in the package building process, and therefore usually needs to be flagged and handled as an error. There are (at least) 2 situations where it may not be an error; bsdpan ports, and when the user has added an +IGNOREME file (usually for 3rd party packages). 1. Add code to origin_from_pdb() that tests to see that grep returned something, echos the result as before, then also returns successfully. a. If the port is a bsdpan port, return with an error code but let the caller handle the reporting as appropriate. b. If there is no ORIGIN but there is an +IGNOREME file don't report the error unless we're using -v, then also report that the +IGNOREME file is there. Either way, return with an error code. c. If there is no ORIGIN, and no +IGNOREME file, report the error and return with an error code. 2. In several places this allows several lines of code where the function is called to be collapsed into: origin=`origin_from_pdb $iport` || continue 3. In the main body where we parse the command line for what to work on convert the code that was individually testing the various conditions that are now handled in origin_from_pdb() to simply parse the return codes with a case statement. In the common case (there is an ORIGIN in +CONTENTS) this is almost certainly a minor optimization since the error handling code in origin_from_pdb() is never reached, and several places where things like "is it a bsdpan port?" and other error handling have been removed. END