On Thursday 23 July 2009 22:55:07 Daniel O'Connor wrote: > On Wed, 22 Jul 2009, John Baldwin wrote: > > > How many of those 800 ports are actually necessary and used? > > > It would be better to get generate a complete list of your > > > installed ports, use pkg_deinstall or pkg_delete to remove > > > all ports, and then selectively re-install ports that are > > > actually used. > > > > Xorg takes up ~200 ports alone (not including dependencies like perl, > > etc.) since the Xorg decided release engineering was too hard. Throw > > in things like KDE, OOo, Firefox, etc. for a desktop and you can get > > a fairly high package count. :-/ > > Ooh I only have 1315 on mine, but a 1.4GHz Pentium-M is pretty slow > these days :( > > Perhaps there needs to be a psuedo port for 'base' (or a few) so that > you can easily determine if you have already upgraded something against > the new base you installed. > > Certainly I find it difficult to leave my laptop on for long enough to > recompile everything when I upgrade -current (since I actually use it > for work), and portupgrade -fa has no way to tell if it's already done > something. If there were pseudo base ports you could tell it to force > upgrade everything that depends on the old base port and it would DTRT. I wrapped portmaster, since -af has the same problem when something screws the build (mostly plist problems and $me wanting backup packages, but also classics like using sudo as PM_SU_CMD and trying to reinstall it). Basically, I made a list of all the installed ports and sorted dep order, then called portmaster -u for every port and if successful put an empty file +PM_DONE in /var/db/pkg/<pkgname>/. On a restart the ports containing a +PM_DONE file are skipped. If the entire process finishes successfully, all +PM_DONE files are removed. I briefly looked into building it into portmaster, but that looked to take longer then I had time for. The main loop is at the bottom, perhaps Doug likes the idea and has the time to integrate it. > I, of course, have no patches for such a thing :) > > I've deleted /usr/local & /var/db/pkg in the past, it can be very > therapeutic :) However it is not so good when your mp3 collection is > mounted on /usr/local/mp3 and you forgot to unmount it first.. :( Or your websites in /usr/local/www, your database in /usr/local/pgsql or your squid conf and cache in /usr/local/squid. Especially when pkg_delete -af does the right thing and leaves all this in tact, I don't see the value of rm -rf /usr/local, other then a few minutes on a process that's likely going to be several hours or days. -- Mel mark_done() { local _name _name=$1 if test -d ${PKG_DBDIR}/${_name}; then ${SUDO} ${TOUCH} ${PKG_DBDIR}/${_name}/+PM_DONE else return 1; fi return 0; } for origin in ${LIST}; do pkgname=$(make -C ${PORTSDIR}/${origin} -V PKGNAME) if test -f ${PKG_DBDIR}/${pkgname}/+PM_DONE; then echo "Already done: ${pkgname} (${LOOP}/${TOTAL})" else echo "===> Building ${pkgname}" portmaster -u ${PORTSDIR}/${origin} if test $? -eq 0; then mark_done ${pkgname} || safe_abort else FAILED=$((${FAILED} + 1)) echo "Failed, continue? [n]" read CONT case "${CONT}" in [yY]|[yY][eE]|[yY][eE][sS]) echo "===> Marking state as done" mark_done ${pkgname} || safe_abort ;; *) break;; esac fi fi done if test ${FAILED} -eq 0; then echo "===> Removing state files" for FILE in ${PKG_DBDIR}/*/+PM_DONE; do ${SUDO} /bin/rm ${FILE} done echo "===> Removing origin list" /bin/rm ${LISTFILE} fiReceived on Fri Jul 24 2009 - 05:35:58 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:52 UTC