dskvr / opkg

Automatically exported from code.google.com/p/opkg
0 stars 0 forks source link

Install package(s) only after download of all needed packages. #116

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The behavior of install and upgrade process should be the same as in apt and 
yum: 
when you execute install or upgrade all dependencies are downloaded first and 
then if all needed packages are downloaded install/upgrade process proceeds.
Otherwise upgrade/install process could be interrupted if packages responsible 
for network managing will be upgraded.

Original issue reported on code.google.com by KirG...@gmail.com on 30 Dec 2013 at 11:05

GoogleCodeExporter commented 8 years ago
Annoyingly, the API function "opkg_install_package()" and the command-line 
handler "opkg_install_cmd()" do things completely differently. It looks like 
opkg_install_package does what you suggest. When I merge this code into a 
single handler for both entry points I'll make sure it does download everything 
first.

Original comment by paul.betafive on 1 Jan 2014 at 10:14

GoogleCodeExporter commented 8 years ago
Is that the best idea for memory constrained embedded systems? With a large 
upgrade set, you could potentially need to download more packages than you can 
store temporarily.

In the case of networking interfering with the upgrade process, I have a 
solution. It comes in two parts. The first part is a patch to opkg to address 
issue 104. This patch will cause opkg to call prerm and postrm scripts with the 
"upgrade" argument. The second part is a change to OpenEmbedded 
update-rc.d.bbclass, which provides the prerm/postrm and preinst/postinst 
scripts. These scripts will take heed of the "upgrade" argument and restart the 
service only at the postinst stage when you are doing an upgrade. See 
http://lists.openembedded.org/pipermail/openembedded-core/2014-October/097983.ht
ml

The second part is specific to the distribution and the init system in use.

Original comment by peteru...@gmail.com on 15 Oct 2014 at 11:27

GoogleCodeExporter commented 8 years ago
My comment was from a few months back and doesn't quite reflect my recent 
thinking: after considering this more, it needs to be an option for opkg as 
different embedded systems may want to do things differently. We need to have 
an option to download each package as it is required and an option to download 
all required packages upfront before installation begins. The exact way this 
works can be decided after v0.3.0 is released.

Original comment by paul.betafive on 15 Oct 2014 at 11:30

GoogleCodeExporter commented 8 years ago
This is the behavior I want for my system; if all upgrades don't download 
successfully, then don't do an upgrade.  The workaround for me at this point 
has been to do "opkg upgrade --download-only" and verify that everything 
downloaded without error.  Could the fix be as simple as adding a command line 
options such as "--download-all" that essentially performs "opkg upgrade 
--download-only" first, verifies all downloads completed successfully and the 
performing "opkg upgrade" if all files downloaded successfully?

Original comment by evensonb...@gmail.com on 16 Oct 2014 at 12:15