[lxc-devel] [lxc/master] only enable Debian's main repository by default

evgeni on Github lxc-bot at linuxcontainers.org
Sat Mar 26 10:31:25 UTC 2016


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 488 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20160326/b0db1f55/attachment.bin>
-------------- next part --------------
From 57b40c0852281f8a5cfc4286b5020b3bfd3a16b9 Mon Sep 17 00:00:00 2001
From: Evgeni Golov <evgeni at debian.org>
Date: Sat, 26 Mar 2016 11:28:52 +0100
Subject: [PATCH] only enable Debian's main repository by default

This inverts the logic done in c2a85d0 to default to "main only" and allow enabling contrib and non-free on user request.

Closes: #625

Signed-off-by: Evgeni Golov <evgeni at debian.org>
---
 templates/lxc-debian.in | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/templates/lxc-debian.in b/templates/lxc-debian.in
index 2c3a7e5..6dd6604 100644
--- a/templates/lxc-debian.in
+++ b/templates/lxc-debian.in
@@ -512,7 +512,7 @@ Options :
   --packages=PACKAGE_NAME1,PACKAGE_NAME2,...
                          List of additional packages to install. Comma separated, without space.
   -c, --clean            only clean up the cache and terminate
-  --main-only            include only Debian's main repository (i.e. no contrib and non-free).
+  --enable-non-free      include also Debian's contrib and non-free repositories.
 
 Environment variables:
 
@@ -525,7 +525,7 @@ EOF
     return 0
 }
 
-options=$(getopt -o hp:n:a:r:c -l arch:,clean,help,main-only,mirror:,name:,packages:,path:,release:,rootfs:,security-mirror: -- "$@")
+options=$(getopt -o hp:n:a:r:c -l arch:,clean,help,enable-non-free,mirror:,name:,packages:,path:,release:,rootfs:,security-mirror: -- "$@")
 if [ $? -ne 0 ]; then
         usage $(basename $0)
         exit 1
@@ -541,6 +541,7 @@ elif [ "$arch" = "armv7l" ]; then
     arch="armhf"
 fi
 hostarch=$arch
+mainonly=1
 
 while true
 do
@@ -550,7 +551,7 @@ do
 
         -a|--arch)            arch=$2; shift 2;;
         -c|--clean)           clean=1; shift 1;;
-           --main-only)       mainonly=1; shift 1;;
+           --enable-non-free) mainonly=0; shift 1;;
            --mirror)          MIRROR=$2; shift 2;;
         -n|--name)            name=$2; shift 2;;
            --packages)        packages=$2; shift 2;;


More information about the lxc-devel mailing list