docs: fix apt mirror restore commands to match by path - #1993
Open
tangzz-radxa wants to merge 1 commit into
Open
docs: fix apt mirror restore commands to match by path#1993tangzz-radxa wants to merge 1 commit into
tangzz-radxa wants to merge 1 commit into
Conversation
The restore-defaults block used two sequential domain-only sed replacements per mirror (e.g. 's/mirrors.cqu.edu.cn/deb.debian.org/g' then 's/mirrors.cqu.edu.cn/deb.ubuntu.com/g'). The first command rewrites every occurrence of the mirror host, including Ubuntu source paths, so the second command never matches and Ubuntu users end up with broken 'deb.debian.org/ubuntu' entries. Match by path (/debian vs /ubuntu) instead, which preserves the original default host for each distribution. Applies to ustc, tuna, and cqu mirror blocks in both zh-CN and en docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the "Restore Defaults" instructions in the Radxa OS apt repository mirror docs (
_apt-repo.mdx, zh-CN + en).Problem
The restore block used two sequential domain-only
sedreplacements per mirror, e.g.:The first command rewrites every occurrence of the mirror host — including Ubuntu source paths — to
deb.debian.org, so the second command never seesmirrors.cqu.edu.cnagain. On an Ubuntu system, restoring defaults yields broken entries likedeb.debian.org/ubuntuinstead ofdeb.ubuntu.com/ubuntu.This was originally flagged by Copilot review on #1781 (comments on both the en and zh files), but #1781 was merged with the issue still present in
main.Fix
Match by path instead of host only, so each distribution is restored to its own default host:
Applied to all affected mirror blocks (ustc, tuna, cqu) in both
docs/common/radxa-os/_apt-repo.mdxand the en counterpart.Test / verification
/debianvs/ubuntupath).