Page 1 of 2
[SOLVED] Calculating TOTAL disk space for a package
Published: April 24, 2020 - 11:46 AM
by florentR2
Hello,
how can I accurately estimate the disk space required for a package?
I'm not talking about the disk space to specify in the control file, but the total space needed.
If I understand WAPT's mechanism correctly, it downloads the .wapt file, then decompresses it upon shutdown and launches the installation?
For example, for a 7 GB package, we should therefore estimate at least 21 GB of free space? (7 GB for the .wapt file + 7 GB for decompression to a temporary folder + at least 7 GB for the space used by the installation)?
Another question related to the same question: is cache clearing done at the end of each package installation or after ALL packages have been installed?
If it's only at the end, is there a way to force it between each package?
Re: Calculating disk space for a package
Published: April 24, 2020 - 12:05 PM
by sfonteneau
florentR2 wrote: ↑Apr 24, 2020 - 11:46 AM
Hello,
How can I accurately estimate the disk space required for a package?
I'm not talking about the disk space to specify in the control file, but the total space needed.
If I understand WAPT's mechanism correctly, it downloads the .wapt file, then decompresses it upon shutdown and then launches the installation?
For example, for a 7 GB package, we should therefore estimate at least 21 GB of free space? (7 GB for the .wapt file + 7 GB for decompression to a temporary folder + at least 7 GB for the space used by the installation)?
Yes
Basically, you need 3 times the size on the PC, for downloading, for extraction, for installation.
florentR2 wrote: ↑Apr 24, 2020 - 11:46
Another question within the same question: does cache clearing happen at the end of each package installation or after ALL packages have been installed?
If it's only at the end, is there a way to force it between each package?
That's a good point, we only run a cache package cleanup at the end of the upgrade, we could improve that.

Re: Calculating disk space for a package
Published: April 24, 2020 - 12:16 PM
by florentR2
That's a good point; we only run cache package cleanup at the end of the upgrade, which could be improved.

Top
In our case, we have some rooms that have nearly a hundred software programs, and today with SSD drives, we are somewhat limited in capacity.
If the disk space needs to be multiplied by 3 before installation, I'm not sure it will work.
Or is there a possible workaround to make it download/install the packages in several stages?
Re: Calculating disk space for a package
Published: April 24, 2020 - 12:22 PM
by vcardon
florentR2 wrote: ↑Apr 24, 2020 - 12:16
In our case we have some rooms that have nearly a hundred software programs and today with SSD disks we are a little limited in capacity.
Florent, what sector of activity do you work in to have nearly a hundred software programs installed on the workstations, just out of curiosity.
Vincent
Re: Calculating disk space for a package
Published: April 24, 2020 - 12:34 PM
by florentR2
Florent, what sector of activity do you work in to have nearly a hundred software programs installed on the workstations, just out of curiosity.
At a university.
We try to reduce this number as much as possible, but for some rooms which have a very wide use across different fields, we don't have much of a choice.
I may have exaggerated the figure of 100 but we're not very far off (around 70).
Re: Calculating disk space for a package
Published: April 24, 2020 - 1:08 PM
by sfonteneau
For the moment, I don't have a quick fix to offer, but:
In a Wapt package, `control.filename` is the name of the package being installed, so you can delete it at the end of your installation.
What I also understand is that there should be an option to prevent the update from downloading packages waiting to be installed.
This mode will allow you to download the package only during the installation process, which will solve your problem. (I should point out that this mode will not be the default.)
Re: Calculating disk space for a package
Published: April 24, 2020 - 1:22 PM
by florentR2
Thanks.

I'll try deleting large packages at the end of their installation; that should solve a good part of the problem.
The rest is optional because it doesn't really apply to other uses, like a laptop without Wi-Fi when shutting down.
Re: Calculating disk space for a package
Published: April 24, 2020 - 2:22 PM
by vcardon
Florent,
please keep us updated on the results you get with the method Simon suggested. It could be included in a section of the documentation if you achieve satisfactory results.
Have a good weekend.
Vincent
Re: Calculating disk space for a package
Published: April 24, 2020 - 4:22 PM
by florentR2
sfonteneau wrote: ↑Apr 24, 2020 - 1:08 PM
For the moment I don't have a quick patch to offer but:
In a wapt package control.filename is the name of the package being installed so you can delete it at the end of your installation.
To be sure we're going down the right path, would that mean launching this at the end?
Or
Re: Calculating disk space for a package
Published: April 27, 2020 - 10:30 AM
by florentR2
Good morning,
I was unable to retrieve the full path using the control file, so I worked around it differently.
It's not very clean, but it does the job:
Code: Select all
import os, glob
os.chdir("C:\Program Files (x86)\wapt\cache")
for file in glob.glob("monPaquet*"):
#print(file)
remove_file(file)