public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "Schmidt, Adriaan" <adriaan.schmidt@siemens.com>
To: Srinuvasan Arjunan <srinuvasanasv@gmail.com>
Cc: "Arjunan, Srinu" <srinuvasan.a@siemens.com>,
	"isar-users@googlegroups.com" <isar-users@googlegroups.com>,
	"Kiszka, Jan" <jan.kiszka@siemens.com>,
	"MOESSBAUER, Felix" <felix.moessbauer@siemens.com>
Subject: RE: [PATCH] meta/classes/dpkg-prebuilt: expand SRC_URI variable
Date: Wed, 24 Apr 2024 07:27:01 +0000	[thread overview]
Message-ID: <AS4PR10MB53185DF3B234296D475F4D94ED102@AS4PR10MB5318.EURPRD10.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <CAB2Z2nN0v=UOTWoFgwwUM3aiozPOxC1aXQqwDFBCo_2y_h8fQw@mail.gmail.com>

Hi Srinu,

In this case I would:

PACKAGE_NAME = "example-prebuilt_1.0.0-0_all.deb"
PACKAGE_NAME:debian-bullseye = "example-prebuilt_1.0.0-0_bullseye.deb"
SRC_URI += "file://${PACKAGE_NAME}"

Adriaan



From: Srinuvasan Arjunan <srinuvasanasv@gmail.com> 
Sent: Mittwoch, 24. April 2024 08:59
To: Schmidt, Adriaan (T CED EDC-DE) <adriaan.schmidt@siemens.com>
Cc: Arjunan, Srinu (DI CTO FDS CES LX PBU 2) <srinuvasan.a@siemens.com>; isar-users@googlegroups.com; Kiszka, Jan (T CED) <jan.kiszka@siemens.com>; Moessbauer, Felix (T CED OES-DE) <felix.moessbauer@siemens.com>
Subject: Re: [PATCH] meta/classes/dpkg-prebuilt: expand SRC_URI variable



On Wed, Apr 24, 2024 at 12:03 PM 'Schmidt, Adriaan' via isar-users <mailto:isar-users@googlegroups.com> wrote:
Hi,

srinuvasan.a, Mittwoch, 24. April 2024 08:15:
> In some cases we may need to install the prebuilt deb packages based on
> some condition or based on distro selection, in this case the present
> implementation not works as expected.

I've seen dpkg-prebuilt SRC_URIs containing "${PACKAGE_ARCH}" and/or
"${DISTRO}", and that seemed to work just fine. Your patch would only
change the time at which expansion happens, and that should not make
a difference.

Could you give some details or an example what you're trying to do?

   Hi Adriaan,

          Suppose if you want to install the prebuilt-deb packages based on the selection like below: 
           SRC_URI:append = " ${@ 'file://example-prebuilt_1.0.0-0_bullseye.deb' if d.getVar('BASE_DISTRO_CODENAME') == 'bullseye' else 'file://example-prebuilt_1.0.0-0_all.deb' }"

The above changes not works with the present implementation, with the help of expanding the SRC_URI variable we can able to get the right packages in WORKDIR.

Thanks,
Srinu

> The reason behind this is SRC_URI variable is not exapnding, remove
> False flag to expand SRC_URI variable to get the required field.

The current behavior was introduced in ee20790f454030fad40b4ac7b97bf9eaadda48e7.
Commit message reads:
---
signatures: do not expand SRC_URI
This patch reworks modification to SRC_URI to avoid expanding
the variables in the string. By that, both cachability issues,
as well as information leaks (e.g. repo access tokens) are
mitigated.

Signed-off-by: Felix Moessbauer <mailto:felix.moessbauer@siemens.com>
---
I assume that this is still valid?

Adriaan

> Signed-off-by: Srinuvasan A <mailto:srinuvasan.a@siemens.com>
> ---
>  meta/classes/dpkg-prebuilt.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/classes/dpkg-prebuilt.bbclass b/meta/classes/dpkg-
> prebuilt.bbclass
> index 8135fc81..1ee1147c 100644
> --- a/meta/classes/dpkg-prebuilt.bbclass
> +++ b/meta/classes/dpkg-prebuilt.bbclass
> @@ -7,7 +7,7 @@ inherit dpkg-base
> 
>  python do_unpack:prepend() {
>      # enforce unpack=false
> -    src_uri = (d.getVar('SRC_URI', False) or '').split()
> +    src_uri = (d.getVar('SRC_URI') or '').split()
>      if len(src_uri) == 0:
>          return
>      def ensure_unpack_false(uri):
> --
> 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 mailto:isar-users%2Bunsubscribe@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/isar-users/20240424061452.506278-1-
> srinuvasan.a%http://40siemens.com.

-- 
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 mailto:isar-users%2Bunsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/AS4PR10MB5318C687D0B13B3007FDC20BED102%40AS4PR10MB5318.EURPRD10.PROD.OUTLOOK.COM.

  reply	other threads:[~2024-04-24  7:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-24  6:14 srinuvasan.a
2024-04-24  6:33 ` Schmidt, Adriaan
2024-04-24  6:59   ` Srinuvasan Arjunan
2024-04-24  7:27     ` Schmidt, Adriaan [this message]
2024-04-24  8:02       ` Srinuvasan Arjunan
2024-04-24  9:42         ` Schmidt, Adriaan
2024-04-24 10:55           ` Srinuvasan Arjunan

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=AS4PR10MB53185DF3B234296D475F4D94ED102@AS4PR10MB5318.EURPRD10.PROD.OUTLOOK.COM \
    --to=adriaan.schmidt@siemens.com \
    --cc=felix.moessbauer@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=jan.kiszka@siemens.com \
    --cc=srinuvasan.a@siemens.com \
    --cc=srinuvasanasv@gmail.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