Date: Sun, 12 Sep 2010 10:36:06 -0400 From: Michael Powell <nightrecon@hotmail.com> To: freebsd-questions@freebsd.org Subject: Re: Upgrading packages - portupgrade confusion Message-ID: <i6ioe8$tts$1@dough.gmane.org> References: <4C8C0110.20801@gmail.com> <i6hb6t$s10$1@dough.gmane.org> <4C8CBADC.3070904@gmail.com> <i6iicg$9b3$1@dough.gmane.org> <4C8CDAAD.2070606@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Kaya Saman wrote: [snip] > The thing I don't quite understand though is that if the ports tree >> gets refreshed, do the packages get upgraded or will I need to >> rebuild them?? > > You have to rebuild them. > > Does this apply to ports too?? Yes. A package is just a port that someone has compiled into a pre-built binary package for use with pkg_add. These binary packages are placed on ftp servers where pkg_add may download from and install. A port is just you doing the compiling locally yourself using the ports system. The installed result is the same, except for one thing. When a package is built some build options may have been selected as defaults while others were excluded. When you build the port locally you have complete control over all options. > "portupgrade -a" or "portmanager -u" depending on what application you > are using. Switching between multiple port maintenance applications is > not the worse thing you could do; however, I would not recommend it as > an everyday occurrence. > > > Ok so "portupgrade -a" upgrades all ports according to the manual. > [snip] > Ok, so if I understand correctly now is that the csup command refreshes > the ports tree while portupgrade upgrades the actual port itself.... Update the ports tree first! csup -L 2 ports <- this file "ports" is a supfile. An example of a supfile was included in a previous mail. More detailed info in the Handbook. > eg: > > cd /usr/ports/*/nano > make install clean cd /usr/ports/editors/nano/ make install clean This installs nano when it was not installed before. The manual method to update would be: (with a freshly updated ports tree) cd /usr/ports/editors/nano/ make && make deinstall && make reinstall > although not the case but say if this was to build version 1.8 of the > Nano text editor, running: > > portupgrade nano > > would upgrade the installed version to 1.9?? Yes - provided you had installed portupgrade and are using an up to date ports tree. If your ports tree is as old as the old version of nano then as far as FreeBSD is concerned it does not know of any new version. Refreshing your ports tree is where that information comes from. The utility of automation with portupgrade really comes into play when you are trying to update more than one port. One port at a time can be done manually as in the above example, but that quickly becomes tiresome when there are many. Sometimes a port may provide a shared library which many other ports depend upon. Updating that library may cause dependent apps to break. In such a situation portupgrade can recurse and rebuild all apps depending on that library so they will be linked against the new. Another tip: Whenever there are situations which can get sticky most of the time notes are placed into a file containing instructions on how to deal with the problem. Get into the habit of always reading the UPDATING file located in /usr/ports so you will know about these *before* updating. [snip]
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?i6ioe8$tts$1>