Skip to content

Conversation

@aa12110
Copy link

@aa12110 aa12110 commented Dec 18, 2025

修复因为上游api获取到多个deb地址导致下载失败的问题

修复因为上游api获取到多个deb地址导致下载失败的问题
Copilot AI review requested due to automatic review settings December 18, 2025 09:20
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a bug where downloading Debian kernel packages fails when the upstream GitHub API returns multiple deb file URLs. The fix adds | head -n 1 to the pipeline that extracts the image URL, ensuring only the first matching URL is used for the download.

Key Changes:

  • Modified the imgurl extraction command in the x86_64 Debian kernel installation section to limit results to a single URL

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

echo -e "获取的版本号为:${Green_font_prefix}${github_ver}${Font_color_suffix}"
kernel_version=$github_ver
detele_kernel_head
headurl=$(curl -s 'https://api.github.com/repos/ylx2016/kernel/releases' | grep "${github_tag}" | grep 'deb' | grep 'headers' | awk -F '"' '{print $4}')
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

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

The same issue that was fixed for imgurl on line 563 could also affect headurl. If the API returns multiple header deb files matching the search criteria, this line could also retrieve multiple URLs causing download failures. Consider adding | head -n 1 to ensure only a single URL is captured, consistent with the fix applied to imgurl.

Copilot uses AI. Check for mistakes.
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.

1 participant