RE: [AUH][PATCH v3 4/4] upgrade-helper.py: Add resume option to skip already attempted recipes

Daniel Turull <[email protected]>
Newsgroups org.yoctoproject.lists.yocto-patches
Message-ID <PA3PR07MB1072178ACD37973C762EAE17E8A3E2@PA3PR07MB10721.eurprd07.prod.outlook.com>

> -----Original Message-----
> From: Alexander Kanavin <[email protected]>
> Sent: Monday, 4 May 2026 10:12
> To: Daniel Turull <[email protected]>
> Cc: [email protected]; [email protected];
> [email protected]; [email protected]
> Subject: Re: [AUH][PATCH v3 4/4] upgrade-helper.py: Add resume option to
> skip already attempted recipes
> 
> On Mon, 4 May 2026 at 08:36, <[email protected]> wrote:
> > +            prev_runs = sorted(glob.glob(os.path.join(self.uh_dir, "20*")))
> > +            prev_runs = [r for r in prev_runs if r != self.uh_work_dir]
> > +            if prev_runs:
> > +                prev_dir = prev_runs[-1]
> 
> This makes me wonder, if AUH was interrupted in its second run, and we
> need to resume for the second time, then AUH should combine everything
> from all previous runs into the skip set, not just recipes from the latest one,
> right?
> 

Yes, you are right. I'll fix it in a new version.

> > +            if 'workdir' in g:
> > +                if any(g['name'] == s['name'] for s in succeeded_pkggroups_ctx):
> 
> This is more complex than the condition in the removed block below, why not
> use that:
>            if g in succeeded_pkggroups_ctx:
> 
I'll add your suggestion.

> > +                if not os.path.exists(link):
> > +                    os.symlink(g['workdir'], link)
> 
> Why is the existence guard needed? The removed code block doesn't have it.
> 

It's not. It was some transient error that I had but now I cannot reproduce it.
Each run creates a fresh timestamped directory so symlinks can't already exist. Removed

Thanks
Daniel
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.