[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1011228: Questions hold up upgrades.



Package: apt
Version: apt 2.4.5 (amd64)
Severity: wishlist

I was upgrading my system and expected the upgrade to take about
an hour. So after the initial questions at the start I went off 
to do other things. When I came back there was a new question about
some file I had modified. 

IMHO it should be easy to make a dependency graph of the upgrade. 
Need to fetch packageX before I can unpack packageX and need to
unpack packageX before I can run the install scripts for packageX. 

And: dependencies dictate that packageX is installed for packageY. 
So we better finish installing packageX before we (unpack or run
the install script. Some thought will need to go into which one
is required) pacakgeY. (maybe unpacking can already be done before
we've run the install script). 

Now things are possible, like "start installing when the download
of "later" packages is still in progress. 
And: move the questions all to the end instead of having them
happen somewhere in the middle of a long install/upgraded. 

That more-or-less automatically happens if you continue to install
unrelated stuff should a question be asked. 

Possibly: for testing: you might write out the dependency tree
as a Makefile. 

all: installed_packageX

installed_packageX: unpacked_packageX
	run_installscript packageX 

unpacked_packageX: fetched_packageX
	unpacack packageX

fetched_packageX:
	fetch packageX

installed_packageY: installed_packageX unpacked_packageY
	run_installscript packageY 

unpacked_packageY: fetched_packageY
	unpacack packageY

fetched_packageY:
	fetch packageY


Running make will now intermixing fetching and installing whatever
can be installed. Adding -j 5 will allow overlap between the
different tasks, but fetching multiple packages at once may
be counter-productive (although... from different sites, that is
already done atm, right?) 

But if one task gets "stuck" asking for a question, 4 other threads
can continue to fetch, unpack and install packages that are not related. 

For final version. I do think that you need to handle the dependencies
and parallelism inside apt. There should be a single "asking questions" 
thread, and I don't know a good way to teach that to Make wile still
allowing parallelism on other stuff. 


Reply to: