=== modified file 'debian/changelog' --- debian/changelog 2011-04-13 14:26:16 +0000 +++ debian/changelog 2011-04-13 16:31:41 +0000 @@ -12,6 +12,9 @@ [ Evan Dandrea ] * Remove the 'Bootloader device' line. See LP #726740. + * Install the restricted package after we've removed the unneeded + kernels, so dkms does not end up building against the wrong target + (LP: #759804). -- Jonathan Riddell Wed, 13 Apr 2011 10:08:02 +0100 === modified file 'scripts/plugininstall.py' --- scripts/plugininstall.py 2011-04-13 08:17:41 +0000 +++ scripts/plugininstall.py 2011-04-13 16:29:00 +0000 @@ -208,6 +208,9 @@ self.remove_extras() self.next_region() + if 'UBIQUITY_OEM_USER_CONFIG' not in os.environ: + self.install_restricted_extras() + self.db.progress('INFO', 'ubiquity/install/apt_clone_restore') try: self.apt_clone_restore() @@ -1036,30 +1039,7 @@ if inst_langpacks: self.verify_language_packs() - def install_extras(self): - """Try to install additional packages requested by installer - components.""" - - # We only ever install these packages from the CD. - sources_list = os.path.join(self.target, 'etc/apt/sources.list') - os.rename(sources_list, "%s.apt-setup" % sources_list) - old_sources = open("%s.apt-setup" % sources_list) - new_sources = open(sources_list, 'w') - found_cdrom = False - for line in old_sources: - if 'cdrom:' in line: - print >>new_sources, line, - found_cdrom = True - new_sources.close() - old_sources.close() - if not found_cdrom: - os.rename("%s.apt-setup" % sources_list, sources_list) - - self.do_install(install_misc.query_recorded_installed()) - - if found_cdrom: - os.rename("%s.apt-setup" % sources_list, sources_list) - + def install_restricted_extras(self): if self.db.get('ubiquity/use_nonfree') == 'true': self.db.progress('INFO', 'ubiquity/install/nonfree') package = self.db.get('ubiquity/nonfree_package') @@ -1085,6 +1065,30 @@ misc.execute('umount', '-f', self.target + '/sys') misc.execute('umount', '-f', self.target + '/dev') + def install_extras(self): + """Try to install additional packages requested by installer + components.""" + + # We only ever install these packages from the CD. + sources_list = os.path.join(self.target, 'etc/apt/sources.list') + os.rename(sources_list, "%s.apt-setup" % sources_list) + old_sources = open("%s.apt-setup" % sources_list) + new_sources = open(sources_list, 'w') + found_cdrom = False + for line in old_sources: + if 'cdrom:' in line: + print >>new_sources, line, + found_cdrom = True + new_sources.close() + old_sources.close() + if not found_cdrom: + os.rename("%s.apt-setup" % sources_list, sources_list) + + self.do_install(install_misc.query_recorded_installed()) + + if found_cdrom: + os.rename("%s.apt-setup" % sources_list, sources_list) + # TODO cjwatson 2007-08-09: python reimplementation of # oem-config/finish-install.d/07oem-config-user. This really needs # to die in a great big chemical fire and call the same shell script