check_for_release: the /opt/*_version.txt migration gives the app's version to any component
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 82/100
Hướng nghiên cứu
Báo cáo xác định lib/forge.func và check_for_release() là mã bị ảnh hưởng, đồng thời đưa ra cách tái hiện bằng check_for_gh_release. Đọc phần di chuyển /opt/*_version.txt của hàm đó và so sánh với phạm vi theo ứng dụng được dùng bởi var_appversion. Tái hiện bằng ví dụ Odoo và PDFKiln được cung cấp; hoàn tất khi bước kiểm tra của PDFKiln không còn dùng tệp phiên bản của Odoo, trong khi tệp cũ riêng của một ứng dụng vẫn được di chuyển.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
🔎 Did you run the script with verbose mode enabled?
Yes, verbose mode was enabled and the output is included below
🏷️ Which core version or commit are you on?
1b2c59e
🏗️ Host CPU architecture
amd64
📜 Which script (and repo) were you running when you hit this?
ct/odoo.sh (update) in community-scripts/ProxmoxVE, reproduced below with check_for_gh_release alone
🧩 Which engine file or function is affected, if known?
lib/forge.func, check_for_release(): the /opt/*_version.txt migration
🖥️ Which backend is this on?
Proxmox VE
🐧 Which container/VM OS and version?
Debian 13
📝 Provide a clear and concise description of the issue.
Without ~/.<app>, check_for_release takes the only /opt/*_version.txt as the version of <app>, copies it to ~/.<app> and deletes it, whichever app the file belongs to. So the first check of a second component takes the container's own version.
In an Odoo container (odoo-install.sh still writes /opt/Odoo_version.txt), check_for_gh_release "pdfkiln" "pdfkiln/pdfkiln" answered "No update available: pdfkiln (20.0.20261125)": PDFKiln was not installed, and Odoo's file, which ct/odoo.sh reads on its next update, was gone. community-scripts/ProxmoxVE#19035 works around it with [[ ! -f ~/.pdfkiln ]] ||. Any update that checks a component before the app itself hits the same on a container that still has its legacy file.
🔄 Steps to reproduce the issue.
Debian 13 with jq and curl (WSL2 here; the function does not depend on the backend), lib/forge.func at 1b2c59e, msg_* and ensure_dependencies stubbed, VERBOSE=yes:
echo 20.0.20261125 > /opt/Odoo_version.txt
NSAPP=odoo; source lib/forge.func
check_for_gh_release pdfkiln pdfkiln/pdfkiln; echo "rc=$?"
ls /opt; cat ~/.pdfkiln
❌ Paste the full error output (if available).
Checking for update: pdfkiln
No update available: pdfkiln (20.0.20261125)
rc=1
20.0.20261125
/opt is empty afterwards.
🖼️ Additional context (optional).
Scoping the migration to the script's own app, as var_appversion already is, fixes it:
- else
+ elif _forge_is_script_app "$app" "${NSAPP:-$app}"; then
mapfile -t legacy_files < <(find /opt -maxdepth 1 -type f -name "*_version.txt" 2>/dev/null)
The same steps then give "Update available: pdfkiln not installed -> 1.5.0" and keep /opt/Odoo_version.txt, and an app's own check still migrates its file (restic: 0.17.0 -> 0.20.0, moved to ~/.restic). I can open a PR with a test if that helps.
- Ngôn ngữ chính
- Shell
- Star
- 14
- Fork
- 20
- Merge trung bình
- 8 giờ 8 phút
- Pull request đã merge (30 ngày)
- 125
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của community-scripts/core
-
Proposal: reusable CTID ranges and CTID-derived MAC/IP defaultsCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
community-scripts/core#142 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của community-scripts/core
Issue tương tự
-
severity: low
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
luainkernel/lunatik#2727 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[quality] release publish.mjs integrity guards have no unit testCó thể đã có người làm @robarnold đã nhận hôm nay. Đang mởagent/quality stage/040-covered-by-pr testing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
marinatedconcrete/config#1155 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
melodic-software/claude-code-plugins#19225 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug report-to-upstream
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
flatpark/flatpark#1585 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation-and-adrs: drift check reports "current" in a shallow cloneCó thể đã có người làm @leninworld đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
addyosmani/agent-skills#817 ·
Maintainer thường phản hồi trong vòng 3 ngày