Subject: Re: install and update together
To: None <tech-pkg@netbsd.org>
From: Georges Heinesch <geohei-ml@geohei.lu>
List: tech-pkg
Date: 06/02/2001 00:50:00
Quoting Dr. Rene Hexel (31-May-01 06:57:41):

> Georges Heinesch wrote:

>> Problem summary: How shall I install a package A (not yet
>> installed), which depends on a package B (installed), if this
>> package B requires an update?

>   Solution 1: "make update" for package B, then "make install" for
> package A (It's probably a good idea to "make clean
> CLEANDEPENDS=YES" thereafter).

Is there a possibility to find out that 1. package B is required by
package A and that 2. package B needs an update; all tis before the
actual installation of package A is commenced?

>   Solution 2: with the default settings of DEPENDS_TARGET and
> UPDATE_TARGET, you can simply "make update" package A, even if it's
  ^^^^^^^^^^^^^
  I didn't find any information about "UPDATE_TARGET" (checked
  Packages.txt and several pkg man pages).

> not installed yet.  If package A requires a newer version of package
> B than you currently have installed, then package B (and all
> packages depending on package B) will be updated.

Here the "make update":

----- cut here -----
# cd /usr/pkgsrc/pkgtools/pkglint
# make update
pkg_info: No matching pkg for pkglint-[0-9]*.
===> Deinstalling for pkglint-2.54

    What is deinstalled here?
    Nothing regarding pkglint is installed yet!

===> Validating dependencies for pkglint-2.54
===> Extracting for pkglint-2.54
===> Required installed package perl>=5.0: perl-5.6.0nb5 found

1. package required by pkglint-2.54 is found. Good.

===> Required package perl-mk-1.1: NOT found
===> Verifying update for ../../pkgtools/perl-mk
===> Deinstalling for perl-mk-1.1
Running PKG_DBDIR=/var/db/pkg /usr/sbin/pkg_delete -r perl-mk-1.0

    Here, the reason for the deinstallation is clear.
    A previos version of perl-mk (1.0) _was_ installed.
    Hence, perl-mk-1.0 must be deinstalled.

===> Validating dependencies for perl-mk-1.1
===> Extracting for perl-mk-1.1
===> Required installed package perl-{5.0*,5.6.0nb[12],base-5.[6-9]*}: perl-base-5.6.0nb1 found
===> Installing for perl-mk-1.1
[...]
===> Registering installation for perl-mk-1.1
perl-mk-1.1 requires installed package perl-base-5.6.0nb1

    Now, all the packages below require perl-mk-1.1.
    Therefore, they are deinstalled and reinstalled.

[...]
----- cut here -----


-- 
Cu  Georges Heinesch, Luxembourg
    geohei@geohei.lu
    http://www.geohei.lu
    PGP RSA & DH/DSS public key on request and on public servers

... there are no bad crews, just bad leaders ...