Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Tomcat-42
Copy link
Contributor

If $SRCDIR has a trailing slash (e.g., kernel/), the command cp -r "$SRCDIR" "${SRCDIR}.orig" incorrectly copies the backup inside the source directory instead of alongside it. This causes the subsequent diff -Nupr to fail or compute an incorrect diff.

Also checks for the definitions of required env vars.

@Tomcat-42 Tomcat-42 self-assigned this Oct 28, 2025
Copy link
Contributor

@joe-lawrence joe-lawrence left a comment

Choose a reason for hiding this comment

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

LOL, I've stubbed my toe on this many times when using tab completion to fill out the SRCDIR path, but never bothered to fix it.

Nit 1 - same as the other PR, if you can format the commit msg like a kernel commit. That is, a subject format "subsys/section: summary ...", the description, finished by your signed-off-by line.

Nit 2 - completely up to you, but would realpath be any more useful? I think it may solve this problem and also do some additional cleanup. I'd be happy either way and just wanted to mention it.

…base_patches`

A trailing slash in $SRCDIR breaks the backup `cp` command by
placing the ".orig" copy inside $SRCDIR instead of alongside it.
This causes the subsequent diff to fail. Fix this by using `realpath`
to canonicalize $SRCDIR. Additionally, add checks for required $SRCDIR,
$ID, and $VERSION_ID env vars.

Signed-off-by: Pablo Alessandro Santos Hugen <[email protected]>
Copy link
Contributor

@joe-lawrence joe-lawrence left a comment

Choose a reason for hiding this comment

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

Thanks, @Tomcat-42 !

@Tomcat-42 Tomcat-42 merged commit 8364a8e into dynup:master Oct 29, 2025
3 checks passed
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.

2 participants