當我使用emerge --sync
舊的 .ebuild 檔案時,它們會被刪除。如何取得較新的 .ebuild-s,但不遺失較舊的?
答案1
一種方法是覆寫預設的 portage rsync 選項,不包括刪除相關選項。預設選項目前/usr/lib/portage/pym/_emerge/actions.py
在我的位置從第 2039 行開始硬編碼。
排除“--force”和“--delete”,您將添加
PORTAGE_RSYNC_OPTS =“--recursive --links --safe-links --perms --times --compress --whole-file --stats --timeout = 180 --exclude = / distfiles --exclude = / local --排除=/包”
到/etc/make.conf
。大意是不再刪除任何檔案或目錄。
編輯:請注意,通常您不想保留任何您正在同步的 portage 樹中的此類 ebuild。
如果要保留特定的 ebuild,有兩種典型場景:
- 您正在使用想要保留的過時的 ebuild。
- 您自己編寫了一個 ebuild,或者您在某處找到了一個 ebuild,並將其添加到您正在同步的 portage 樹中。
在這兩種情況下,最佳解決方案是將這些 ebuild 複製到本地覆蓋。您可能還需要複製它們所依賴的 ebuild。以下是建立簡單的本地疊加層的方法:http://forums.gentoo.org/viewtopic-t-827407.html