tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Script pkg_tsort



I wrote:
> 
> Other solution: using also unionfs for a fake copy of the system and
> playing with PREFIX in order to compile in the subdirectory populated
> and trying to upgrade the list of packages as given by pkg_tsort.
> 
> I'm planning to play a little with the latter this week to see if it
> can work (avoiding the need to install a complete image of the system to
> chroot).

Well, PREFIX can not be defined in mk.conf neither manually.

But to record here a step towards what I need:

One can simply create two empty dirs:

$ mkdir -p /some/alt/pkg/dir
$ mkdir -p /some/alt/pkgdb/dir
$ pkg_admin -K /some/alt/pkgdb/dir fetch-pkg-vulnerabilities -u

and the assuming that in /etc/mk.conf LOCALBASE  or PKG_DBDIR are not
set inconditionnally:

$ cd /usr/pkgsrc/some/pkg
$ PATH="/bin:/sbin:/usr/bin:/usr/sbin"
$ make LOCALBASE=/some/alt/pkg/dir PKG_DBDIR=/some/alt/pkgdb/dir install

and then you have a pristine pkg environment and can see if updated
packages will build or not.

This combine with the pkg_tsort list can prepare the update, as long as
the pkg_tsort gives the information about what action has to be done for
packages:

- P: Preserve (special case for kept: kept by choice because +PRESERVE)
- K: Keep; already up-to-date or compatible with new versions (a
		pkg_tsort flag);
- U: Update;
- D: Delete;
- C: Create (not existing).

pkg_tsort giving too the status of the present or updated version:
VULNERABLE or OK, so that one can choose whether to update allowing
vulnerable or keep not vulnerable.

I will need to investigate a bit further but I think this can be
achieved without too much work (diving in the bsd.*.mk is a daunting
task...).
-- 
        Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
                     http://www.kergis.com/
                       http://www.sbfa.fr/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C


Home | Main Index | Thread Index | Old Index