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

[build] Check if patches are applied before applying patches #13386

Merged
merged 1 commit into from
Jan 18, 2023

Conversation

liushilongbuaa
Copy link
Contributor

Why I did it

If make fails, we can't rerun the make process, because existing patches can't apply again.

How I did it

Check if patches are applied. if yes, don't apply patches again.

How to verify it

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211

Description for the changelog

Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU.

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@liushilongbuaa liushilongbuaa marked this pull request as ready for review January 17, 2023 06:13
@kv-y
Copy link
Contributor

kv-y commented Jan 17, 2023

If make fails, we can't rerun the make process, because existing patches can't apply again.

Maybe just need to fix a cleanup stage for some packages?

I mean usually we have the next steps:

  1. Remove a directory with source code if it exists
  2. Download and unpack some files if it's required
  3. Apply patches
  4. Build
  5. Install

Some packages like ntp have incorrect 1st step:
NTP_VERSION is 4.2.8p15+dfsg and we try to remove ntp-$(NTP_VERSION) but in fact directory is named ntp-4.2.8p15

So if directory with source code is removed correctly we don't have any issues with applying patches when we rerun make. But it's just a suggestion.
Probably your PR fixes another bug.

@liushilongbuaa
Copy link
Contributor Author

If make fails, we can't rerun the make process, because existing patches can't apply again.

Maybe just need to fix a cleanup stage for some packages?

I mean usually we have the next steps:

  1. Remove a directory with source code if it exists
  2. Download and unpack some files if it's required
  3. Apply patches
  4. Build
  5. Install

Some packages like ntp have incorrect 1st step: NTP_VERSION is 4.2.8p15+dfsg and we try to remove ntp-$(NTP_VERSION) but in fact directory is named ntp-4.2.8p15

So if directory with source code is removed correctly we don't have any issues with applying patches when we rerun make. But it's just a suggestion. Probably your PR fixes another bug.

That will be a big change. This small change will work in a lot of scenarios.

@xumia xumia merged commit d55913a into sonic-net:master Jan 18, 2023
mssonicbld pushed a commit to mssonicbld/sonic-buildimage that referenced this pull request Jan 19, 2023
…et#13386)

Why I did it
If make fails, we can't rerun the make process, because existing patches can't apply again.

How I did it
Check if patches are applied. if yes, don't apply patches again.

How to verify it
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202205: #13435

yxieca pushed a commit that referenced this pull request Jan 20, 2023
…#13435)

Why I did it
If make fails, we can't rerun the make process, because existing patches can't apply again.

How I did it
Check if patches are applied. if yes, don't apply patches again.

How to verify it

Co-authored-by: Liu Shilong <[email protected]>
mssonicbld pushed a commit to mssonicbld/sonic-buildimage that referenced this pull request Feb 2, 2023
…et#13386)

Why I did it
If make fails, we can't rerun the make process, because existing patches can't apply again.

How I did it
Check if patches are applied. if yes, don't apply patches again.

How to verify it
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202106: #13598

@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202111: #13599

mssonicbld pushed a commit that referenced this pull request Feb 2, 2023
Why I did it
If make fails, we can't rerun the make process, because existing patches can't apply again.

How I did it
Check if patches are applied. if yes, don't apply patches again.

How to verify it
mssonicbld pushed a commit that referenced this pull request Feb 2, 2023
Why I did it
If make fails, we can't rerun the make process, because existing patches can't apply again.

How I did it
Check if patches are applied. if yes, don't apply patches again.

How to verify it
mssonicbld pushed a commit to mssonicbld/sonic-buildimage that referenced this pull request Feb 3, 2023
…et#13386)

Why I did it
If make fails, we can't rerun the make process, because existing patches can't apply again.

How I did it
Check if patches are applied. if yes, don't apply patches again.

How to verify it
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202211: #13656

mssonicbld pushed a commit that referenced this pull request Feb 6, 2023
Why I did it
If make fails, we can't rerun the make process, because existing patches can't apply again.

How I did it
Check if patches are applied. if yes, don't apply patches again.

How to verify it
xumia pushed a commit that referenced this pull request Feb 6, 2023
Why I did it
If make fails, we can't rerun the make process, because existing patches can't apply again.

#13386 missed some change.
mssonicbld pushed a commit to mssonicbld/sonic-buildimage that referenced this pull request Feb 6, 2023
…net#13566)

Why I did it
If make fails, we can't rerun the make process, because existing patches can't apply again.

sonic-net#13386 missed some change.
xumia pushed a commit that referenced this pull request Apr 14, 2023
#14662)

Why I did it
If make fails, we can't rerun the make process, because existing patches can't apply again.
#13386 missed some change.

Work item tracking
Microsoft ADO (number only):
How I did it
Check if patches are applied. if yes, don't apply patches again.

How to verify it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants