From: Stefan Agner <stefan@agner.ch>
To: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Cc: Stefan Agner <stefan.agner@toradex.com>,
openembedded-core@lists.openembedded.org
Subject: Re: [RFC] opkg: avoid running postinst scripts twice when using systemd
Date: Thu, 14 Dec 2017 18:40:25 +0100 [thread overview]
Message-ID: <b0d062d27983acc3d7ec40061b661699@agner.ch> (raw)
In-Reply-To: <84080427-d60b-6527-b0f4-938fae379559@linux.intel.com>
On 2017-12-14 18:28, Alexander Kanavin wrote:
> On 12/14/2017 07:16 PM, Stefan Agner wrote:
>
>> Are you sure that rpm has no such facility? Maybe there is some other
>> mechanism around...
>
> You are welcome to find it. rpm does not distinguish between unpacking
> and configuring steps, and just does everything in a single
> installation step.
>
>> If rpm really does not handle it, would mean that delayed postinst would
>> have been broken back when we did not ship /etc/*-postinsts:
>> http://git.openembedded.org/openembedded-core/commit/meta/lib/oe/rootfs.py?id=5aae19959a443c6ac4b0feef10715c8acf3c6376
>
> Rpm had a special way to save postinstall scripts (due to the same
> problem I described just above), and still does, which means
> _save_postinsts() did (and does) nothing in rpm case.
>
Oh, I see, well that simplifies it, doesn't it? E.g.
# If package managers support postinsts and the package manager is
present on the
# rootfs, then it will handle postinsts just fine, no need to deploy
scripts again.
if delayed_postinsts and not runtime_pkgmanage:
self._save_postinsts()
And with that it will be as it used to be before the above commit, and
the way it should be.
--
Stefan
>> If there is special case handling needed it is not particularly nice due
>> to the additional condition.
>>
>> But IMHO still better, it can easily be explained in rootfs.py with a
>> comment like:
>>
>> # deb/ipk package management is able to handle postinsts on first
>> boot.
>
> Please no; the class in question is the generic Rootfs(), and I do not
> want to add packagemanager-specific clauses there.
>
> Alex
next prev parent reply other threads:[~2017-12-14 17:45 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-13 18:06 [RFC] opkg: avoid running postinst scripts twice when using systemd Stefan Agner
2017-12-13 18:29 ` Stefan Agner
2017-12-14 13:10 ` Alexander Kanavin
2017-12-14 13:11 ` Stefan Agner
2017-12-14 13:52 ` Alexander Kanavin
2017-12-14 13:59 ` Stefan Agner
2017-12-14 14:24 ` Alexander Kanavin
2017-12-14 14:41 ` Stefan Agner
2017-12-14 14:55 ` Alexander Kanavin
2017-12-14 14:57 ` Stefan Agner
2017-12-14 15:14 ` Alexander Kanavin
2017-12-14 16:46 ` Stefan Agner
2017-12-14 16:59 ` Alexander Kanavin
2017-12-14 17:16 ` Stefan Agner
2017-12-14 17:28 ` Alexander Kanavin
2017-12-14 17:40 ` Stefan Agner [this message]
2017-12-14 17:49 ` Alexander Kanavin
2017-12-14 18:04 ` Alexander Kanavin
2017-12-16 12:02 ` Stefan Agner
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=b0d062d27983acc3d7ec40061b661699@agner.ch \
--to=stefan@agner.ch \
--cc=alexander.kanavin@linux.intel.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=stefan.agner@toradex.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