Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Aug 2010 19:46:08 -0500
From:      Adam Vande More <amvandemore@gmail.com>
To:        Doug Barton <dougb@freebsd.org>
Cc:        ports@freebsd.org
Subject:   Re: i keep *trying* to move from portupgrade to portmaster
Message-ID:  <AANLkTimE8=bF6ib1DLikMCmsQ6%2BWnOgFkZz7VYXtKg-u@mail.gmail.com>
In-Reply-To: <4C5C88AE.4070500@FreeBSD.org>
References:  <AANLkTinBJo0M-5fL=ATeY0KXnjA3O-7=TOLMF0X6dzdC@mail.gmail.com> <4C5BC280.1070805@FreeBSD.org> <AANLkTinfXC%2B4J-ZVyUShqKNS3AgpXgwDtnMjVx=iSo9K@mail.gmail.com> <4C5BF352.5050004@dataix.net> <4C5C7DFF.8020400@FreeBSD.org> <AANLkTinmwuncNLGqMJRSVk3bnJWjkSRT%2B9atOuEn5haw@mail.gmail.com> <4C5C88AE.4070500@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Aug 6, 2010 at 5:11 PM, Doug Barton <dougb@freebsd.org> wrote:

> On 08/06/2010 15:03, Adam Vande More wrote:
>
> for pkg in /var/db/pkg/* ; do
>        pkg_create -b $pkg
> done
>

Yes, that is basically what I'm talking about, my script is a little fancier
now, prompts for directory with a default if you just want to use a standard
location.  Also can create directory or clean out an existing one.


> > have a python script that does this for me, but it would be easy enough
> > to use sh as well.  I do this because there have been too many times
> > something has broken during a port upgrade run and I need to revert
> > immediately and fix later.  I realize the backup package feature sort of
> > does the same thing, but reconciling the pre- and post- updates is a
> > tough thing for me.  Having a user defined directory all currently
> > installed ports can be put in is much easier to work with IMO. I know of
> > other people doing similar things because I shared my script on
> > questions- and got a few responses awhile ago.
>
> It sounds like you want to add the option(s) for "create and keep a
> backup package of an installed port" and/or "create a package of the new
> port" either to your command line, wrapper script, or a portmaster rc
> file. You could use the command line above to create an up to date
> repository of your currently installed packages, and the 2 options above
> would both make sure you can back out an update and keep your local
> package repo up to date automatically.
>

Yeah, I can and do this via a wrapper, it's certainly works well enough.
Maybe some triggers users could set to run pre- and post- postmaster runs?
But as you you say, easy enough to do with a wrapper.

I don't think pkg_create preserves the config files user edited, which
> is the precious stuff, but it preserves a lot of useless stuff.
> The following python script by Cyrille Szymanski may be more useful:
> http://www.lpthe.jussieu.fr/~talon/pkg_save.py<http://www.lpthe.jussieu.fr/%7Etalon/pkg_save.py>;
> It keeps the config files and the shared libraries.


Yes that's a great script for managing individual packages.  Mine is much
simpler and there is no need for backing up shared libs since your dealing
with a package "snapshot".  I also backup /usr/local/etc separately which is
where all the package config files I care about live.


Also


-- 
Adam Vande More



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTimE8=bF6ib1DLikMCmsQ6%2BWnOgFkZz7VYXtKg-u>