![]() |
|
|||||||
| FreeBSD Ports and Packages Installation and upgrading of ports and packages on FreeBSD. |
![]() |
|
|
Thread Tools | Display Modes |
|
|||
|
I am wondering if the result of this command is what was intended. I was building a port on my laptop as an upgrade from a previous version of the same port. I initially gave the command "make install clean" and realized that of course I already had an earlier version of the same. So I brought the command back up and changed it to "make deinstall clean", forgetting to remove the "clean" part.
The result was that the port was deinstalled and the work directory cleaned out. Ooops. Clearly, make did what I told it to do, I cannot fault it for not outsmarting my bad choice of operators. My question is whether "deinstall" and "clean" are ever a useful combination? From my vantage point, if I am running "deinstall" it is most likely because I am upgrading a package that I just built with make. Why would I want to "deinstall clean"? |
|
||||
|
deinstall = remove binary package from /usr/local, /etc, /var, and other locations where content was installed.
clean = delete build directory structure (object files and other content used during the build from source).
__________________
OpenBSD LiveCDs/LiveDVDs |
|
|||
|
Portupgrade or Portmaster along with pkg_cutleaves are
great packages for maintaining ports in FreeBSD. |
|
||||
|
With new ports I often run a `make fetch` for ahead stuff that will be huge, and normally run a `make build` followed by a `make install clean distclean`. Reason being if make runs while I'm away, I'll be able to check my shells history to figure out readily what popped a cork, the build or the install. With stuff that needs an update, I usually run a deinstall, a reinstall, and a clean distclean.
distclean means to clean out the distfiles (downloaded source, etc). Right now my laptop has over 2GB of distfiles leftover from recent upgrades. Normally I retain distfiles for only a few things: stuff that is occasionally hard to come by (flash, codecs), or things I may need to recompile later, and can't necessarily depend on the ability to fetch the code first if I end up fscked over (e.g. zsh)
__________________
My Journal Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''. |
|
|||
|
I have no usual way on updating, but use about 5 ways in general...
Code:
portmaster -d category/port category/port make checksum && make build && pkg_delete -f /var/db/pkg... && make install && yell [some alias which does a big more or equivalent in sequence, checking for changed dependencies from the last build] changes in dependencies.
__________________
using /LOOKAT/ with /var/db/pkg files and portmaster/aliases/pipes/find/grep to meteorically speedup port upgrades/installs... |
|
||||
|
One thing to watch out for is that the "deinstall" target uses the information in the current port Makefile ... it doesn't use the information in /var/db/pkg to remove the port. If you have version X.0 of the port installed, update the ports tree, which includes version Y.3, and you run "make deinstall" in there ... you may end up with files left behind and a lot of errors flashing by on the screen.
It's much safer to use pkg_delete -xi appname to uninstall apps. That always uses the information in /var/db/pkg/<port-version>/ to remove the app. This reflects what's already on the disk. "make deinstall" is really only useful for testing a port (make install; make deinstall). |
|
||||
|
Quote:
I do agree it would be safer to use "pkg_delete -i" to get confirmation first, though. |
|
||||
|
Hrm, you're right, /usr/ports/Mk/bsd.port.mk does use pkg_delete. Wonder when that got added ... (searches cvsweb)
Seems it's been there for several years. Guess it's time to update my tips file. Thanks for the pointer!! |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Opera Port - conflicting pkgs in "make install" | IronForge | OpenBSD Packages and Ports | 5 | 29th October 2009 04:10 AM |
| Fixed "xinit" after _7 _8, "how" here in case anyones' "X" breaks... using "nvidia" | jb_daefo | Guides | 0 | 5th October 2009 09:31 PM |
| "Thanks" and "Edit Tags". | diw | Feedback and Suggestions | 2 | 28th March 2009 11:06 PM |
| TIP:a nice way to make your pf more "stealth" | marc | OpenBSD Security | 2 | 30th January 2009 08:39 PM |
| New Kernel: "make depend" doesn't work | nihonto | NetBSD General | 9 | 23rd January 2009 08:02 PM |