mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-13 08:01:09 +00:00
Two changes to pbuilder-dist. 1) Use /var/cache/archive/$distro as an apt source if it exists. Useful for making locally-built packages available. 2) Set mirror and components correctly for debian distros.
This commit is contained in:
parent
d7d19fd41a
commit
fe8087a169
@ -17,6 +17,8 @@
|
||||
import sys
|
||||
import os
|
||||
|
||||
debian_distros = ["etch", "lenny", "sid", "stable", "testing", "unstable"]
|
||||
|
||||
class pbuilder_dist:
|
||||
|
||||
def __init__(self):
|
||||
@ -182,8 +184,18 @@ class pbuilder_dist:
|
||||
'--logfile "%(logfile)s"' % self,
|
||||
'--aptcache "/var/cache/apt/archives/"',
|
||||
### --mirror "${ARCHIVE}" \
|
||||
'--bindmounts /var/cache/archive/ --override-config'
|
||||
]
|
||||
|
||||
localrepo = '/var/cache/archive/%(target_distro)s' % self
|
||||
|
||||
if os.path.exists(localrepo):
|
||||
arguments.append('--othermirror "deb file:///var/cache/archive/ %(target_distro)s/"' % self)
|
||||
|
||||
if self.target_distro in debian_distros:
|
||||
arguments.append('--mirror "ftp://ftp.debian.org/debian"')
|
||||
arguments.append('--components "main contrib non-free"')
|
||||
|
||||
if self.build_architecture != self.system_architecture:
|
||||
arguments.append('--debootstrapopts --arch')
|
||||
arguments.append('--debootstrapopts "%(build_architecture)s"' % self)
|
||||
|
Loading…
x
Reference in New Issue
Block a user