tags 402645 + patch thanks > At network configuration time, you can decide not to configure the > network. But nevertheless, d-i keeps complaining at several occasions > that it can't contact the apt archive: once for the mirrors > configuration, and once for the security archive. This use case could be better supported with the one of the attached patches. They fit quite nicely with my recent changes in apt-setup. One disadvantage of the first patch is that the user will no longer have a commented out entry for the security mirror in his sources list. If that is undesired, then the second patch could be considered instead. Cheers, FJP
Index: debian/changelog =================================================================== --- debian/changelog (revision 48969) +++ debian/changelog (working copy) @@ -1,3 +1,10 @@ +apt-setup (1:0.26) UNRELEASED; urgency=low + + * Default to not using mirrors if the user selected to not configure the + network in netcfg. + + -- Frans Pop <fjp@debian.org> Thu, 16 Aug 2007 11:07:16 +0200 + apt-setup (1:0.25) unstable; urgency=low [ Frans Pop ] Index: generators/50mirror =================================================================== --- generators/50mirror (revision 48969) +++ generators/50mirror (working copy) @@ -53,6 +53,13 @@ use_prio=high ;; esac + # Default to false if no network selected in netcfg + if db_get netcfg/dhcp_options && \ + [ "$RET" = "Do not configure the network at this time" ]; then + use_mirror=false + use_prio=medium + fi + # Only set default if not preseeded or already asked # Hack alert: for this to work no default is set in template db_get apt-setup/use_mirror Index: generators/90services-select =================================================================== --- generators/90services-select (revision 48969) +++ generators/90services-select (working copy) @@ -40,6 +40,12 @@ exit fi +# Default to no services if no network selected in netcfg +if db_get netcfg/dhcp_options && \ + [ "$RET" = "Do not configure the network at this time" ]; then + db_set apt-setup/services-select "" +fi + volatile=y if [ "$suite" != stable ] && [ "$suite" != oldstable ]; then disable_service volatile || true
Index: debian/changelog =================================================================== --- debian/changelog (revision 48969) +++ debian/changelog (working copy) @@ -1,3 +1,11 @@ +apt-setup (1:0.26) UNRELEASED; urgency=low + + * Default to not using a mirror if the user selected to not configure the + network in netcfg. Mirrors for update services are added commented out + without testing for them. + + -- Frans Pop <fjp@debian.org> Thu, 16 Aug 2007 11:19:18 +0200 + apt-setup (1:0.25) unstable; urgency=low [ Frans Pop ] Index: generators/50mirror =================================================================== --- generators/50mirror (revision 48969) +++ generators/50mirror (working copy) @@ -53,6 +53,13 @@ use_prio=high ;; esac + # Default to false if no network selected in netcfg + if db_get netcfg/dhcp_options && \ + [ "$RET" = "Do not configure the network at this time" ]; then + use_mirror=false + use_prio=medium + fi + # Only set default if not preseeded or already asked # Hack alert: for this to work no default is set in template db_get apt-setup/use_mirror Index: generators/91security =================================================================== --- generators/91security (revision 48969) +++ generators/91security (working copy) @@ -28,16 +28,22 @@ fi done -CODE=0 +# Don't test mirror if no network selected in netcfg echo "deb http://$host/ $codename/updates $dists" >> $file -export ASV_TIMEOUT="-o Acquire::http::Timeout=30" -if ! apt-setup-verify $file; then - db_subst apt-setup/service-failed HOST "$host" - db_input critical apt-setup/service-failed || true - if ! db_go; then - exit 10 # back up +if db_get netcfg/dhcp_options && \ + [ "$RET" = "Do not configure the network at this time" ]; then + CODE=9 +else + CODE=0 + export ASV_TIMEOUT="-o Acquire::http::Timeout=30" + if ! apt-setup-verify $file; then + db_subst apt-setup/service-failed HOST "$host" + db_input critical apt-setup/service-failed || true + if ! db_go; then + exit 10 # back up + fi + CODE=9 fi - CODE=9 fi echo "deb-src http://$host/ $codename/updates $dists" >> $file Index: generators/92volatile =================================================================== --- generators/92volatile (revision 48969) +++ generators/92volatile (working copy) @@ -34,16 +34,22 @@ fi done -CODE=0 +# Don't test mirror if no network selected in netcfg echo "deb http://$host/debian-volatile $codename/volatile $dists" >> $file -export ASV_TIMEOUT="-o Acquire::http::Timeout=30" -if ! apt-setup-verify $file; then - db_subst apt-setup/service-failed HOST "$host" - db_input critical apt-setup/service-failed || true - if ! db_go; then - exit 10 # back up +if db_get netcfg/dhcp_options && \ + [ "$RET" = "Do not configure the network at this time" ]; then + CODE=9 +else + CODE=0 + export ASV_TIMEOUT="-o Acquire::http::Timeout=30" + if ! apt-setup-verify $file; then + db_subst apt-setup/service-failed HOST "$host" + db_input critical apt-setup/service-failed || true + if ! db_go; then + exit 10 # back up + fi + CODE=9 fi - CODE=9 fi echo "deb-src http://$host/debian-volatile $codename/volatile $dists" >> $file
Attachment:
signature.asc
Description: This is a digitally signed message part.