From: "Peter Kjellerstedt" <peter.kjellerstedt@axis.com>
To: Jan Luebbe <jlu@pengutronix.de>,
"openembedded-core@lists.openembedded.org"
<openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core][PATCH 5/5] lib/oe/package_manager: don't try to rm /var/lib/opkg
Date: Fri, 3 Apr 2020 16:05:28 +0000 [thread overview]
Message-ID: <7e809c2614454c06b129484ce8c92e63@XBOX03.axis.com> (raw)
In-Reply-To: <20200401145805.6936-6-jlu@pengutronix.de>
> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-
> core@lists.openembedded.org> On Behalf Of Jan Luebbe
> Sent: den 1 april 2020 16:58
> To: openembedded-core@lists.openembedded.org
> Cc: Jan Luebbe <jlu@pengutronix.de>
> Subject: [OE-core][PATCH 5/5] lib/oe/package_manager: don't try to rm
> /var/lib/opkg
>
> As opkglibdir starts with a /, os.path.join will ignore
> self.target_rootfs, leading to an attempt to remove /var/lib/opkg.
>
> This only fails if it exists on the host, explaining why this remained
> undiscovered for long.
>
> Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
> ---
> meta/lib/oe/package_manager.py | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/meta/lib/oe/package_manager.py
> b/meta/lib/oe/package_manager.py
> index 2a5d7ef539e6..b0660411eaf5 100644
> --- a/meta/lib/oe/package_manager.py
> +++ b/meta/lib/oe/package_manager.py
> @@ -1796,8 +1796,7 @@ class DpkgPM(OpkgDpkgPM):
> open(os.path.join(target_dpkg_dir, "available"), "w+").close()
>
> def remove_packaging_data(self):
> - bb.utils.remove(os.path.join(self.target_rootfs,
> - self.d.getVar('opkglibdir')), True)
> + bb.utils.remove(self.target_rootfs + self.d.getVar('opkglibdir'), True)
Or you could change it to use oe.path.join() instead:
bb.utils.remove(oe.path.join(self.target_rootfs,
self.d.getVar('opkglibdir')), True)
> bb.utils.remove(self.target_rootfs + "/var/lib/dpkg/", True)
>
> def fix_broken_dependencies(self):
> --
> 2.26.0.rc2
//Peter
prev parent reply other threads:[~2020-04-03 16:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-01 14:58 [OE-core][PATCH 0/5] fix populate_sdk for package_deb Jan Luebbe
2020-04-01 14:58 ` [OE-core][PATCH 1/5] lib/oe/package_manager: make sure to not remove packages in apt install Jan Luebbe
2020-04-01 14:58 ` [OE-core][PATCH 2/5] lib/oe/package_manager: fix handling of last package Jan Luebbe
2020-04-01 14:58 ` [OE-core][PATCH 3/5] lib/oe/package_manager: collect provided package names when using debs Jan Luebbe
2020-04-01 14:58 ` [OE-core][PATCH 4/5] lib/oe/package_manager: avoid installing provided packages via apt Jan Luebbe
2020-04-01 14:58 ` [OE-core][PATCH 5/5] lib/oe/package_manager: don't try to rm /var/lib/opkg Jan Luebbe
2020-04-03 16:05 ` Peter Kjellerstedt [this message]
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=7e809c2614454c06b129484ce8c92e63@XBOX03.axis.com \
--to=peter.kjellerstedt@axis.com \
--cc=jlu@pengutronix.de \
--cc=openembedded-core@lists.openembedded.org \
/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