Re: Detecting install vs upgrade in postinst
On Mon, Jun 06, 2016 at 02:50:51AM +0100, Ben Hutchings wrote:
> On Sun, 2016-06-05 at 18:41 -0700, Josh Triplett wrote:
> > On Mon, Jun 06, 2016 at 02:22:18AM +0100, Ben Hutchings wrote:
> > > On Sun, 2016-06-05 at 12:22 -0700, Josh Triplett wrote:
> > > > [Please CC me on replies. Aside: in my previous mail, I set both
> > > > Mail-Followup-To and Reply-To to include myself. What mailer and mechanism did
> > > > you use to reply that didn't look at either of those headers?]
> > >
> > > Evolution, Reply to List (Ctrl-L).
> > Thanks; looks like that's https://bugs.debian.org/153244 .
> > > > Sounds great!
> > > >
> > > > Would that potentially make it easier to run via dpkg trigger, rather than
> > > > postinst, so that it does less duplicate work during an apt run that involves
> > > > multiple kernel-related packages?
> > >
> > > No, I think that would result in worse decisions about what the default
> > > kernel version should be.
> > Depends on the criteria for setting the default kernel version; ideally
> > that should always produce the same result for a given set of kernel
> > packages (assuming the user hasn't overridden it).
> If I agreed with that I wouldn't have asked the original question,
> would I? See <[🔎] firstname.lastname@example.org>.
That's part of why I was asking. Any time I see a maintainer script
that produces a non-idempotent result, I wonder if there's an idempotent
version that would produce reasonable results.
For instance, it sounds like you're saying "default to the newest
version" won't produce the results you want. However, would "default to
the newest version but let the user override that with arbitrary