[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: apt-setup bugs / patch review



Ok, here's the other patch too updated with a slightly better template thing. Now i noticed the _Description part is different, so i changed it, then noticed the other string entries don't have _Description parts.

I'm now reading http://www.fifi.org/doc/debconf-doc/tutorial.html  and https://www.debian.org/doc/packaging-manuals/debconf_specification.html   . Any other pages i should be looking at? Since i still can't find info on sl2 or _Decription vs Description ....


On 10 May 2014 17:33, Christian PERRIER <bubulle@debian.org> wrote:
Quoting bofh80 (afm404@gmail.com):

> +Template: mirror/http/source
> +Type: boolean
> +Default: true
> +# :sl2:
> +_Description: Generate deb-src for selected mirror
> +Set to false if you wish to comment out the deb-src line in
> +/etc/apt/sources.list.

That template need a style review. I'd propose something along the
lines of:

_Description: Add an entry for source packages downloads for the selected mirror?
 Choose this option if you want to create an entry in
 /etc/apt/sources.list for source packages downloads (deb-src entry).


(Debconf templates should not make reference to debconf widgets such
as "false" or "true" and boolean templates should have an
interrogative form in the synopsis)



From 6285c76d66e07af8dcd66489c25601cf62af2fbb Mon Sep 17 00:00:00 2001
From: "Anthony F. McInerney" <afm404@gmail.com>
Date: Tue, 6 May 2014 18:50:32 +0100
Subject: [PATCH] Adding netrc to generate auth.conf

Signed-off-by: Anthony F. McInerney <afm404@gmail.com>
---
 debian/apt-setup-udeb.templates | 7 +++++++
 generators/60local              | 7 +++++++
 2 files changed, 14 insertions(+)

diff --git a/debian/apt-setup-udeb.templates b/debian/apt-setup-udeb.templates
index 7b7afcf..9690a34 100644
--- a/debian/apt-setup-udeb.templates
+++ b/debian/apt-setup-udeb.templates
@@ -112,3 +112,10 @@ Description: for internal use; can be preseeded
  without using 'dpkg --force-architecture', in addition to the native
  architecture. If empty, only allow installing packages from the native
  architecture.
+
+Template: apt-setup/local/netrc
+Type: string
+_Description: Have a http apt repository that requires authentication?
+ Example: machine packages.server.org login myuser password mypass
+ Does not pull apt/localx/repostory as machine due to possible parse mangle
+ Formats as man netrc suggests
diff --git a/generators/60local b/generators/60local
index fcd4f1c..ade16f2 100755
--- a/generators/60local
+++ b/generators/60local
@@ -51,6 +51,13 @@ while db_get "apt-setup/local$i/repository" && [ "$RET" ]; do
 			fi
 		done
 	fi
+	netrc=
+	if db_get "apt-setup/local$i/netrc"; then
+		netrc="$RET"
+	fi
+	if [ -n "$netrc" ]; then
+		echo "$netrc">> $ROOT/etc/apt/auth.conf
+	fi
 	i="$(($i + 1))"
 done
 
-- 
2.0.0.rc0


Reply to: