 - Coding standard:
 - Handle appropriate exceptions
 - Log all relevant events
 - Specify a public API (via __all___)
 - PEP 0008

Pylint:
 - enable pylint E0611
 - verify module level names (e.g. libpb/events)

Low Handing Fruit:
 - fine tune queue lengths
 - manual page
 - wiki page

Future release:
 - Speed up port_version()
 - Add options for either individually executing make targets or in baulk
 * Check spelling for all documentation
 - Increase level of logging
 + Move to the python 2.7 naming and styles (and make compatible with 3)
 - Implement proper recording of ports installation (i.e. when they fail)
 + Refactor:
   - Break ports into its own libraries
   + Try isolate system and ports dependent code
 - move DependHandler to using signals (for status changed)
 - support DESTDIR...
 - handle alternative dependencies
 - update @pkgdep lines
 - add `-x` (and `-X` recursive) to exclude ports
 - rework DependHandlers to use sets, dictionaries

0.7 - Milestone 9 (Sundry modules):
 - Logging infrastructure (for messages for user)
 - manual page(s)
 - ensure only one instance of portbuilder builds per chroot/jail
 - switch to debug off by default

0.6 - Milestone 8 (Finish command line controller):
 - modules:
   - exit
   - monitor
 - Get relative option parity with portupgrade
 - Improve logging settings (such as location, level)
 - index_builder:
   - Add option to direct file output (or just to stdout)
   - Add appropriate checks for duplicate port names...
   - Do we need to sort per category, overall, if at all?
   - Check for 100% compatibility
 + monitor:
   * Show information about failed ports
   - Split into separate modules
   - Stat:
     - Make options a class variable
   + Top:
     + Add option to:
       * Exit program
       - Change update rate
       * Filter viewed ports (i.e. only active and or pending...)
       - A help menu
     - Add some colour???
     - View output of port (via a window)
     - Mouse support
     - Improve output when rendering to small screens
     - Remove /[workers] from output
 - report on failures
 - portbuilder:
   - Allow fuzzy port specification
   - Implement most of portupgrade
   - Handle passwords properly
   - Allow option for no-interactive
 - profile memory usage

0.5 - Milestone 7 (Finish Target Builders):
 - modules:
   - queue
   - target

0.4 - Milestone 6 (Finish Dependent Handling):
 - modules:
   - port/dependhandler
 - DependHandler:
   - Ensure _count is done properly
   - Handle depenancies with fetch_only
   - Fix check (with ref to usage)
   - DependHandler must handle the case when a dependency fails unresolved
   - Check for cyclic dependencies
   - Implement type specific checking (bin vs lib) [mimic ports]
   - Handle stale dependencies (with a dummy PortDepend)
   - Handle a port having failed and still satisfy its dependents
   - Check for conflicts (and handle)

0.3 - Milestone 5 (Finish basic ports infrastructure):
 - modules:
   - make
   - port/port
 + Implement proper and complete logging (and comments)
 + Port:
   * Add logging of port targets
   - Handle pkg-message
   * Check need for status
   - Attributes:
     - Check for a need of PATCHFILES
     - ALWAYS_KEEP_DISTFILES
     - Extend attributes for NO_-
     - FORBIDDEN, BROKEN and IGNORE
     - ONLY_FOR_ARCHS and NOT_FOR_ARCHS
     - DEPRECIATION...
     - NO_BUILD option (and implement)
     - IS_INTERACTIVE
     - NO_CHECKSUM
     - Restrictions
     - etc
   - Handlers:
     - Provide output stream (as work in progress)
 + make:
   * Have logging of build commands (with archival)
   - Add a command prefix (such as for socksify?)
   - Add sudo support
   - Make to class
   - Fix the use of prefexing...
 - refactor jobs (and move jobs to better locations)
 - implement background loading of pkgdb (non-blocking IO)
 - separate fetch/install steps of repo install
 - add priorities for install_queue:
   - pkginstall = higher priority
   - install = normal priority
   - repoinstall = low priority
 - make jobs responsible for stopping themselves
 - mark installed ports/packages as dependency/explicit (or (in)?direct)
 - only load port attributes that are needed
 - cleanup/refactor mk.py
 - update pkgng repo ('pkg update') when it is specified in env.flags["method"]
 - add support for licenses (accepting licenses...)
 - add support for jails
 - split repo fetch and repo install stage
 - add soft dependency (aka, conditional dependency, on depend if another port
                        actually needs it).
 - prioritise ports with resolved dependencies over non-resolved
 - read PKG_CACHEDIR from pkg.conf (pkgng)
 - make the port cache allow instantaneous retrieval (i.e. dict mixin + __in__)
 - move flags["target"] to set() based

0.2 - Milestone 4 (Command line controller):
 - Create target to build INDEX
 - Port:
   - Add the describe method (same as the ports version)
 - Create progress monitor type 2 (aka stat mode)
 * Implement build logging for the ports
 * Fix preparation for stages
 * Implement logging (using logging library?)
 * don't install depends when installing from package or repo (pkgng)
 - Use MOVED for port.pkg.db.status (fallback)
 * pkg_mgmt interface (vs direct file inspection)
 * make compatible with pkgng
 - display skipped ports (with toggle)
 * add -j options to control queue loads
 x create a clean_builder
 * clean ports before trying other depend methods
 - indicate progress of each stage (i.e. fetched, built)
 - allow ports to be reinserted into build queue (and connect up)
 * rename builders (module name provides a hint to their purpose)
 * rename queues
 - rename signals
 + start moving library imports to module level (vs method/function)
 * make portbuilder indicate what is happening before Top monitor starts
 - handle queue with stalled job and no active job (not possible with current code)
 - make builds more persistent (i.e. no abort on dependency failure)
 - refactor signal/event code (into own library)
   - signal / event
   - job / queue
   - subprocess (and others)
   - create oneshot signals
   ? split into own project
   - delayed signal (aka event.post(signal.emit)...)
 * support `reinstall' target
 * add support for installing from different package sources (repo, local)
 * refactor/improve make.conf dynamic configuration:
   * refactor existing dynamic configuration
   * support DEPENDS_PRECLEAN
   * support DEPENDS_CLEAN
   * support NODEPENDSCLEAN
   * support PKGREPOSITORY
 * implement clean flags["target"]
 * refactor env/mk code
 * remove reinstall from flags["target"]
 - implement sysctl using ctypes (waiting on FFI from pypy)
 + cleanup namespace
 * add support to verify if stage is possible (can_do_stage)
 - allow pkg.version to use "pkg_version" as alternative
 - periodically check that the state tracked pkgdb agrees with pkg_info
 * document libpb initialisation procedure (cache/clean env, load defaults, db init)
 * make pre/post cleaning the default
 * refactor all env.flags (like CONFIG) for better handling
 - rename/refactor make target (move into mk?)
 + fix module level definitions used by port (install status, build stage)
 - eliminate bottleneck in portbuilder for loading attr
 * fix cleaning of ports (why is make call in CleanJob?)
 * fix `job' names in builder
 * use pkg.remove instead of `make deinstall`
 * fix fetch-only mode when using repo method (aka REPOFETCH)
 * only install package if it matches port's options
 * rename flags["stage"] to flags["(inst)status"]

0.1.3 - Milestone 3 (Target Builders):
 * Finish call documentation
 * Move type() checks to isinstance
 * pypkg:
   * Add ability to update/install ports (basic)
   * Add package ability
   * Allow environment variables to be settable (like ports_dir)
   * Add fetch only option
   * Add -n option (only display commands, don't execute anything)
 * Port:
   * Getter for origin
   * Move targets to queue (not build directly)
   * Fix filtering (for dependencies) [actually remove, miss-placed]
   * Implement proper cleaning
   * Make install status to late initialise
   * Move internal references to external checks (install status)
   * Add clean target (and have a failed port clean itself...)
   * Use batch mode for all stages except config
   * Precleaning
   * Only clean port (don't do recursive cleaning)
   * Handles ports that do not exist
   * Move prepare/finalise to a private method?
   * Efficient version of pkg_version
   * Handler:
     * config:
       * Allow forcing of config options
     * fetch:
       * Add a cache for fetching
       * Check the -distfiles- and subdirs are correct
       * Add cache across ports (on a per file basis)
       * Handle fetching of the same source files (concurrency)
     * install:
       * Update port install status properly
       * Handle when a port is already installed
   * Separate package building
   * Add MAKE_JOBS flags
   * Support stalling of build (interactive)
  * DependHandler:
   * Allow constructor to initialise dependencies
   * Rename to be more descriptive
   * Add getters for dependencies and dependants (ports and/or field)
   * Do not do cyclic dependency allocation (or move to late)
 * queue:
   * Add installer queue
   * Handle stalling of a worker
   * Support loaded jobs
 * make:
   * Handle pipes properly
   * Add logging support (pipe redirection)
   * Condense functionality
   * Fix no opt command displaying
 * Converge common functionality into Monitor (such as start time)
 * Rename TargetBuilder to StageBuilder
 * Move fetch_builder to subclassed of StageBuilder
 * Create progress monitor for the build process (aka top mode)
   * add user interaction
 * Create ordering logic for building (and resolving dependents)
 * Remove make_target from global import
 * Fix PORTSDIR not having a trailing /
 * Rename all Popen return status to 'SUCCESS'
 * Cleanup the use of tools
 * Improve monitor interface, move to classes
 * Allow KeyboardInterrupt to terminate program
 * Move exit handling code to own module
 * Create proper statistical handling of data (with easy collection methods)
 * Implement proper system shutdown
   * Create interrupt handlers
   * Create exit handlers
 * signal based updates of builders and queues:
   * make top monitor use signals
 * fully implement setup (distutils) script (distutils/apiref)
 * procedures
 * improve port/mk.py
 * unset environ flags from make (gmake)
 * only reset port if it has progressed beyond DEPEND
 * spell check
 * s/ependen/ependen/g
 * Split port into its subcomponents:
   * Port
   * PortCache
   * DependHandler
   * System interface (and apply appropriate abstraction)
   * Develop proper API for the library
 * PortCache:
   * Minimise duplicate job requests
 * Fix pkg_version (when some data has corrupted)
 * Add pause and resume support
 * Add documentation FetchLock
 * Make sure ports configured before creating DependHandler
 * Use relative imports
 * Add recursive command:
   * config
   * fetch
   * install
   * package
 * StageBuilder:
   * Handle stage stalls
   * Support loaded jobs
 * Queues:
 * Ensure graceful handling of failed ports (does not appear to work)
 * Make config_builder API compatible with the other Builders?
 * Catch exceptions from callback (all callbacks)
 * Use port's stage_builder (than calling directly)
 * Extend port's stage_builder for non_blocking version
 * Add checks for already fetched files
 * Add labels for queues (active, queued, pending, failed)
 * Add failed queue
 * Add force config option
 * Prevent multiple fetches of the same file!!!
 * When segterm, make sure logging is done properly
 * profile (and make it easy to do so)
 * speed up port.mk.attr (reduce subcalls from make -V)
 * add package support (install from package)
 * create custom Popen class (without exceptions on bad fork)
 * Document all classes, methods, functions and (global|class) variables

0.1.2 - Milestone 2 (Dependent Handler):
 * Port:
   * Complete attribute tables and fixes
   * Proper dependent handling (mimic what ports does)
     * Create class for depends
     * Late allocation (with a check that port is config)
   * Create handlers for various make targets (stages):
     * config
       * Reget attr after config
     * fetch
     * build
     * install
       * Notify all dependants of our success
   * Refactor startup code for stages
     * All previous stages build (without failure)
     * Handle stage depends
   * Refactor cleanup code for stages
 * ports:
   * Make ports_dir settable from the env
 * make:
   * Add handler for environment variables
   * Generic handler for executing make targets
 * python based setup/build script
 * FreeBSD port
 * add `-a` options (aka `pkg_info -aoq`)
 * describe top interface

0.1.1 - Milestone 1 (Basic Port infrastructure):
 * Expand documentation for ports library
 * Add exception handling
 * Add logging
 * Add queuing logic
   * Filter multiple items (prevent duplicates?)
   * Handle different queue items (build, info)
 * Add a Port's cache (memory)
 * Port:
   * Add generic method for getting arbitrary items of information
   * Add port status
   * Add a port filter (for resolving information and calling dependants to be
     constructed)
 * Add a dependency resolver
 * queue: Provide defaults for queue sizes
