get '##' comment lines through to /etc/apt/sources.list (LP: #627439)

This commit is contained in:
Scott Moser 2010-08-31 10:24:58 -04:00
parent 3519818688
commit 921c5a4656
2 changed files with 31 additions and 29 deletions

View File

@ -46,7 +46,9 @@ def do_include(str,parts):
for line in str.splitlines():
if line == "#include": continue
if line.startswith("#"): continue
content = urllib.urlopen(line).read()
try:
content = urllib.urlopen(line).read()
except Exception e:
process_includes(email.message_from_string(decomp_str(content)),parts)
def process_includes(msg,parts):

View File

@ -1,53 +1,53 @@
## Note, this file is written by cloud-init on first boot of an instance
## modifications made here will not survive a re-bundle.
## if you wish to make changes you can:
## a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg
## or do the same in user-data
## b.) add sources in /etc/apt/sources.list.d
##
\## Note, this file is written by cloud-init on first boot of an instance
\## modifications made here will not survive a re-bundle.
\## if you wish to make changes you can:
\## a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg
\## or do the same in user-data
\## b.) add sources in /etc/apt/sources.list.d
\###
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb $mirror $codename main
deb-src $mirror $codename main
## Major bug fix updates produced after the final release of the
## distribution.
\## Major bug fix updates produced after the final release of the
\## distribution.
deb $mirror $codename-updates main
deb-src $mirror $codename-updates main
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
\## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
\## team. Also, please note that software in universe WILL NOT receive any
\## review or updates from the Ubuntu security team.
deb $mirror $codename universe
deb-src $mirror $codename universe
deb $mirror $codename-updates universe
deb-src $mirror $codename-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
\## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
\## team, and may not be under a free licence. Please satisfy yourself as to
\## your rights to use the software. Also, please note that software in
\## multiverse WILL NOT receive any review or updates from the Ubuntu
\## security team.
# deb $mirror $codename multiverse
# deb-src $mirror $codename multiverse
# deb $mirror $codename-updates multiverse
# deb-src $mirror $codename-updates multiverse
## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
\## Uncomment the following two lines to add software from the 'backports'
\## repository.
\## N.B. software from this repository may not have been tested as
\## extensively as that contained in the main release, although it includes
\## newer versions of some applications which may provide useful features.
\## Also, please note that software in backports WILL NOT receive any review
\## or updates from the Ubuntu security team.
# deb $mirror $codename-backports main restricted universe multiverse
# deb-src $mirror $codename-backports main restricted universe multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
\## Uncomment the following two lines to add software from Canonical's
\## 'partner' repository.
\## This software is not part of Ubuntu, but is offered by Canonical and the
\## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu $codename partner
# deb-src http://archive.canonical.com/ubuntu $codename partner