From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on sa.int.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.2.5 Date: Fri, 25 Nov 2011 16:00:11 +0200 From: Michael Shigorin To: devel-distro@lists.altlinux.org Message-ID: <20111125140011.GC20710@osdn.org.ua> Mail-Followup-To: devel-distro@lists.altlinux.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="OgqxwSJOaUobr8KG" Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.4.2.1i Subject: [devel-distro] =?koi8-r?b?aW5zdGFsbDIg0yDEz9PU1dDOz8og08XU2MA=?= X-BeenThere: devel-distro@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: shigorin@gmail.com, Distributions development List-Id: Distributions development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2011 14:00:30 -0000 Archived-At: List-Archive: --OgqxwSJOaUobr8KG Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit Здравствуйте. Раздумываю над тем, что бы полезного сделать из installer.iso: сейчас это чисто техническая промежуточная цель (и потому стоит "спрятать" её или убрать из пространства имён distro/), так как хотя stage1+stage2 и загружаются -- если не смонтировать что-то в /image руками до применения разбивки, толку не будет. Посмотрел в alterator-pkg -- поскольку работает (спасибо Большакову) automatic=method:cdrom,network:dhcp, то можно попробовать сделать откат на сетевую установку при недоступности /image/ALTLinux; набросок прилагаю, но вопрос в том, что тогда ставить (прямо из бранча не получится, для этого надо обучить alterator-pkg noarch, что также понадобится для dual-arch). Ещё надо бы сделать установку сразу с учётом updates при их доступности... В общем, если кого этот сумбур задел -- мысли приветствуются %) -- ---- WBR, Michael Shigorin ------ Linux.Kiev http://www.linux.kiev.ua/ --OgqxwSJOaUobr8KG Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-initinstall.d-90-pkg.sh-fallback-to-remote-repo.patch" >>From 99267a5f66b77bcd85ebbe21a021ac2c9afc13a5 Mon Sep 17 00:00:00 2001 From: Michael Shigorin Date: Fri, 25 Nov 2011 13:45:03 +0200 Subject: [PATCH] initinstall.d/90-pkg.sh: fallback to remote repo It is possible to build an image with propagator and install2 but without accompanying package base; refactored detection so that a fallback to remote repos is performed if no local repository root is at hand. We should actually consider fixing this up so updates repo can be used right for the installation if online (or LAN) access is available BUT the network is currently only available for http/ftp methods... --- alterator-pkg/initinstall.d/90-pkg.sh | 40 ++++++++++++++++++++------------ 1 files changed, 25 insertions(+), 15 deletions(-) diff --git a/alterator-pkg/initinstall.d/90-pkg.sh b/alterator-pkg/initinstall.d/90-pkg.sh index 00f54ef..d826fca 100755 --- a/alterator-pkg/initinstall.d/90-pkg.sh +++ b/alterator-pkg/initinstall.d/90-pkg.sh @@ -43,23 +43,33 @@ get_comps() return $ret } +local_comps() +{ + url="file:$image_dir" + comps="$(find "$image_dir"/ALTLinux \ + -mindepth 1 -maxdepth 1 -type d -name 'RPMS.*' -printf '%f\n' | + sed -e 's/^RPMS\.//' | + tr '\n' ' ')" + [ -d "$image_dir"/ALTLinux ] +} + +remote_comps() +{ + url="$image_url" + if get_comps "$url/ALTLinux/base/release" ; then + comps="$(cat "$release_file" | + sed -n -e '/\/release\./p' | + sed -e 's/.*\.//' | + tr '\n' ' ')" + else + comps="main" + fi +} + # create sources.list case "$METHOD" in - cdrom|disk|nfs) - url="file:$image_dir" - comps="$(find "$image_dir"/ALTLinux \ - -mindepth 1 -maxdepth 1 -type d -name 'RPMS.*' -printf '%f\n' | - sed -e 's/^RPMS\.//' | - tr '\n' ' ')" - ;; - http|ftp) - url="$image_url" - if get_comps "$url/ALTLinux/base/release" ; then - comps="$(cat "$release_file" | sed -n -e '/\/release\./p' | sed -e 's/.*\.//' | tr '\n' ' ')" - else - comps="main" - fi - ;; + cdrom|disk|nfs) local_comps || remote_comps;; + http|ftp) remote_comps;; esac printf 'rpm %s ALTLinux %s\n' "$url" "${comps% }" >/etc/apt/sources.list -- 1.7.7.3 --OgqxwSJOaUobr8KG--