| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
mirror: split out code src/mirror/ ├── mod.rs (re-exports, public API) ├── types.rs (data structures, constants) ├── metrics.rs (Mirror performance methods) ├── loading.rs (mirror loading/initialization) ├── logging.rs (performance logging & log parsing) ├── selection.rs (mirror selection/filtering) ├── filtering.rs (geographic/exploration filtering) └── url.rs (URL/path resolution utilities) Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 6 个月前 | |
dirs: centralize path_join and env_root path helpers Add path_join(base, parts) in dirs.rs: one Path::join per path segment so Windows does not mix separators when code used to do .join("a/b"). Use a generic base type P: AsRef<Path> + ?Sized so callers can pass &Path, &PathBuf, etc.; owned PathBuf must be passed as &path_buf at call sites. Introduce/consolidate env_root_* helpers (e.g. env_root_channel_yaml(), env_root_etc_epkg(), env_root_repos_d(), env_root_env_yaml()) and switch call sites away from stringly join chains. Sweep package/store/install/hooks paths to use path_join or component-wise joins (apk/arch/brew/conda/deb/rpm pipelines, busybox, mirror, main, etc.). brew_service: import crate::lfs on Linux; fix Object(obj) / service name bindings for platform-specific branches. init: import PathBuf for paths that construct PathBuf explicitly. Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 4 个月前 | |
dirs: centralize path_join and env_root path helpers Add path_join(base, parts) in dirs.rs: one Path::join per path segment so Windows does not mix separators when code used to do .join("a/b"). Use a generic base type P: AsRef<Path> + ?Sized so callers can pass &Path, &PathBuf, etc.; owned PathBuf must be passed as &path_buf at call sites. Introduce/consolidate env_root_* helpers (e.g. env_root_channel_yaml(), env_root_etc_epkg(), env_root_repos_d(), env_root_env_yaml()) and switch call sites away from stringly join chains. Sweep package/store/install/hooks paths to use path_join or component-wise joins (apk/arch/brew/conda/deb/rpm pipelines, busybox, mirror, main, etc.). brew_service: import crate::lfs on Linux; fix Object(obj) / service name bindings for platform-specific branches. init: import PathBuf for paths that construct PathBuf explicitly. Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 4 个月前 | |
mirror: split out code src/mirror/ ├── mod.rs (re-exports, public API) ├── types.rs (data structures, constants) ├── metrics.rs (Mirror performance methods) ├── loading.rs (mirror loading/initialization) ├── logging.rs (performance logging & log parsing) ├── selection.rs (mirror selection/filtering) ├── filtering.rs (geographic/exploration filtering) └── url.rs (URL/path resolution utilities) Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 6 个月前 | |
mirror: split out code src/mirror/ ├── mod.rs (re-exports, public API) ├── types.rs (data structures, constants) ├── metrics.rs (Mirror performance methods) ├── loading.rs (mirror loading/initialization) ├── logging.rs (performance logging & log parsing) ├── selection.rs (mirror selection/filtering) ├── filtering.rs (geographic/exploration filtering) └── url.rs (URL/path resolution utilities) Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 6 个月前 | |
mirror/selection: add debug logs Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 5 个月前 | |
overhaul mirror discovery pipeline Scripts & Processing - Rename fetch_new_mirrors.py → fetch_official_mirrors.py - Replace new-mirrors.json → official-mirrors.json as primary source - Introduce blacklist-mirrors.txt for hostname-based blocking - Add intelligent cache management with should_update_cache() & atomic writes - Improve mirror grouping logic: enforce top_level vs. distro_dirs separation - Validate directory suffixes against VALID_DIRS (from sources/*.yaml) - Deduplicate base URLs; merge valid path components into distro_dirs - Add LFTP & JS fallback retry when filtering yields empty results - Remove --update flag; ls-mirrors.json now treated purely as output - Change merge step: drop root, unify ls/pdir/dir into single ls array - Compress final JSON: os→top (single value), dir/pdir/ls→ls, root→top Configuration (YAML) - New sources: debian-{kubernetes,mariadb,mysql,nginx,termux}, fedora-{mariadb,mysql}, msys2 - Rename: rocky-epel.yaml → epel.yaml (fake distro: EPEL) - Add uppercase variants to distro_dirs (e.g. Ubuntu, Rocky, EPEL) - Update Fedora paths: add /linux, /second, /altarch; deprecate generic fedora - Remove EOL CentOS 7/8 from centos.yaml - Expand openSUSE distro_dirs with ftp.opensuse.com & OpenSuSE Rust Application - Mirror struct: remove distros, probe_dirs, ls_dirs, top_level - Add top_os: Option<String> (single source-of-truth for root distro) - distro_dirs now holds all validated directories (merged from former ls/pdir/dir) - Update filtering logic: check top_os OR distro_dirs for distro match - Fedora secondary arch detection: also match altarch (not only secondary) - Adjust Mirrors::format_mirror_url call to use top_os.is_some() Documentation - Rewrite usage.md with clear step-by-step, cache policy, and debugging tips first - Update all mermaid diagrams to reflect renamed files and new schema Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 5 个月前 | |
link: fix Windows symlink type detection mismatch Problem: - Symlink 'usr/local/share/man -> ../man' was created as FILE symlink on Windows, but target '../man' is a directory - is_directory_symlink() returned false due to missing FILE_ATTRIBUTE_DIRECTORY flag in the symlink's file attributes - Root cause: tar_extract.rs used entry.unpack() for symlinks which creates them with wrong type on Windows Solution: 1. tar_extract.rs: Add Windows-specific symlink handling in extract_archive_with_policy(): - Collect symlinks during first pass - After collecting all directories, create symlinks with correct type - Use normalize_path_components() to resolve '..' in symlink target paths - Check both package directories and env_root for cross-package symlinks 2. lfs.rs: Add normalize_path_components() to resolve '.' and '..' path components without requiring the path to exist (unlike canonicalize()) 3. link.rs: Remove fallback logic that masked the root cause 4. mirror/url.rs: Move url2legal_filename() here from utils.rs for better locality (only used in URL path conversion) 5. environment.rs: Fix path separator issue in find_command_in_registered_envs() by normalizing bin_dir paths to use backslashes on Windows The key insight is that on Windows: - symlink_dir sets FILE_ATTRIBUTE_DIRECTORY (0x10) - symlink_file does NOT set this flag - The tar crate's entry.unpack() doesn't consider symlink target type Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 4 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 6 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 5 个月前 | ||
| 5 个月前 | ||
| 4 个月前 |