Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkglistgen: add an ability to update weakremovers.inc only #3165

Merged
merged 2 commits into from
Sep 25, 2024

Conversation

nilxam
Copy link
Contributor

@nilxam nilxam commented Sep 23, 2024

Add an --only-update-weakremovers option to be able to update weakremovers.inc only. With this option, pkglistgen will checkout release package and update weakremovers.inc, nothing else, no needed to have other product package involved.

Since Leap 16.0 don't use pkglistgen anymore but productcomposer, we still need a tool to recalculate weakremovers.inc according to the binary pool from the current and the previous version, therefore lets reuse pkglistgen's code for weakremovers handling.

@Vogtinator
Copy link
Member

Since Leap 16.0 don't use pkglistgen anymore but productcomposer,

Doesn't pkglistgen write its output as productcompose files in that case?

@nilxam
Copy link
Contributor Author

nilxam commented Sep 23, 2024

Since Leap 16.0 don't use pkglistgen anymore but productcomposer,

Doesn't pkglistgen write its output as productcompose files in that case?

I'm not sure are you reference to productcomposer support in pkglistgen? or any other scenario please could you brief it a bit more?

Leap 16.0 doesn't use pkglistgen to generate any product file(?), none for 000product(sure thing), nor 000release-packages, of course nor 000package-groups, just have a pure and simple 000productcompose to have .productcompose file. There is no input files, and no pkglistgen, nothing going to update release-packages, therefor weakremovers.inc won't get updated.

@Vogtinator
Copy link
Member

Since Leap 16.0 don't use pkglistgen anymore but productcomposer,

Doesn't pkglistgen write its output as productcompose files in that case?

I'm not sure are you reference to productcomposer support in pkglistgen? or any other scenario please could you brief it a bit more?

Yes: #3051

You can use pkglistgen to manage 000productcompose just like 000product.

Leap 16.0 doesn't use pkglistgen to generate any product file(?), none for 000product(sure thing), nor 000release-packages, of course nor 000package-groups, just have a pure and simple 000productcompose to have .productcompose file. There is no input files, and no pkglistgen, nothing going to update release-packages, therefor weakremovers.inc won't get updated.

i.e. 000productcompose in 16.0 currently only builds the FTP tree which doesn't really need solving because there's no DVD?

@nilxam
Copy link
Contributor Author

nilxam commented Sep 24, 2024

Yes: #3051

You can use pkglistgen to manage 000productcompose just like 000product.

Yes, but we don't have input files in 000package-groups, packagelist calculation is not needed.

i.e. 000productcompose in 16.0 currently only builds the FTP tree which doesn't really need solving because there's no DVD?

Yes. 000productcompose builds the ftp tree only, it uses __all__ to include all binary RPM from the binary pool. Only medium we had is agama-installer image.

@Vogtinator
Copy link
Member

Ok, then it makes sense. Other approaches I can think of:

a) Detect if there is no solving needed and skip those steps automatically (-> no manual config needed)
b) Separate the weakremovers update from pkglistgen. Needs some work and synchronization though.

@nilxam
Copy link
Contributor Author

nilxam commented Sep 24, 2024

Ok, then it makes sense. Other approaches I can think of:

a) Detect if there is no solving needed and skip those steps automatically (-> no manual config needed) b) Separate the weakremovers update from pkglistgen. Needs some work and synchronization though.

I initially go for option b, but pkglistgen has code over there already so I don't bother to, if at some point in the future we must to have a separate weakremovers updater then I'll do so.

pkglistgen/tool.py Outdated Show resolved Hide resolved
@@ -753,27 +756,35 @@ def update_and_solve_target(
if engine == Engine.product_composer:
self.output_dir = productcompose_dir
elif engine == Engine.legacy:
self.output_dir = product_dir
if not only_update_weakremovers:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be independent of the engine?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I limits --only-update-weakremovers to legacy engine only, see changes in cli.py

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

IMO it's a bit weird to have to use the legacy engine in a project which uses product composer

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see https://github.com/openSUSE/openSUSE-release-tools/blob/master/pkglistgen/cli.py#L79 , if product_composer engine in pkglistgen would not handle 000release-packages, why should --only-update-weakremovers to be independednt of the engine?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not actually sure why, because even with product composer there is 000release-packages: https://src.suse.de/products/SLES/src/branch/16.0/000release-packages (note: internal link)

@adrianschroeter maybe you remember?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's true for Leap 16 atm, to manage release package manually, that's why I needed a better way here to handle weakremovers...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know what SLES is doing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know what SLES is doing?

I don't know will the thing gonna be changed in SLES16, but in SLE15, weakremovers.inc is not rely on 000update-repos, they have a manual maintained weakremovers.inc in 000packages-group, and copy it to 000release-pacakges by pkglistgen. See https://github.com/openSUSE/openSUSE-release-tools/blob/master/pkglistgen/tool.py#L863

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, indeed in SLES16/SL-Micro currently 000release-packages are managed manually

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, so the productcompose + weakremovers.inc case is just not relevant yet.

pkglistgen/tool.py Outdated Show resolved Hide resolved
pkglistgen/tool.py Outdated Show resolved Hide resolved
pkglistgen/tool.py Outdated Show resolved Hide resolved
Add an --only-update-weakremovers option to be able to update
weakremovers.inc only. With this option, pkglistgen will checkout
release package and update weakremovers.inc, nothing else, no needed
to have other product package involved.
@nilxam nilxam merged commit ba61d20 into openSUSE:master Sep 25, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants