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 15:41:54 +0100 [thread overview]
Message-ID: <37d7ff0a6470bb60cf62d73585b3c3f8@agner.ch> (raw)
In-Reply-To: <2e3178d0-c6eb-97f8-c524-bcee54091397@linux.intel.com>
On 2017-12-14 15:24, Alexander Kanavin wrote:
> On 12/14/2017 03:59 PM, Stefan Agner wrote:
>
>> That at least contradicts my testing with opkg/ipk.
>>
>> If /etc/ipk-postinsts is not there and /var/lib/opkg/status is there
>> (package management installed), then run-postinst runs "opkg configure",
>> which takes care of postinsts just fine.
>>
>> Reading the code at least let me to believe that this is true for deb as
>> well.
>>
>> Not sure how it works with rpm though. How do you came to the conclusion
>> that this only happens when using rpm?
>
> I think there was confusion between what happens at image creation
> time vs what happens at first boot :)
>
> So what's the issue again that your RFC patch doesn't resolve? I read
> your followup and I still don't get it.
I think removing the Opkg first boot systemd service (as the initial
patch does) is the correct first step.
However, it currently still leads to a second copy of the postinst
scripts in /etc if package management is enabled.
I am pretty sure that adding if delayed_postinsts and not
runtime_pkgmanage: should resolve the problem for ipk/deb fully: With
that run-postinsts will run "opkg configure"/"dpkg --configure -a"
respectively when package management is installed, and those command
will run all postinst correctly.
So for me the only question is what will happen with rpm... Will package
managment do something on first boot? And if yes, what mechanism?
If rpm needs /etc/*-postinsts even with package management, then maybe
we need to add:
if delayed_postinsts and (not runtime_pkgmanage or rpm):
self._save_postinsts()
--
Stefan
next prev parent reply other threads:[~2017-12-14 14:46 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 [this message]
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
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=37d7ff0a6470bb60cf62d73585b3c3f8@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