ALT Linux Distributions development
 help / color / mirror / Atom feed
From: Michael Shigorin <mike@osdn.org.ua>
To: devel-distro@lists.altlinux.org
Subject: [devel-distro] install2 с доступной сетью
Date: Fri, 25 Nov 2011 16:00:11 +0200
Message-ID: <20111125140011.GC20710@osdn.org.ua> (raw)

[-- Attachment #1: Type: text/plain, Size: 931 bytes --]

	Здравствуйте.
Раздумываю над тем, что бы полезного сделать из installer.iso:
сейчас это чисто техническая промежуточная цель (и потому стоит
"спрятать" её или убрать из пространства имён distro/), так как
хотя stage1+stage2 и загружаются -- если не смонтировать что-то
в /image руками до применения разбивки, толку не будет.

Посмотрел в alterator-pkg -- поскольку работает (спасибо Большакову)
automatic=method:cdrom,network:dhcp, то можно попробовать сделать
откат на сетевую установку при недоступности /image/ALTLinux;
набросок прилагаю, но вопрос в том, что тогда ставить (прямо из
бранча не получится, для этого надо обучить alterator-pkg noarch,
что также понадобится для dual-arch).

Ещё надо бы сделать установку сразу с учётом updates при их
доступности...

В общем, если кого этот сумбур задел -- мысли приветствуются %)

-- 
 ---- WBR, Michael Shigorin <mike@altlinux.ru>
  ------ Linux.Kiev http://www.linux.kiev.ua/

[-- Attachment #2: 0001-initinstall.d-90-pkg.sh-fallback-to-remote-repo.patch --]
[-- Type: text/plain, Size: 2191 bytes --]

>From 99267a5f66b77bcd85ebbe21a021ac2c9afc13a5 Mon Sep 17 00:00:00 2001
From: Michael Shigorin <mike@altlinux.org>
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


             reply	other threads:[~2011-11-25 14:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-25 14:00 Michael Shigorin [this message]
2011-11-26 12:35 ` Радик Юсупов
2011-11-26 13:14   ` Michael Shigorin
2011-11-26 13:48     ` Denis Nazarov
2011-11-26 14:05       ` Michael Shigorin
2011-11-28  7:21     ` Dmitriy Kruglikov
2011-11-28  9:16       ` Michael Shigorin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111125140011.GC20710@osdn.org.ua \
    --to=mike@osdn.org.ua \
    --cc=devel-distro@lists.altlinux.org \
    --cc=shigorin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Distributions development

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel-distro/0 devel-distro/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel-distro devel-distro/ http://lore.altlinux.org/devel-distro \
		devel-distro@lists.altlinux.org devel-distro@lists.altlinux.ru devel-distro@lists.altlinux.com
	public-inbox-index devel-distro

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel-distro


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git