Ubuntu QA:
BlogBrainstormPackage status
Log in
Ubuntu QA
The Ubuntu community has contributed 15312 ideas, 95871 comments, 1967999 votes
Idea sandbox Idea sandbox
Popular ideas Popular ideas
Ideas in development Ideas in development
Implemented ideas Implemented ideas
Idea #7959: apt-get from install CD should use the CD when useful

Written by tgape the 1 May 08 at 22:18. Category: Installation. Related project: Nothing/Others. Status: New
Rationale
Install CDs which are not full live filesystems generally have many of the install packages on them. However, apparently apt-get prefers getting them from online, because the install I just initiated a couple hours ago is fetching *everything* from the net, despite the fact that many of the packages are on the CD, and at least some of those are the latest version.

IMHO, if a version of a package exists on a CD, it should use that package, and only download a patch file, if that saves any time. If the version on the CD is the latest, it should certainly not download from the net - doing so wastes ubuntu.com bandwidth and consumes additional time.

Also, it should not be too difficult to do this as a stream (not quite a pipeline, keep reading.)

1. First process checks for packages that are on the CD. Any it finds, it fetches to the local store. Then, whether or not it found it, it outputs the package name to a fetch queue; if there is no process running the fetch queue, it forks one.

2. The second process, running the fetch queue, downloads any packages listed from online if either no package is present in the local store or if there's a newer version online and no patch available. If the package is in the local cache, but there is a patch available, it downloads just the patch file and applies it to the package. (See Linux Journal issue 170 page 38 for how to do binary patches.) When it has completed processing a package, or if it can't contact the ubuntu.com mirror and the package is in the local cache, it outputs the package name to the install queue. If there is no process running the install queue, it forks one.

3. The third process, running the install queue, simply installs packages.

All three stages use flushed input/output for their various queues. I would personally use regular files for each queue, one line per package, and tail -f to read the files. When the process writing the queue file finishes, it appends an end of queue flag to the file. When the process reading the queue file gets that, it either removes the file, or it moves it to an archive location. Alternatively, the files are named appropriately for archival, and if the debug flag's set, we simply compress it.
Tags: (none)

37
votes
up equal down
Solution #1: Auto-generated solution of idea #7959
Written by tgape the 1 May 08 at 22:18.
Ubuntu Brainstorm was updated in January 2009. Since the idea #7959 was submitted before this update, its rationale and solution are not separated. Please vote accordingly, and if you have the necessary rights, please separate the rationale from the solution. Thanks!

Propose your solution

Attachments
No attachments.


Duplicates


Comments
Nathan MWF wrote on the 2 May 08 at 19:44
The reason not to do this is that we want people who hand on their Ubuntu CD when their systems are up and running, not feel that they have to keep it like with Microsoft Windows and Office CDs.

nvivo wrote on the 2 May 08 at 20:18
I think the poster is talking about using the CD it that is in the drive. I see no problem in doing that.

If you have the CD, and that package is the latest version, apt-get/aptitude/adept could use that directly.

If the CD is not in the drive, it could ask if the user wants to insert the CD or download from internet.


tgape wrote on the 3 May 08 at 20:50
If you're not going to make use of the package that is on the CD, then why is the package on the CD? Free up that space to make a more usable live CD.

I am most certainly talking about install time while the CD is in the drive. I am most certainly not talking about prompting for a CD when they're looking to install new packages - if the CD's there, great, use it - but if it's not there, just go online.

I will point out again that by disregarding the package on the CD, the user experience for *everyone* doing online installs is degraded. Now, it could be that my experience was soured by the fact that I was doing my install around the time 8.04 was officially released - but with the online install experience I had, there's no way I'd recommend Ubuntu to others in its current state. Pass on the CD? You gotta be joking.

It's possible that I need to go into more detail regarding what I experienced:

- When attempting a Ubuntu Server install, the progress bar hung at 2% for 30 minutes to a couple hours, and then failed. Three times I tried, and three times it didn't work. I don't recall the exact error message, but it wasn't helpful.
- The third time I tried, I managed to find out that Alt-F4 would take me to log output detailing what was happening, and opening up Alt-F2, I could look at the whole log in /var/log/messages.
- I found the packages that failed in that log file - the error message did not indicate which package. All three packages were on the CD. All three packages were the latest version.

I also had additional frustrations beyond this; I feel that they should probably be covered in different places. This particular aspect, however, generated significant annoyance and seemed like something that would be trivial to get fixed. Further, the amount of effort it required to get it fixed would give me some indication whether I should pursue the other issues, or whether I should find another distribution. At this point, I'm getting the feeling I need another distribution, but I'm not giving up yet.


Post your comment