tech-pkg archive

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

Re: pkgin idea: warning about service restarts and database migrations



Thomas Klausner <wiz%NetBSD.org@localhost> writes:

> How about:
>
> UPGRADE_NOTICE+=	"<=4.5 Please foobar the nozzle before upgrading."
> UPGRADE_NOTICE+=	"<=5 Please remove the baz before upgrading."
>
> so that when you upgrade from a version before 4.5, both messages are
> displayed and if you upgrade from a version before 5, the second is
> displayed?

That seems ok.  I wonder if this should be more structured than split by
first space, but that seems ok.  I'd expect most conditions to be <, as
in <X when the change happens in X.0, but as long as < and <= both work,
people can write the conditions they think they need and we'll see how
it goes.

> At least by pkgin. Not sure if we want to teach pkg_add about this and
> how - it doesn't have any confirmations. Though we could theoretically
> make these warnings something that needs a -y flag for pkg_add before
> you can really update.

I don't see why pkg_add -u couldn't just print the warning for now, so
you get the upgrade and the warning.
Making pkg_add interactive is something I'm not sure we want to do, but
we can consider that later.

> Similarly:
>
> SUPERSEDES_NOTICE+=	"Please dump the database before the upgrade and restore it afterwards"
>
> which is shown if a SUPERSEDES was used to install this package
> instead of the one it replaces.

That seems reasonable also.  We lose the ability to warn depending on
what we came from and version, but jumping packages is sort of a logical
thing separate from within-package changes, and this seems like it will
cover almost all.

So overall I think this is fine.


Home | Main Index | Thread Index | Old Index