Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Jul 2001 20:01:45 +0300
From:      Maxim Sobolev <sobomax@FreeBSD.org>
To:        "R. Lahaye" <lahaye@users.sourceforge.net>
Cc:        ports@FreeBSD.org
Subject:   Re: FreeBSD Port: scigraphica-0.7.0
Message-ID:  <3B546F79.3A1E61F@FreeBSD.org>
References:  <3B531569.2CD5F82B@users.sourceforge.net> <3B53D914.F11E911A@FreeBSD.org> <3B53DFF1.F6F775D5@users.sourceforge.net> <3B540B98.DCE215A9@FreeBSD.org> <3B54115C.6E8CF1B2@users.sourceforge.net> <3B541487.37C8D01A@FreeBSD.org> <3B54606B.DA194EA@users.sourceforge.net>

next in thread | previous in thread | raw e-mail | index | archive | help
"R. Lahaye" wrote:

> Maxim Sobolev wrote:
> >
> > "R. Lahaye" wrote:
> >
> > > In a nutshell once again:
> > >
> > > I create a file  "/some/directory/ports-supfile",
> > > add the above lines in it. Then call
> > >
> > >    # cvsup -L2 /some/directory/ports-supfile
> > >
> > > Is that 100 percent save?
> >
> > Yes, it is safe. This should not touch any source or system files - only update
> > content of /usr/ports.
>
> Thanks, I've done that. Woow, downloaded a whole lot of stuff.
>
> I'm now pondering: If I install an updated port once again, does that
> require any preparations to avoid cluttering of old installed files?
>
> 1) Can I provide a special argument for updating, such as "make update"
>    or so, that would perform something like:
>        # pkg_delete some_software-[present installed version]
>        # make
>        # make install // install updated version
>
>    In linux-rpm-language that would say "rpm -U <updated_rpm_file.rmp>",
>    which removes the old ones, and replaces that with the updated RPM.
>
> 2) If a newly updated software-port requires port_foo-1.5, but I have an older
>    port_foo-1.1, then what will happen?
>    Will I end up with both port_foo's installed, or does the make automagically
>    remove the old one and install the new one on the fly.
>
> I'm just worried that by doing all those make's when updating the ports, that I will
> end up with more and more piles of cluttered files from outdated ports.
>
> Please bear in mind that I'm a FreeBSD user for little over a week now (coming from
> Linux). I'm still trying to figure out how FBSD software is organized.
>
> Thanks for your help. I appreciate that very much!

Unfortunately in FreeBSD there is no clear way to upgrade all installed packages at
once. Usually I do the following:

1. Update ports tree to the latest version:
# cvsup -L2 ports-supfile

2. Display packages that can be updated:
# pkg_version | grep -v =
foo-1.0
bar-2.0

3. Delete outdated packages. In some cases it may fail because there are some other
packages that depend on packages which you are trying to delete, in this case record
names reported by the pkg_delete and delete them as well
# pkg_delete foo-1.0 bar-2.0
pkg_delete: package `foo-1.0' is required by these other packages
and may not be deinstalled:
baz-1.0
gee-7.8
# pkg_delete foo-1.0 baz-1.0 gee-7.8
#

4. Recompile/reinstall packages that you deleted as usually. Before doing that ensure
that you don't have any stale "work" directories in your ports tree - they may clobber
the build, usually something like the following does the trick:
# find /usr/ports -type d -name work | xargs rm -rf
# cd /usr/ports/foo/bar ; make install clean
[repeat N times :) ]
# cd /usr/ports/fooN/barN ; make install clean

The procedure above may seems complicated, but it is pretty straightforward if you will
get used to it. Also there are some tools (e.g. sysutils/portupgrade) that supposed to
make the process easier, however I never tried them, so I can't comment on their
usability.

-Maxim


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B546F79.3A1E61F>