pf-tools commit: r650 [ccaillet-guest] - in /branches/0.33-stable: debian/changelog sbin/mk_sourceslist

parmelan-guest at users.alioth.debian.org parmelan-guest at users.alioth.debian.org
Wed Oct 8 09:50:24 UTC 2008


Author: ccaillet-guest
Date: Wed Oct  8 09:50:24 2008
New Revision: 650

URL: http://svn.debian.org/wsvn/pf-tools/?sc=1&rev=650
Log:
* Features enhancement release
* Now we can add offical backports repositories with mk_sourceslist

Modified:
    branches/0.33-stable/debian/changelog
    branches/0.33-stable/sbin/mk_sourceslist

Modified: branches/0.33-stable/debian/changelog
URL: http://svn.debian.org/wsvn/pf-tools/branches/0.33-stable/debian/changelog?rev=650&op=diff
==============================================================================
--- branches/0.33-stable/debian/changelog (original)
+++ branches/0.33-stable/debian/changelog Wed Oct  8 09:50:24 2008
@@ -1,3 +1,10 @@
+pf-tools (0.33.7-1) unstable; urgency=low
+
+  * Features enhancement release
+  * Now we can add offical backports repositories with mk_sourceslist
+
+ -- Christophe Caillet <quadchris at free.fr>  Wed, 08 Oct 2008 11:45:14 +0200
+
 pf-tools (0.33.6-1) unstable; urgency=low
 
   * Backport r646 from trunk for pressed server hardcoded value

Modified: branches/0.33-stable/sbin/mk_sourceslist
URL: http://svn.debian.org/wsvn/pf-tools/branches/0.33-stable/sbin/mk_sourceslist?rev=650&op=diff
==============================================================================
--- branches/0.33-stable/sbin/mk_sourceslist (original)
+++ branches/0.33-stable/sbin/mk_sourceslist Wed Oct  8 09:50:24 2008
@@ -37,6 +37,7 @@
 my $TPL		= "/usr/share/pf-tools/templates/sources.list.tpl" ;
 my $SECTIONS	= "common" ;
 my $HOST	= `/bin/hostname -s 2>>/dev/null` ;
+my $BACKPORTS	= 0 ;
 
 my $DEF_SECTIONS = {} ;
 $DEF_SECTIONS->{'debian'}	= "main contrib non-free" ;
@@ -57,20 +58,22 @@
 $program - version $version
 
 Synopsis : $program [-h|--help] [-s|--src <private-network source] [-d|--dst <sources.list dest>]
-		[ -t|--tpl <sources.list template>] [--host <hostname>] [[section] [section]]
+		[ -t|--tpl <sources.list template>] [-b|--backports] [--host <hostname>] [[section] [section]]
 
 	This tool permits to build the sources.list file according to distribution defined
 	in private-network file from PF-Tools configuration. It can also add some sections
 	to custom repository
 
-	-h | --help	Displays this message and exits
+	-h | --help		Displays this message and exits
 
-	-s | --src	Defines here where to find the private-network file
+	-s | --src		Defines here where to find the private-network file
 
-	-d | --dst	Defines here where to build the sources.list file
+	-d | --dst		Defines here where to build the sources.list file
 
-	-t | --tpl	Defines here where to find the sources.list template. If not defined
-			the program will use /usr/share/pf-tools/templates/sources.list.tpl
+	-t | --tpl		Defines here where to find the sources.list template. If not defined
+				the program will use /usr/share/pf-tools/templates/sources.list.tpl
+
+	-b | --backports	Adds the backport repository from debian-backports
 
 	--host		Defines for which hostname you want to build the sources.list. This
 			option is mainly for debugging
@@ -109,6 +112,20 @@
 	$sources_content =~ s/%DEFAULT_SECTIONS%/$DEF_SECTIONS->{$dist_src}/gs ;
 	$sources_content =~ s/%CUSTOM_SECTIONS%/$sections/gs ;
 
+	if ( $BACKPORTS ) {
+		my $back_src ;
+		my $back_sections ;
+		if ( $dist_src eq 'debian' ) {
+			$back_src = $dist_src."-backports" ;
+			$back_sections = "main contrib non-free" ;
+		}
+		elsif ( $dist_src eq 'ubuntu' ) {
+			$back_src = $dist_src ;
+			$back_sections = "main universe restricted multiverse" ;
+		}
+		$sources_content .= "\ndeb http://mirrors.private/".$back_src." ".$ref_srv->{'distrib'}."-backports ".$back_sections."\n" ;
+	}
+
 	if ( ! open ( DST, ">".$dst ) ) {
 		warn "Unable to open destination's sources.list ".$dst."\n" ;
 		return 1 ;
@@ -123,7 +140,8 @@
 	'host=s'	=> \$HOST,
 	's|src=s'	=> \$SRC,
 	'd|dst=s'	=> \$DST,
-	't|tpl=s'	=> \$TPL
+	't|tpl=s'	=> \$TPL,
+	'b|backports'	=> \$BACKPORTS
 ) || die "Didn't grok options on CLI\n" ;
 
 if ( $HELP ) {




More information about the pf-tools-commits mailing list