public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "Roberto A. Foglietta" <roberto.foglietta@gmail.com>
To: Henning Schild <henning.schild@siemens.com>
Cc: isar-users@googlegroups.com
Subject: Re: apt-mark hold package within postinst
Date: Sat, 24 Sep 2022 22:53:22 +0200	[thread overview]
Message-ID: <CAJGKYO60X7xh=RAPu7UiN++Wt8v7a357xtB0wppBpZgqERsPqQ@mail.gmail.com> (raw)
In-Reply-To: <20220923125648.798e010a@md1za8fc.ad001.siemens.net>

[-- Attachment #1: Type: text/plain, Size: 2627 bytes --]

Il Ven 23 Set 2022, 12:56 Henning Schild <henning.schild@siemens.com> ha
scritto:

> Am Fri, 23 Sep 2022 11:58:53 +0200
> schrieb "Roberto A. Foglietta" <roberto.foglietta@gmail.com>:
>
> > Il Ven 23 Set 2022, 11:22 Roberto A. Foglietta
> > <roberto.foglietta@gmail.com> ha scritto:
> >
> > > Hi all,
> > >
> > >  .deb repackaged should not upgrade with any external source so they
> > > should marked on hold. Easy but not possible to do within postinst
> > > obviously. Not in a straight way, at least. Am I wrong?
> > >
>
> I you rebuild you should add some suffix to PV
>
> CHANGELOG_V ?= "${PV}+roberto"
>
> During installation of isar itself your rebuilt package will win
> anyways. Make sure to add it to IMAGE_INSTALL instead of PREINSTALL, or
> make sure to have a bitbake DEPENDS if it comes in via a debian dep
> chain.
>
> But during lifetime any apt-get upgrade could replace yours when debian
> brings an update. To deal with that it is best to deploy a preferences
> file with some dpkg-raw configuration package.
>
> roberto-pin_0.1.bb:
> inherit dpkg-raw
> do_install() {
>   echo -e "Package: *\nPin: version *+roberto*\nPin-Priority: 1000" >
>     ${D}/etc/apt/preferences.d/${PN}
> }
>
> With this all packages that have the roberto suffix will become
> non-replaceable ... unless someone uses that same suffix.
>
> Generally you want to try and mainline all your changes to avoid local
> rebuilds.
>
> Another trick would be an empty package that conflicts with anything
> greater than "${PV}+roberto", that should also prevent updates. Not
> sure which way is better.
>
> We mostly build images that are replaces as a whole and will not get
> much "apt-get" during their life. Note that kernel updates with apt-get
> will not easily work in an isar built image. It will depend on your
> bootloader whether it might work, and you might have to add scripts
> that update bootloader configs after kernel install.
>

Dear Henning,

 first of all, thank you for your explanation. I think about it and I
arrived to the conclusion that your solution is good but top definitive for
my need/goals.

The problem is 1. that even wintout any update available the original
packages are seen as updates and 2. I wish to avoid that the user upgrade
the repackaged packages installing the dependencies I removed.

However, I am not interested in make their upgrade difficult. Probably, I
will keep only hold the packages at the installation but even remove the
holding as configuration.

Just a way to avoid that kids break up the system just with a basic admin
operation without further complications.

Best regards, R-

[-- Attachment #2: Type: text/html, Size: 3765 bytes --]

  reply	other threads:[~2022-09-24 20:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-23  9:22 Roberto A. Foglietta
2022-09-23  9:58 ` Roberto A. Foglietta
2022-09-23 10:56   ` Henning Schild
2022-09-24 20:53     ` Roberto A. Foglietta [this message]
2022-09-26  7:09       ` Henning Schild
2022-09-26  7:53         ` Roberto A. Foglietta
2022-09-26 12:27           ` Henning Schild

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJGKYO60X7xh=RAPu7UiN++Wt8v7a357xtB0wppBpZgqERsPqQ@mail.gmail.com' \
    --to=roberto.foglietta@gmail.com \
    --cc=henning.schild@siemens.com \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox