Dports is an effort to use FreeBSD’s ports system as a base for DragonFly, and the pkg tool as a way to manage binary packages built from DPorts. This is complicated, so I’ll explain each part in order.

DPorts is a collection of files that map to existing FreeBSD ports, and contain any changes necessary to make that port also build on DragonFly. Many of those programs build without changes on DragonFly. DPorts builds from source.

pkg is used for package management, and is usable on FreeBSD, PC-BSD, and on DragonFly. The binary packages produced from building with DPorts can be installed from remote locations and managed separately using pkg, so that software upgrades and installation can be performed with binaries only. (It’s much faster that way.)

Every port seen in DPorts is known to build on DragonFly. A port is added only after it builds successfully, using poudriere as a bulk software tool. Ports are only updated to a newer version when that newer version builds, too, so once something arrives in DPorts, it should never break from being updated at some point in the future.

The user would first run "pkg update" to download the inventory from the PACKAGES. From there the user can browse the repository, install packages, etc. "pkg help" and "man pkg" has a wealth of information and much of the FreeBSD handbook is pertinent: [5.5 Using pkgng for Binary Package Management](http://www.freebsd.org/doc/en/books/handbook/pkgng-intro.html).

The average user will probably not build packages from source. However, it's easy to do and it can be done even when packages have already been pre-installed on the system. Common reasons to build from source are:

rename /usr/pkg so that the existing pkgsrc binary programs don’t get accidentally used while building DPorts, causing breakage. If anything goes wrong with DPorts when you are installing it, you can go back by removing all the DPorts packages with "pkg delete -ay" and renaming /usr/pkg back to normal. (Don’t confuse pkg, the management tool, with /usr/pkg, the normal installation directory for pkgsrc. ) For the installation of the base port files:

If you’ve already renamed your /usr/pkg directory, git won’t be in your path any more. You can instead download a tarball and unpack it, which also happens to be possible automatically via that same Makefile.

Downloading via git is fastest, so if you do need to use the tarball via make dports-download, build devel/git, delete /usr/dports, and then pull it again with make dports-create-shallow. This all comes from [John Marino’s Github site for DPorts](https://github.com/jrmarino/DPorts/#readme).

DPorts doesn’t use pkg_info, pkg_add, and the other tools traditionally seen on DragonFly for pkgsrc. Instead, package management is done with pkg. Use pkg info, pkg install, pkg remove, and pkg update to list, install, delete, and upgrade various packages on your system. Packages built from source or downloaded as prebuilt binaries are managed the same way, using these tools.

See some of the [other](https://mebsd.com/make-build-your-freebsd-word/pkgng-first-look-at-freebsds-new-package-manager.html) [writing](http://ivoras.net/blog/tree/2012-07-26.pkgng---best-thing-since-sliced-bread!.html) about pkg for FreeBSD for details on how it works.

Since DPorts doesn’t update a package until it gets a successful build, and installations are of successfully built binary packages, upgrades with prebuilt packages should always succeed. Since they’re binary, they should be fast. There’s a lot of ‘shoulds’ in this sentence, but these are reasonable suppositions.

Building from source works similar to ports and pkgsrc: cd into the appropriate program's directory, and type 'make'. 'make install' to install the software, 'make clean' to clean up work files, and so on. Use 'make config-recursive' if you want to set all the port's options, and the options of its dependencies, immediately instead of during the build.

Pkgsrc and DPorts shouldn’t be used at the same time, since one system’s packages may be at different versions but still get picked up during building for the other system. That’s about it for restrictions.

Browsing the Github repo will show you all listed packages. It changes as more packages are built. Changes from DragonFly builds are sometimes relevant to the original FreeBSD port, so there’s benefits for everyone here. The pkg tool can show which packages were actually built and available for your platform (e.g. pkg search, pkg rquery, etc.)

This is experimental; this will not necessarily replace pkgsrc. It's available in this release for further testing and feedback. Remember, this is a new project, so a willingness to deal with problems and contribute to fixes is necessary.