Annotation of wikisrc/pkgsrc/how_to_save_your_packages.mdwn, revision 1.1

1.1     ! mspo        1: You can easily save all of your currently installed NetBSD packages for use on other machines by using pkg_tarup. Here's what to do.
        !             2: 
        !             3: 1. Install pkg_tarup from pkgsrc. ie.. cd /usr/pkgsrc/pkgtools/pkg_tarup ; make install (as root)
        !             4: 2. Now you can now use pkg_tarup to create a tarball package from any currently installed package. Just do pkg_tarup [packagename] 
        !             5: 
        !             6: Here is an example of how powerful this technique can be. With only a few lines of shell code we can put all the installed packages into a directory:
        !             7: <pre><code>
        !             8: cd /var/tmp
        !             9: mkdir packages
        !            10: cd packages
        !            11: for PKGNAME in `pkg_info -e "*" | sort`; do
        !            12:     echo "Packaging $PKGNAME"
        !            13:     pkg_tarup -d "." "$PKGNAME" || echo "WARNING: Packaging $PKGNAME failed." 1>&2
        !            14: done
        !            15: </code></pre>

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb