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

Re: apt-setup bugs / patch review



And the template for this one as sl3


On 10 May 2014 19:17, bofh80 <afm404@gmail.com> wrote:
OK, i've fixed the template for this one as suggested. Let me know of further changes.

As for what it does, all i can really do is point you at this:
Support for netrc
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=518473


On 10 May 2014 18:45, Christian PERRIER <bubulle@debian.org> wrote:
(dropping CC, please do so as well, as I'm subscribed to the list)

Quoting bofh80 (afm404@gmail.com):
> 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 ....

#sl2 markers give the "sublevel" where the strings will go. Sublevels
are specific to d-i and described in
http://d-i.alioth.debian.org/doc/i18n/ch01s04.html#sublevels

Here, these templates belong to sublevel 3 as they won't probably be
shown in default installs (they should be priority medium or low).


> +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

Here, I have to admit that I have absolutely no clue about *what*
should really be in the template (because I don't really understand
what's the purpose of the patch) but the wording definitely needs a
lot of improvement.

First, anyway, "string" templates can't use a question as synopsis.

You seem to expect users to enter something there, so you should
*prompt* them for this:

_Description: netrc-style entry:
 Please enter here....blah blah blah (explain what is expected there
 and avoid jargon).
 .
 For instance:
  machine packages.server.org login myuser password mypass

(note the double space meant to guarantee that the last line is
hard(formatted.




From 540c4ab23db3adf63b33daa110a97f834591acee Mon Sep 17 00:00:00 2001
From: "Anthony F. McInerney" <afm404@gmail.com>
Date: Sat, 10 May 2014 04:23:03 +0100
Subject: [PATCH] adding mirror deb-src booleon

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

diff --git a/debian/apt-mirror-setup.templates b/debian/apt-mirror-setup.templates
index 62d9bbb..c9ab38b 100644
--- a/debian/apt-mirror-setup.templates
+++ b/debian/apt-mirror-setup.templates
@@ -60,3 +60,11 @@ _Description: Continue without a network mirror?
  .
  If you are installing from a netinst CD and choose not to use a mirror,
  you will end up with only a very minimal base system.
+
+Template: mirror/http/source
+Type: boolean
+Default: true
+# :sl3:
+_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).
diff --git a/generators/50mirror b/generators/50mirror
index 4cb6bc4..006f43d 100755
--- a/generators/50mirror
+++ b/generators/50mirror
@@ -252,4 +252,9 @@ while [ ! "$done" ]; do
 	fi
 done
 
-echo "deb-src $protocol://$hostname$directory $codename $dists" >> $file
+db_get mirror/http/source
+if [ "$RET" = false ]; then
+	echo "#deb-src $protocol://$hostname$directory $codename $dists" >> $file
+else
+	echo "deb-src $protocol://$hostname$directory $codename $dists" >> $file
+fi
-- 
2.0.0.rc0


Reply to: