FreeBSD ports tree (read-only mirror)
14242d555c
============ Expand on an idea provided by mandree@ to use 'pkg_version -I' to quickly check what ports are out of date, and incorporate that check into the --index option. Feedback from users seems to indicate that this is what they expected the option to do anyway, so the minor change to the feature does not seem to be a POLA violation, especially since INDEX support is still relatively new. Add the --index-first option to do what --index used to do in case anyone cares. Bug Fixes ========= 1. Add more error checking for incompatible command line options. Add a new cross_idx() to handle checking the 3 --index* options, and consolidate some of the old tests that were all relative to -G. 2. We want to test the .bz2 version of INDEX to see if it's newer, and unzip it if it is. 3. For -o mode: Going back a long ways upg_port was (ab)used to indicate the currently installed version of the old port for -o. Originally this was safe since it's very rare to have the new port installed already, and it saved a little bit of code complexity. However, as more and more features were added that utilized the value of upg_port it became increasingly unsafe. Particularly, at this time there are 2 related bugs manifest. First the wrong information appears in the confirm list (upgrade of the old port vs. install of the new) and parsing the old port directory. The latter was (mostly) harmless, although in the case of an old port directory being DEPRECATED this resulted in a fatal error when trying to upgrade. So, make the following changes: a. Make upg_port an installed version of the new port, if it exists. b. Introduce ro_upg_port for the existing version of the old port. c. Factor out some code that was related to how to handle lack of an installed version of the old port (since now that's done higher up). d. In the stage after the build of the new port and before pkg_delete of the old port test for upg_port OR ro_upg_port and run the various features (lib backup for -w, pkg_delete, etc.) as needed for both. e. In install_failed() notify the user about the backup port for the old version. f. I discovered in regression testing that invoking -o for MOVED ports that we get to as dependencies was working, but the code to automatically invoke -o for a parent port was broken. The problem is that we can't just exec a new version if we're the parent, we have to cleanly shut down background fetches and other processes, delete temp files, etc. So split the parts of safe_exit() that relate to these elements into their own function, parent_exit(), and call it both from safe_exit() and when exec'ing a new version for -o in this case. 4. Add error checking to pm_mktemp, and the stray mktemp call. According to a private report from a user it can actually fail. 5. Add error-checking to parse_index() so that if we don't find a line for the port we return an error code; check for the error in the callers. 6. 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). a. Add code to origin_from_pdb() that tests to see that grep returned something, echos the result as before, then also returns successfully * If the port is a bsdpan port, return with an error code but let the caller handle the reporting as appropriate. * 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. * If there is no ORIGIN, and no +IGNOREME file, report the error and return with an error code. b. In several places this allows several lines of code where the function is called to be collapsed into: origin=`origin_from_pdb $iport` || continue c. 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. 7. In check_for move some local variables down into the block where they are used. |
||
---|---|---|
accessibility | ||
arabic | ||
archivers | ||
astro | ||
audio | ||
benchmarks | ||
biology | ||
cad | ||
chinese | ||
comms | ||
converters | ||
databases | ||
deskutils | ||
devel | ||
dns | ||
editors | ||
emulators | ||
finance | ||
french | ||
ftp | ||
games | ||
german | ||
graphics | ||
hebrew | ||
hungarian | ||
irc | ||
japanese | ||
java | ||
korean | ||
lang | ||
math | ||
mbone | ||
misc | ||
Mk | ||
multimedia | ||
net | ||
net-im | ||
net-mgmt | ||
net-p2p | ||
news | ||
palm | ||
polish | ||
ports-mgmt | ||
portuguese | ||
russian | ||
science | ||
security | ||
shells | ||
sysutils | ||
Templates | ||
textproc | ||
Tools | ||
ukrainian | ||
vietnamese | ||
www | ||
x11 | ||
x11-clocks | ||
x11-drivers | ||
x11-fm | ||
x11-fonts | ||
x11-servers | ||
x11-themes | ||
x11-toolkits | ||
x11-wm | ||
.cvsignore | ||
CHANGES | ||
COPYRIGHT | ||
GIDs | ||
KNOBS | ||
LEGAL | ||
Makefile | ||
MOVED | ||
README | ||
UIDs | ||
UPDATING |
This is the FreeBSD Ports Collection. For an easy to use WEB-based interface to it, please see: http://www.FreeBSD.org/ports For general information on the Ports Collection, please see the FreeBSD Handbook ports section which is available from: http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/ports.html for the latest official version or: The ports(7) manual page (man ports). These will explain how to use ports and packages. If you would like to search for a port, you can do so easily by saying (in /usr/ports): make search name="<name>" or: make search key="<keyword>" which will generate a list of all ports matching <name> or <keyword>. make search also supports wildcards, such as: make search name="gtk*" For information about contributing to FreeBSD ports, please see the Porter's Handbook, available at: http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/porters-handbook/ NOTE: This tree will GROW significantly in size during normal usage! The distribution tar files can and do accumulate in /usr/ports/distfiles, and the individual ports will also use up lots of space in their work subdirectories unless you remember to "make clean" after you're done building a given port. /usr/ports/distfiles can also be periodically cleaned without ill-effect.