public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] Fix cache-deb-src on raspberry targets
@ 2022-10-17  6:20 Uladzimir Bely
  2022-10-17  7:36 ` Bezdeka, Florian
  2022-10-24 10:39 ` Anton Mikanovich
  0 siblings, 2 replies; 4+ messages in thread
From: Uladzimir Bely @ 2022-10-17  6:20 UTC (permalink / raw)
  To: isar-users

Enabling cross-imager (commit 442c2a14) resulted in placing some
host (e.g. debian-bullseye) packages in target (raspios-bullseye)
download directories. So, `debsrc_download` function couldn't find
sources for these host (cross) packages on target mirrors.

This patch fixes the issue by using correct download directory
for the packages used by the imager.

Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
---
 meta/classes/image-tools-extension.bbclass | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/meta/classes/image-tools-extension.bbclass b/meta/classes/image-tools-extension.bbclass
index e13d4a3f..ecd4365b 100644
--- a/meta/classes/image-tools-extension.bbclass
+++ b/meta/classes/image-tools-extension.bbclass
@@ -19,10 +19,15 @@ do_install_imager_deps() {
         exit
     fi
 
+    distro="${DISTRO}"
+    if [ ${ISAR_CROSS_COMPILE} -eq 1 ]; then
+        distro="${HOST_DISTRO}"
+    fi
+
     buildchroot_do_mounts
 
     E="${@ isar_export_proxies(d)}"
-    deb_dl_dir_import ${BUILDCHROOT_DIR} ${DISTRO}
+    deb_dl_dir_import ${BUILDCHROOT_DIR} ${distro}
     sudo -E chroot ${BUILDCHROOT_DIR} sh -c ' \
         apt-get update \
             -o Dir::Etc::SourceList="sources.list.d/isar-apt.list" \
@@ -32,7 +37,7 @@ do_install_imager_deps() {
             --allow-unauthenticated --allow-downgrades --download-only install \
             ${IMAGER_INSTALL}'
 
-    deb_dl_dir_export ${BUILDCHROOT_DIR} ${DISTRO}
+    deb_dl_dir_export ${BUILDCHROOT_DIR} ${distro}
     sudo -E chroot ${BUILDCHROOT_DIR} sh -c ' \
         apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y \
             --allow-unauthenticated --allow-downgrades install \
-- 
2.20.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix cache-deb-src on raspberry targets
  2022-10-17  6:20 [PATCH] Fix cache-deb-src on raspberry targets Uladzimir Bely
@ 2022-10-17  7:36 ` Bezdeka, Florian
  2022-10-17  8:21   ` Uladzimir Bely
  2022-10-24 10:39 ` Anton Mikanovich
  1 sibling, 1 reply; 4+ messages in thread
From: Bezdeka, Florian @ 2022-10-17  7:36 UTC (permalink / raw)
  To: ubely, isar-users

On Mon, 2022-10-17 at 08:20 +0200, Uladzimir Bely wrote:
> Enabling cross-imager (commit 442c2a14) resulted in placing some
> host (e.g. debian-bullseye) packages in target (raspios-bullseye)
> download directories. So, `debsrc_download` function couldn't find
> sources for these host (cross) packages on target mirrors.
> 
> This patch fixes the issue by using correct download directory
> for the packages used by the imager.

Any chance that this fixes [1] (as well)?

[1] https://groups.google.com/g/isar-users/c/GB4KRe6V6ME
> 
> Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
> ---
>  meta/classes/image-tools-extension.bbclass | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/classes/image-tools-extension.bbclass b/meta/classes/image-tools-extension.bbclass
> index e13d4a3f..ecd4365b 100644
> --- a/meta/classes/image-tools-extension.bbclass
> +++ b/meta/classes/image-tools-extension.bbclass
> @@ -19,10 +19,15 @@ do_install_imager_deps() {
>          exit
>      fi
>  
> +    distro="${DISTRO}"
> +    if [ ${ISAR_CROSS_COMPILE} -eq 1 ]; then
> +        distro="${HOST_DISTRO}"
> +    fi
> +
>      buildchroot_do_mounts
>  
>      E="${@ isar_export_proxies(d)}"
> -    deb_dl_dir_import ${BUILDCHROOT_DIR} ${DISTRO}
> +    deb_dl_dir_import ${BUILDCHROOT_DIR} ${distro}
>      sudo -E chroot ${BUILDCHROOT_DIR} sh -c ' \
>          apt-get update \
>              -o Dir::Etc::SourceList="sources.list.d/isar-apt.list" \
> @@ -32,7 +37,7 @@ do_install_imager_deps() {
>              --allow-unauthenticated --allow-downgrades --download-only install \
>              ${IMAGER_INSTALL}'
>  
> -    deb_dl_dir_export ${BUILDCHROOT_DIR} ${DISTRO}
> +    deb_dl_dir_export ${BUILDCHROOT_DIR} ${distro}
>      sudo -E chroot ${BUILDCHROOT_DIR} sh -c ' \
>          apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y \
>              --allow-unauthenticated --allow-downgrades install \
> -- 
> 2.20.1
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix cache-deb-src on raspberry targets
  2022-10-17  7:36 ` Bezdeka, Florian
@ 2022-10-17  8:21   ` Uladzimir Bely
  0 siblings, 0 replies; 4+ messages in thread
From: Uladzimir Bely @ 2022-10-17  8:21 UTC (permalink / raw)
  To: isar-users, Bezdeka, Florian

In the email from Monday, 17 October 2022 10:36:54 +03 user Bezdeka, Florian 
wrote:
> On Mon, 2022-10-17 at 08:20 +0200, Uladzimir Bely wrote:
> 
> > Enabling cross-imager (commit 442c2a14) resulted in placing some
> > host (e.g. debian-bullseye) packages in target (raspios-bullseye)
> > download directories. So, `debsrc_download` function couldn't find
> > sources for these host (cross) packages on target mirrors.
> > 
> > This patch fixes the issue by using correct download directory
> > for the packages used by the imager.
> 
> 
> Any chance that this fixes [1] (as well)?
> 
> [1] https://groups.google.com/g/isar-users/c/GB4KRe6V6ME
> 

I doubt.

This patch just fixes cache-deb-src functionality in case of "host" and 
"target" distros are different (e.g. "debian-*" and "raspios-*").

> > 
> > Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
> > ---
> > 
> >  meta/classes/image-tools-extension.bbclass | 9 +++++++--
> >  1 file changed, 7 insertions(+), 2 deletions(-)
> > 
> > 
> > diff --git a/meta/classes/image-tools-extension.bbclass
> > b/meta/classes/image-tools-extension.bbclass
 index e13d4a3f..ecd4365b
> > 100644
> > --- a/meta/classes/image-tools-extension.bbclass
> > +++ b/meta/classes/image-tools-extension.bbclass
> > @@ -19,10 +19,15 @@ do_install_imager_deps() {
> > 
> >          exit
> >      
> >      fi
> >  
> >  
> > 
> > +    distro="${DISTRO}"
> > +    if [ ${ISAR_CROSS_COMPILE} -eq 1 ]; then
> > +        distro="${HOST_DISTRO}"
> > +    fi
> > +
> > 
> >      buildchroot_do_mounts
> >  
> >  
> >  
> >      E="${@ isar_export_proxies(d)}"
> > 
> > -    deb_dl_dir_import ${BUILDCHROOT_DIR} ${DISTRO}
> > +    deb_dl_dir_import ${BUILDCHROOT_DIR} ${distro}
> > 
> >      sudo -E chroot ${BUILDCHROOT_DIR} sh -c ' \
> >      
> >          apt-get update \
> >          
> >              -o Dir::Etc::SourceList="sources.list.d/isar-apt.list" \
> > 
> > @@ -32,7 +37,7 @@ do_install_imager_deps() {
> > 
> >              --allow-unauthenticated --allow-downgrades --download-only
> >              install \
> >              ${IMAGER_INSTALL}'
> >  
> >  
> > 
> > -    deb_dl_dir_export ${BUILDCHROOT_DIR} ${DISTRO}
> > +    deb_dl_dir_export ${BUILDCHROOT_DIR} ${distro}
> > 
> >      sudo -E chroot ${BUILDCHROOT_DIR} sh -c ' \
> >      
> >          apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends
> >          -y \
> >          
> >              --allow-unauthenticated --allow-downgrades install \
> > 
> > -- 
> > 2.20.1
> > 
> 
> 


-- 
Uladzimir Bely




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix cache-deb-src on raspberry targets
  2022-10-17  6:20 [PATCH] Fix cache-deb-src on raspberry targets Uladzimir Bely
  2022-10-17  7:36 ` Bezdeka, Florian
@ 2022-10-24 10:39 ` Anton Mikanovich
  1 sibling, 0 replies; 4+ messages in thread
From: Anton Mikanovich @ 2022-10-24 10:39 UTC (permalink / raw)
  To: Uladzimir Bely, isar-users

17.10.2022 09:20, Uladzimir Bely wrote:
> Enabling cross-imager (commit 442c2a14) resulted in placing some
> host (e.g. debian-bullseye) packages in target (raspios-bullseye)
> download directories. So, `debsrc_download` function couldn't find
> sources for these host (cross) packages on target mirrors.
>
> This patch fixes the issue by using correct download directory
> for the packages used by the imager.
>
> Signed-off-by: Uladzimir Bely <ubely@ilbers.de>

Applied to next, thanks.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-10-24 10:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-17  6:20 [PATCH] Fix cache-deb-src on raspberry targets Uladzimir Bely
2022-10-17  7:36 ` Bezdeka, Florian
2022-10-17  8:21   ` Uladzimir Bely
2022-10-24 10:39 ` Anton Mikanovich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox