FreshPorts -- The Place For Ports If you buy from Amazon USA, please support us by using this link.
Follow us

I am looking for an LTO tape library. Do you have one to spare?
Commit found by message id
Sat, 1 May 2010
[ 03:59:22 dougb ] Original commit 
portmaster ports-mgmt files touched by this commit Manage your ports without external databases or languages
New Features
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
   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.

Number of ports [& non-ports] in this commit: 1

Showing files for just one port: ports-mgmt/portmaster

show all files

hide all files

1 file found
modify 2.23 View diff View revision /ports/head/ports-mgmt/portmaster/files/
User Login
Create account

Servers and bandwidth provided by
New York Internet, SuperNews, and RootBSD

This site
What is FreshPorts?
About the authors
How big is it?
The latest upgrade!

Enter Keywords:

Latest Vulnerabilities
squidSep 18
squid33Sep 18
dbusSep 17
nginxSep 16
nginx-develSep 16
phpmyadminSep 13
ossec-hids-clientSep 11
ossec-hids-localSep 11
ossec-hids-serverSep 11
chromiumSep 09
trafficserverSep 05
apache22*Sep 03
apache22-event-mpm*Sep 03
apache22-itk-mpm*Sep 03
apache22-peruser-mpm*Sep 03

7 vulnerabilities affecting 18 ports have been reported in the past 14 days

* - modified, not new

All vulnerabilities

Deleted ports
Sanity Test Failures

NEW Graphs (Javascript)

Calculated hourly:
Port count 24094
Broken 121
Deprecated 90
Ignore 385
Forbidden 17
Restricted 203
Vulnerable 22
Expired 2
Set to expire 85
Interactive 0
new 24 hours 2
new 48 hours6
new 7 days37
new fortnight70
new month241

Servers and bandwidth provided by
New York Internet, SuperNews, and RootBSD
Valid HTML, CSS, and RSS.
Copyright © 2000-2014 Dan Langille. All rights reserved.