Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Nov 1999 23:10:46 +0000
From:      Mark Ovens <mark@ukug.uk.freebsd.org>
To:        TrouBle <trouble@netquick.net>
Cc:        Jonathon McKitrick <jcm@dogma.freebsd-uk.eu.org>, "freebsd-questions@FreeBSD.ORG" <freebsd-questions@freebsd.org>
Subject:   Re: Updating installed PORTs
Message-ID:  <19991117231042.F316@marder-1>
In-Reply-To: <383326B1.9BD0AF94@netquick.net>
References:  <Pine.BSF.4.02A.9911172143291.74788-100000@dogma.freebsd-uk.eu.org> <383326B1.9BD0AF94@netquick.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Nov 17, 1999 at 05:05:37PM -0500, TrouBle wrote:
> DO IT NOW
> 
> 
 [snip]

> bastille# pkg_version
> C                    ?
> IglooFTP             =
> Mesa                 =
> ORBit                <
> amanda               ?
> apache+php+mod_ssl   ?
> autoconf             =
> automake             =
> bash                 ?
> bzip2                =
> cvsup-bin            =

[snip]

Even better, try the ``-v'' option:

marder-1# pkg_version -v
31upgrade-1999.03.08        <   needs updating (index has 1999.05.20)
32upgrade-1999.05.20        =   up-to-date
C-Forge-1.3e-2              ?   unknown in index
XFree86-3.3.3.1,3.3.5       ?   multiple versions (index has 3.3.5)
aalib-1.2                   =   up-to-date
apache-1.3.4                <   needs updating (index has 1.3.9)
bochs-990925a               <   needs updating (index has 991004a)
calctool-2.4.13             =   up-to-date
cvsup-16.0                  =   up-to-date
ddd-3.1.3                   <   needs updating (index has 3.1.6)
docbook-1.0,3.0,3.1         ?   multiple versions (index has 1.0,241,3.0,3.1
dsssl-docbook-modular-1.44  =   up-to-date
egcs-devel-19990524         ?   unknown in index
emacs-20.3                  ?   multiple versions (index has 19.34b,20.4)
fetchmail-4.7.0             <   needs updating (index has 5.1.1)
freetype-1.2                =   up-to-date

[snip]

and if you add Nik's patch (http://www.freebsd.org/~nik/pkg_version.diff
& http://www.freebsd.org/~nik/pkg_version.1.diff) you have ``-c''
as well, which generates the shell commands to update your system:

marder-1# !!c
pkg_version -vc
#
#  31upgrade
#  needs updating (index has 1999.05.20)
#
cd /usr/ports/misc/31upgrade
make
pkg_delete -f 31upgrade-1999.03.08
make install

#
#  C-Forge-1.3e
#  unknown in index
#
pkg_delete -f C-Forge-1.3e-2

#
#  XFree86
#  multiple versions (index has 3.3.5)
#
cd /usr/ports/x11/XFree86
make
pkg_delete -f XFree86-3.3.3.1,3.3.5
make install

[snip]

Note that in the output above the entry for C-Forge only has the
pkg_delete command. There was a bug in Nik's patch that output a
``make'' for non-existent ports, but it was for the previous port
listed:


# 
#  31upgrade
#  needs updating (index has 1999.05.20)
#  
cd /usr/ports/misc/31upgrade
make
pkg_delete -f 31upgrade-1999.03.08 
make install

# 
#  C-Forge-1.3e
#  unknown in index
#  
cd /usr/ports/misc/32upgrade  <<<<===================
make
pkg_delete -f C-Forge-1.3e-2
make install

Apply the patch below (after Nik's patch) to just get the (correct)
pkg_delete command:

*** /usr/local/bin/pkg_version.safe     Thu Nov  4 21:16:30 1999
--- /usr/local/bin/pkg_version  Thu Nov  4 21:15:32 1999
***************
*** 252,264 ****
                $Comment = "Comparison failed";
            }
        }
      }
      else {
        $versionCode = "?";
        $Comment = "unknown in index";
-     }

!     write;
  }

  exit 0;
--- 252,267 ----
                $Comment = "Comparison failed";
            }
        }
+
+     write;
      }
      else {
        $versionCode = "?";
        $Comment = "unknown in index";

!       $~ = "NOEXIST_COMMANDS" if $ShowCommandsFlag;
!       write;
!     }
  }

  exit 0;
***************
*** 299,304 ****
--- 302,323 ----
  pkg_delete -f @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
                $packageNameVer
  make install
+
+ .
+   ;
+
+ # Report that includes commands to update program (-c flag)
+ format NOEXIST_COMMANDS =
+ @<
+ $CommentChar
+ @< @<<<<<<<<<<<<<<<<<<<<<<<<
+ $CommentChar, $packageName
+ @< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+ $CommentChar, $Comment
+ @<
+ $CommentChar
+ pkg_delete -f @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+               $packageNameVer

  .
    ;


-
STATE-OF-THE-ART: Any computer you can't afford.
OBSOLETE: Any computer you own.
________________________________________________________________
      FreeBSD - The Power To Serve http://www.freebsd.org
      My Webpage http://ukug.uk.freebsd.org/~mark/
mailto:mark@ukug.uk.freebsd.org              http://www.radan.com



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




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