RE: [Toaster] [PATCH] toaster: handle changes to "ImagePkgList" event

"Reyna, David" <[email protected]>
Newsgroups org.yoctoproject.lists.toaster
Message-ID <BY5PR11MB4167DF6E5485EB7F09AFFBCEEA159@BY5PR11MB4167.namprd11.prod.outlook.com>
Hi Richard,

Your proposed patch works perfectly. All the anomalies disappeared. I will drop my workaround patch and submit your patch instead.

I do have a limitation in that I am only setup to submit patches to bitbake, and not to oe-core. Could someone point me to those instructions, or could you pass that patch to them directly?

Thanks!
David

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Reyna, David
Sent: Sunday, March 20, 2022 12:15 AM
To: Richard Purdie <[email protected]>; [email protected]
Subject: Re: [Toaster] [PATCH] toaster: handle changes to "ImagePkgList" event

I will try this out.

David

-----Original Message-----
From: Richard Purdie <[email protected]> 
Sent: Saturday, March 19, 2022 1:02 PM
To: Reyna, David <[email protected]>; [email protected]
Subject: Re: [Toaster] [PATCH] toaster: handle changes to "ImagePkgList" event

On Fri, 2022-03-18 at 19:26 +0000, Reyna, David wrote:
> > I think the fact that some values are "disappearing" is a sign the overrides
> change has some impact here which needs to be fixed and this patch is just
> partially working around it.
> 
> Yes, this patch is specifically to work around the problems in the event data
> encountered. Fortunately these were the only events thus affected.
> 
> If the original data and formatting does get restored, you will observe that the
> patch is written to use that original formatting.
> 
> After the core problems are fixed, then this patch (or parts) can be dropped.
> 
> As a result of these discoveries, I filed Bug 14764 directly against Bitbake
> since there was obvious missing formatting with 'PKGSIZE'. As for the other
> problems, I could not tell if they were intentional changes or not.  I will
> update Bug 14764 so that it is one stop shopping.

I think the problem might be fixed with something like:

diff --git a/meta/classes/toaster.bbclass b/meta/classes/toaster.bbclass
index dd5c7f224ba..f365c091420 100644
--- a/meta/classes/toaster.bbclass
+++ b/meta/classes/toaster.bbclass
@@ -101,11 +101,11 @@ def _toaster_load_pkgdatafile(dirpath, filepath):
         for line in fin:
             try:
                 kn, kv = line.strip().split(": ", 1)
-                m = re.match(r"^PKG_([^A-Z:]*)", kn)
+                m = re.match(r"^PKG:([^A-Z:]*)", kn)
                 if m:
                     pkgdata['OPKGN'] = m.group(1)
-                kn = "_".join([x for x in kn.split("_") if x.isupper()])
-                pkgdata[kn] = kv.strip()
+                kn = kn.split(":")[0]
+                pkgdata[kn] = kv
                 if kn.startswith('FILES_INFO'):
                     pkgdata[kn] = json.loads(kv)
 
but I haven't tested that as yet.

Cheers,

Richard
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.