~ubuntu-core-dev/update-manager/main

« back to all changes in this revision

Viewing changes to DistUpgrade/DistUpgradeController.py

  • Committer: Michael Vogt
  • Date: 2008-11-14 19:03:53 UTC
  • Revision ID: michael.vogt@ubuntu.com-20081114190353-tnrwn4pvarb9gxyb
* debian/rules 
  - remove the arch-build target
* DistUpgrade/DistUpgradeController.py:
  - improvements to the sources.list rewriting, better tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
385
385
                        # we replace the sources.list with a single
386
386
                        # line to ubuntu-main
387
387
                        logging.warning('get_distro().enable_component("man") failed, overwriting sources.list instead as last resort')
388
 
                        s = "deb http://archive.ubuntu.com/ubuntu %s main" % self.toDist
 
388
                        s =  "# auto generated by update-manager"
 
389
                        s += "deb http://archive.ubuntu.com/ubuntu %s main restricted" % self.toDist
 
390
                        s += "deb http://archive.ubuntu.com/ubuntu %s-updates main restricted" % self.toDist
 
391
                        s += "deb http://security.ubuntu.com/ubuntu %s-security main restricted" % self.toDist
389
392
                        open("/etc/apt/sources.list","w").write(s)
390
393
                    break
391
394
            
496
499
                    logging.debug("moving %s source entry to 'ports.ubuntu.com' " % self.arch)
497
500
                    entry.uri = "http://ports.ubuntu.com/ubuntu-ports/"
498
501
                    
499
 
 
500
502
            # disable anything that is not from a official mirror
501
503
            if not validMirror:
502
504
                entry.disabled = True
541
543
 
542
544
                    # add some defaults here
543
545
                    # FIXME: find mirror here
 
546
                    logging.info("generate new default sources.list")
544
547
                    uri = "http://archive.ubuntu.com/ubuntu"
545
548
                    comps = ["main","restricted"]
546
549
                    self.sources.add("deb", uri, self.toDist, comps)