why not just patching the python code of do-release-upgrade to skip/modify the part of the code that is wrong?
by the way, it is easier to use "chattr -i myfile", than creating a filesystem to mount it readonly :) Sebastien Estienne On Sun, Mar 1, 2009 at 00:29, sean darcy <[email protected]> wrote: > TJ wrote: >> On Sat, 2009-02-28 at 17:06 -0500, sean darcy wrote: >> >>>> It'll overwrite whatever is there. And, of course, >>>> us.archive.ubuntu.com does have feisty. >>>> >>> And, of course, us.archive.ubuntu.com does _NOT_ have feisty >> >> >> Sean, how about using a read-only file system to prevent the unwanted >> change? >> >> *If* it doesn't cause do-release-upgrade to throw a wobbly this might >> work: >> >> sudo -i >> >> dd if=/dev/zero of=/tmp/sources.list.d bs=1024 count=2048 >> losetup /dev/loop1 /tmp/sources.list.d >> mkfs.ext2 /dev/loop1 >> mkdir /mnt/apt >> mount /dev/loop1 /mnt/apt >> mv /etc/apt/sources.list.d/* /mnt/apt/ >> >> # make the changes to /mnt/apt/prerequists-sources.list >> >> umount /mnt/apt >> mount -o ro /dev/loop1 /etc/apt/sources.list.d >> >> do-release-upgrade >> >> # Obviously, at the end of the process, put things back as they were: >> >> umount /etc/apt/sources.list.d >> mount /dev/loop1 /mnt/apt >> mv /mnt/apt/* /etc/apt/sources.list.d/ >> umount /mnt/apt >> losetup -d /dev/loop1 >> rm /tmp/sources.list.d >> >> >> > Man - that is brilliant. And it shoulda worked, but it didn't :( > > A fatal error occured > Please report this as a bug and include the files > /var/log/dist-upgrade/main.log and /var/log/dist-upgrade/apt.log in your > report. The upgrade aborts now. > Your original sources.list was saved in /etc/apt/sources.list.distUpgrade. > Traceback (most recent call last): > > File "/tmp/tmpjg9FjS/gutsy", line 59, in <module> > app.run() > > File "/tmp/tmpjg9FjS/DistUpgradeControler.py", line 1346, in run > self.fullUpgrade() > > File "/tmp/tmpjg9FjS/DistUpgradeControler.py", line 1251, in fullUpgrade > if not self.getRequiredBackports(): > > File "/tmp/tmpjg9FjS/DistUpgradeControler.py", line 1140, in > getRequiredBackports > outfile = > open(os.path.join(apt_pkg.Config.FindDir("Dir::Etc::sourceparts"), > sourceslistd), "w") > > IOError: [Errno 30] Read-only file system: > '/etc/apt/sources.list.d/prerequists-sources.list' > > > But it does show where the problem is. > > Thanks for the suggestion. > > sean > > > -- > ubuntu-server mailing list > [email protected] > https://lists.ubuntu.com/mailman/listinfo/ubuntu-server > More info: https://wiki.ubuntu.com/ServerTeam > -- ubuntu-server mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-server More info: https://wiki.ubuntu.com/ServerTeam
