[SOLVED] Calculating TOTAL disk space for a package

Questions about WAPT Packaging / Requests and help regarding Wapt packages.
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
florentR2
Messages: 100
Registration: February 13, 2020 - 5:23 PM

April 24, 2020 - 11:46

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?
Last edited by florentR2 on Apr 27, 2020 - 10:30, edited 1 time.
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

April 24, 2020 - 12:05 PM

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. ;)
florentR2
Messages: 100
Registration: February 13, 2020 - 5:23 PM

April 24, 2020 - 12:16

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?
User avatar
vcardon
WAPT Expert
Messages: 278
Registration: Oct 06, 2017 - 10:55 p.m.
Location: Nantes, France

April 24, 2020 - 12:22

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
Vincent CARDON
Tranquil IT
florentR2
Messages: 100
Registration: February 13, 2020 - 5:23 PM

April 24, 2020 - 12:34

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).
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

April 24, 2020 - 1:08 PM

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.)
florentR2
Messages: 100
Registration: February 13, 2020 - 5:23 PM

April 24, 2020 - 1:22 PM

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.
User avatar
vcardon
WAPT Expert
Messages: 278
Registration: Oct 06, 2017 - 10:55 p.m.
Location: Nantes, France

April 24, 2020 - 2:22 PM

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
Vincent CARDON
Tranquil IT
florentR2
Messages: 100
Registration: February 13, 2020 - 5:23 PM

April 24, 2020 - 4:22 PM

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?

Code: Select all

delete_localsources()
Or

Code: Select all

remove_file(control.filename)
florentR2
Messages: 100
Registration: February 13, 2020 - 5:23 PM

April 27, 2020 - 10:30 AM

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)
Locked