[英]Is there any setting in the preseed file to ignore the Release 'Valid_Until' option?
我剛剛配置了一個預置文件以包含本地存儲庫。
# Debian mirrors
d-i apt-setup/local0/comment string local mirror
d-i apt-setup/local0/repository string http://<repo_url>
d-i apt-setup/local0/key string http://<repo_key>
我在這里面臨的主要問題是,由於“發布”文件已於幾天前到期,因此回購未添加到sources.list中,因此我無法獲取所需的某些軟件包。
我知道可以將此選項添加到apt.conf文件中:
Acquire::Check-Valid-Until "false"
這將忽略Releases文件在一段時間前過期的事實。 但是,我確實需要一種在預置文件中包含相同選項的方法。 為此,我一直在尋找可能的解決方案:
這名德國開發人員似乎也遭受了同樣的困擾( https://lists.debian.org/debian-user-german/2012/04/msg00382.html )。 基本上,建議他嘗試添加:
di apt-setup/check_valid_until boolean false
但我嘗試了該選項,但沒有成功。
我考慮過要在late_command階段添加一些內容以相應地更新sources.list(即執行
in-target echo <my_mirror_information> >> /etc/apt/sources.list.d/custom.list in-target apt-get -o Acquire::Check-Valid-Until="false" update in-target apt-get upgrade
但是,我確實認為這不是解決問題的正確方法,因為准備了一個apt-setup部分來處理這些問題。
我可以在本文中使用其他解決方案嗎?
非常感謝你!
有同樣的問題,也沒有找到解決方案,我最終還是使用了以下方法:
d-i partman/early_command string echo "echo 'Acquire::Check-Valid-Until \"false\";' > /target/etc/apt/apt.conf.d/02IgnoreValidUntil" > /usr/lib/apt-setup/generators/02IgnoreValidUntil ; chmod +x /target/etc/apt/apt.conf.d/02IgnoreValidUntil
這是給Debian / Jessie的
這有效:
d-i partman/early_command string echo "echo 'Acquire::Check-Valid-Until \"false\";' > /target/etc/apt/apt.conf.d/02IgnoreValidUntil" > /usr/lib/apt-setup/generators/02IgnoreValidUntil ; chmod +x /usr/lib/apt-setup/generators/02IgnoreValidUntil
預置/運行字符串script.sh
在“ script.sh”內部:
fix_apt_repo_expire()
{
local APT_DIR="/target/etc/apt/apt.conf.d"
while [ ! -d "$APT_DIR" ]; do sleep 1; done
echo 'Acquire::Check-Valid-Until "false";' > "$APT_DIR"/90ignore-repo-expiry
}
fix_apt_repo_expire &
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.