deb-dl-dir: Fix isar-apt packages checking on export

Message ID 20260610063806.4010352-1-amikan@ilbers.de
State Superseded, archived
Headers show
Series deb-dl-dir: Fix isar-apt packages checking on export | expand

Commit Message

Anton Mikanovich June 10, 2026, 6:38 a.m. UTC
To use variable inside of lock section it should be exported.
Otherwize it will be empty and isar-apt packages checking logic will
not work.

Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
 meta/classes-recipe/deb-dl-dir.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

MOESSBAUER, Felix June 10, 2026, 7:29 a.m. UTC | #1
On Wed, 2026-06-10 at 09:38 +0300, Anton Mikanovich wrote:
> To use variable inside of lock section it should be exported.
> Otherwize it will be empty and isar-apt packages checking logic will
> not work.

Does this mean it was incorrect before our refactorings?
If so, please add a fixes tag.

> 
> Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
> ---
>  meta/classes-recipe/deb-dl-dir.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/classes-recipe/deb-dl-dir.bbclass b/meta/classes-recipe/deb-dl-dir.bbclass
> index 620ddc96..fde4fc44 100644
> --- a/meta/classes-recipe/deb-dl-dir.bbclass
> +++ b/meta/classes-recipe/deb-dl-dir.bbclass
> @@ -149,7 +149,7 @@ deb_dl_dir_export() {
>      export owner=$(id -u):$(id -g)
>      mkdir -p "${pc}"
>  
> -    isar_debs="$(${SCRIPTSDIR}/lockrun.py -r -f '${REPO_ISAR_DIR}/isar.lock' -c \
> +    export isar_debs="$(${SCRIPTSDIR}/lockrun.py -r -f '${REPO_ISAR_DIR}/isar.lock' -c \
>      "find '${REPO_ISAR_DIR}/${DISTRO}' -name '*.deb' -print")"

We are running in a non ancient shell, so the quotes on the right side
of the assignment are optional (better remove them to avoid the double
quoting).

isar_debs=$(...) instead of isar_debs="$(...)"

Felix

>  
>      flock "${pc}".lock sudo -Es << 'EOSUDO'
> -- 
> 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/20260610063806.4010352-1-amikan%40ilbers.de.
Anton Mikanovich June 10, 2026, 7:38 a.m. UTC | #2
10.06.2026 10:29, MOESSBAUER, Felix wrote:
> On Wed, 2026-06-10 at 09:38 +0300, Anton Mikanovich wrote:
>> To use variable inside of lock section it should be exported.
>> Otherwize it will be empty and isar-apt packages checking logic will
>> not work.
> Does this mean it was incorrect before our refactorings?
> If so, please add a fixes tag.
It was probably introduced in 86f1c6e.
Will add the tag.
>
>> Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
>> ---
>>   meta/classes-recipe/deb-dl-dir.bbclass | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/meta/classes-recipe/deb-dl-dir.bbclass b/meta/classes-recipe/deb-dl-dir.bbclass
>> index 620ddc96..fde4fc44 100644
>> --- a/meta/classes-recipe/deb-dl-dir.bbclass
>> +++ b/meta/classes-recipe/deb-dl-dir.bbclass
>> @@ -149,7 +149,7 @@ deb_dl_dir_export() {
>>       export owner=$(id -u):$(id -g)
>>       mkdir -p "${pc}"
>>   
>> -    isar_debs="$(${SCRIPTSDIR}/lockrun.py -r -f '${REPO_ISAR_DIR}/isar.lock' -c \
>> +    export isar_debs="$(${SCRIPTSDIR}/lockrun.py -r -f '${REPO_ISAR_DIR}/isar.lock' -c \
>>       "find '${REPO_ISAR_DIR}/${DISTRO}' -name '*.deb' -print")"
> We are running in a non ancient shell, so the quotes on the right side
> of the assignment are optional (better remove them to avoid the double
> quoting).
>
> isar_debs=$(...) instead of isar_debs="$(...)"
Ok, why not.
>
> Felix
>
>>   
>>       flock "${pc}".lock sudo -Es << 'EOSUDO'
>> -- 
>> 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/20260610063806.4010352-1-amikan%40ilbers.de.

Patch

diff --git a/meta/classes-recipe/deb-dl-dir.bbclass b/meta/classes-recipe/deb-dl-dir.bbclass
index 620ddc96..fde4fc44 100644
--- a/meta/classes-recipe/deb-dl-dir.bbclass
+++ b/meta/classes-recipe/deb-dl-dir.bbclass
@@ -149,7 +149,7 @@  deb_dl_dir_export() {
     export owner=$(id -u):$(id -g)
     mkdir -p "${pc}"
 
-    isar_debs="$(${SCRIPTSDIR}/lockrun.py -r -f '${REPO_ISAR_DIR}/isar.lock' -c \
+    export isar_debs="$(${SCRIPTSDIR}/lockrun.py -r -f '${REPO_ISAR_DIR}/isar.lock' -c \
     "find '${REPO_ISAR_DIR}/${DISTRO}' -name '*.deb' -print")"
 
     flock "${pc}".lock sudo -Es << 'EOSUDO'