* [PATCH] devshell: Fix wrong PATH value if disabled ccache
@ 2025-01-08 15:22 Anton Mikanovich
2025-01-16 7:02 ` Uladzimir Bely
0 siblings, 1 reply; 2+ messages in thread
From: Anton Mikanovich @ 2025-01-08 15:22 UTC (permalink / raw)
To: isar-users; +Cc: Anton Mikanovich
In case USE_CCACHE is set to 0 the value of PATH_PREPEND env variable
will be empty. This makes PATH in devshell looks like:
:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
If building the packages having directories named the same as some
binaries used during the build (like dh-python with dh directory inside
its sources), it will fail with the following error:
...
debian/rules binary
dh binary
make: dh: Permission denied
make: *** [debian/rules:4: binary] Error 127
Make devshell expand PATH only if PATH_PREPEND is non-empty.
Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
meta/classes/dpkg-base.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
index c02c07a8..4468a49a 100644
--- a/meta/classes/dpkg-base.bbclass
+++ b/meta/classes/dpkg-base.bbclass
@@ -258,7 +258,7 @@ python do_devshell() {
apt-get -y -q update -o Dir::Etc::SourceList=\"sources.list.d/isar-apt.list\" -o Dir::Etc::SourceParts=\"-\" -o APT::Get::List-Cleanup=\"0\"; \
apt-get -y upgrade; \
{2}; \
- export PATH=$PATH_PREPEND:$PATH; \
+ if [ -n \"$PATH_PREPEND\" ]; then export PATH=$PATH_PREPEND:$PATH; fi; \
$SHELL -i \
'"
oe_terminal(termcmd.format(schroot, pp_pps, install_deps), "Isar devshell", d)
--
2.34.1
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20250108152256.851757-1-amikan%40ilbers.de.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] devshell: Fix wrong PATH value if disabled ccache
2025-01-08 15:22 [PATCH] devshell: Fix wrong PATH value if disabled ccache Anton Mikanovich
@ 2025-01-16 7:02 ` Uladzimir Bely
0 siblings, 0 replies; 2+ messages in thread
From: Uladzimir Bely @ 2025-01-16 7:02 UTC (permalink / raw)
To: Anton Mikanovich, isar-users
On Wed, 2025-01-08 at 17:22 +0200, Anton Mikanovich wrote:
> In case USE_CCACHE is set to 0 the value of PATH_PREPEND env variable
> will be empty. This makes PATH in devshell looks like:
>
> :/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
>
> If building the packages having directories named the same as some
> binaries used during the build (like dh-python with dh directory
> inside
> its sources), it will fail with the following error:
>
> ...
> debian/rules binary
> dh binary
> make: dh: Permission denied
> make: *** [debian/rules:4: binary] Error 127
>
> Make devshell expand PATH only if PATH_PREPEND is non-empty.
>
> Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
> ---
> meta/classes/dpkg-base.bbclass | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-
> base.bbclass
> index c02c07a8..4468a49a 100644
> --- a/meta/classes/dpkg-base.bbclass
> +++ b/meta/classes/dpkg-base.bbclass
> @@ -258,7 +258,7 @@ python do_devshell() {
> apt-get -y -q update -o
> Dir::Etc::SourceList=\"sources.list.d/isar-apt.list\" -o
> Dir::Etc::SourceParts=\"-\" -o APT::Get::List-Cleanup=\"0\"; \
> apt-get -y upgrade; \
> {2}; \
> - export PATH=$PATH_PREPEND:$PATH; \
> + if [ -n \"$PATH_PREPEND\" ]; then export
> PATH=$PATH_PREPEND:$PATH; fi; \
> $SHELL -i \
> '"
> oe_terminal(termcmd.format(schroot, pp_pps, install_deps), "Isar
> devshell", d)
> --
> 2.34.1
>
Applied to next.
--
Best regards,
Uladzimir.
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/5009820cd7ae08674a6da1859006adaf524c68dd.camel%40ilbers.de.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-01-16 7:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-08 15:22 [PATCH] devshell: Fix wrong PATH value if disabled ccache Anton Mikanovich
2025-01-16 7:02 ` Uladzimir Bely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox