From 7a13c54ca57d850ca040c2ec93ad09d080164940 Mon Sep 17 00:00:00 2001 From: Iain Lane Date: Mon, 29 Sep 2008 11:23:49 +0100 Subject: [PATCH 1/3] Only bind-mount /var/cache/archive if it actually exists --- pbuilder-dist.new | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pbuilder-dist.new b/pbuilder-dist.new index 48755bb..0e605fb 100755 --- a/pbuilder-dist.new +++ b/pbuilder-dist.new @@ -198,10 +198,12 @@ class pbuilder_dist: '--logfile "%(logfile)s"' % self, '--aptcache "/var/cache/apt/archives/"', ### --mirror "${ARCHIVE}" \ - '--bindmounts "/var/cache/archive/"', '--override-config', ] - + + if os.path.exists("/var/cache/archive/"): + arguments.append('--bindmounts "/var/cache/archive/"') + localrepo = '/var/cache/archive/%(target_distro)s' % self if os.path.exists(localrepo): arguments.append('--othermirror ' +\ From 43af4c2d54ac4d86f4092a66674734067605c471 Mon Sep 17 00:00:00 2001 From: Iain Lane Date: Mon, 29 Sep 2008 11:25:43 +0100 Subject: [PATCH 2/3] Don't set self.base to the proxy address - it generates invalid filenames causing operations to fail --- pbuilder-dist.new | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pbuilder-dist.new b/pbuilder-dist.new index 0e605fb..eb02edc 100755 --- a/pbuilder-dist.new +++ b/pbuilder-dist.new @@ -107,10 +107,10 @@ class pbuilder_dist: self.target_distro = self.system_distro - if 'http_proxy' in os.environ: - self.base = os.environ['http_proxy'] - elif 'HTTP_PROXY' in os.environ: - self.base = os.environ['HTTP_PROXY'] +# if 'http_proxy' in os.environ: +# self.base = os.environ['http_proxy'] +# elif 'HTTP_PROXY' in os.environ: +# self.base = os.environ['HTTP_PROXY'] ############################################################## From 13ba43bddf7e1f7334833a0c044a68b95c946a5e Mon Sep 17 00:00:00 2001 From: Iain Lane Date: Mon, 29 Sep 2008 14:01:34 +0100 Subject: [PATCH 3/3] Remove proxy references - pbuilder seems to detect it fine --- pbuilder-dist.new | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/pbuilder-dist.new b/pbuilder-dist.new index eb02edc..1565cec 100755 --- a/pbuilder-dist.new +++ b/pbuilder-dist.new @@ -67,9 +67,6 @@ class pbuilder_dist: # 'distribution' or 'distribution-architecture'. self.chroot_string = None - # Proxy - self.proxy = None - # Authentication method self.auth = 'sudo' @@ -107,11 +104,6 @@ class pbuilder_dist: self.target_distro = self.system_distro -# if 'http_proxy' in os.environ: -# self.base = os.environ['http_proxy'] -# elif 'HTTP_PROXY' in os.environ: -# self.base = os.environ['HTTP_PROXY'] - ############################################################## def __getitem__(self, name): @@ -212,14 +204,13 @@ class pbuilder_dist: if self.target_distro in debian_distros: arguments.append('--mirror "ftp://ftp.debian.org/debian"') arguments.append('--components "main contrib non-free"') + else: + arguments.append('--components "main restricted universe multiverse"') if self.build_architecture != self.system_architecture: arguments.append('--debootstrapopts --arch') arguments.append('--debootstrapopts "%(build_architecture)s"' % self) - if self.proxy: - arguments.append('--http-proxy "%(proxy)s"' % self) - ### $( [ $ISDEBIAN != "False" ] || echo "--aptconfdir \"${BASE_DIR}/etc/${DISTRIBUTION}/apt.conf/\"" ) \ # Append remaining arguments