List Info

Thread: Automatic packages maintenance




Automatic packages maintenance
user name
2006-05-13 01:06:11
Hi everyone,

I am looking for advises...

I am planning to write some script to automate the
maintenance of packages on a machine.
The goal is to have always the latest version of packages
installed if possible, otherwise fallback to the last stable
version.
I am using pkg_chk, and therefore I have a list of the
packages I want to have and maintain on my machine in a
pkgchk.conf

Here is what I would like to do in this script :
Using pkgsrc-current :

1- Remove packages that are installed and not in ( or needed
by any packages in ) pkgchk.conf (Optional)

2- Add packages that are in the list and not installed
("missing" packages) and update packages that
are in the list and need to be updated

3- If some packages fails, and if a stable pkgsrc hierarchy
exists on the system, I want to use the last stable branch
instead->

Using pkgsrc-stable:

4- For each packages that update has failed before, I want
to install from binary if available, otherwise build and
install from source.


SO

1- I didnt find any way to do that with pkg_chk... seem like
pkg_chk -r will also remove packages which have a mismatched
version...
is there a way to do that that I am not aware about ?

2- With pkg_chk -au I add missing packages and update
packages installed, but I just want to update the one listed
in pkgchk.conf

3- To have pkgsrc and pkgsrc-stable installed and not having
any conflict, I guess I have some variable to set around for
the packaging tools to know what to do, isnt it ?

4- Which variable do I have to set to build a package
everytime I do a make update, or a make install ? will the
make install use package if it is available, or do I have to
implement the mechanism myself somehow ?


Also I am aware there is few ways to do what I want...
Please tell me if you think it will be better to do that in
another way.
Has someone already achieve something similar and has a
solution he is quite happy with ??

Thanks a lot for your help !

;)

--
Asmodehn

Automatic packages maintenance
user name
2006-05-13 13:40:32
Asmodehn wrote:
> Hi everyone,
> 
> I am looking for advises...
> 
> I am planning to write some script to automate the
> maintenance of packages on a machine. The goal is to
have
> always the latest version of packages installed if
possible,
> otherwise fallback to the last stable version. I am
using
> pkg_chk, and therefore I have a list of the packages I
want
> to have and maintain on my machine in a pkgchk.conf

I've been using pkgmanager (1) for some weeks now, and like
it a 
lot. I don't think it does everything on your list but
maybe it 
could be a starting point for you.

(1) http://www.scode.org
/pkgmanager/
Automatic packages maintenance
user name
2006-05-13 14:43:21
You are in an area where pkgsrc is a bit weak.  However the
fundamentals of safe small operations are very strong.

I have two bits of advice:

  Don't try to mix pkgsrc-head and pkgsrc-stable.   It
might make
  sense to have two package trees installed, but that seems
hard.

  Use some mechanism to build the new package before tearing
down the
  old ones.

The second bit should be more automated.  I'd recommend
using pkg_comp
and then pkg_chk within the chroot, using -r to remove all
mismatched
packages, and then -a to build back to your config file. 
Then when
all is built you can binary update in the running system.




-- 
        Greg Troxel <gdtir.bbn.com>
Automatic packages maintenance
user name
2006-05-14 03:51:29
Well I had a look at pkgmanager...

And I think the feature I was trying to get working on my
pkgsrc is this one : 
- Full binary package backup support to facilitate rolling
back a failed upgrade
Which is on the todo list... I am waiting then 

I understand why mixing stable and current pkgsrc is a bad
idea, but that s how I got my packages working on my fresh
NetBSD install when they didnt want to build properly from
current...I guess I was lucky to do that without problems

I thought that building from stable, then building from
current, and installing current if it worked, otherwise
stable, would do the trick...

I ll think about another way to do that then...
And about pkg_comp, I guess it looks more like a tool for
debugging install process, instead of an "enduser
pkgsrc tool", thats why I didnt use it...

Thank you for your help anyway ;),

--
Asmodehn
[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )