RE: Using python to download and verify Manjaro ISO

Hi, I tried to use this script to download the last review gnome version of manjaro and was getting an error about filesystem being full… which didn’t made sense for me as I was downloading in a filesystem with more than 200Go free space.
Looking at the python code, I saw line 495 that you use a temp folder in the /tmp not in the download_dir in fact and sadly, my system only had 7Go in /tmp (so not enough for a full gnome).
Would it be possible to allow user to change where the temporary downloads are made ?
Thank you !

There is many reasons for using /tmp as a temporary folder and a lot of thought and considerations went into the final choice of using /tmp.

I will take it under consideration.

The most important reason for /tmp is the use of tmpfs - especially if the final target combined with a review edition is a slow USB device.

tmpfs - ArchWiki
zswap - ArchWiki
zram - ArchWiki

Allowing more space for /tmp would rectify that; I typically allow 20 GB when preparing a new system; but this amout can change depending on the intended use case.

With, as you say;

this shouldn’t be overly difficult.

Regards.


Welcome to the Manjaro community

As a new or infrequent forum user, please take some time to familiarise yourself with Forum requirements, and the many ways to use the forum to your benefit:


Update Announcements

The Update Announcements contain important information and a Known Issues and Solutions section that should generally be checked before posting a request for support.

System Information

Output of this command (formatted according to forum requirements) may be useful for those wishing to help:

inxi --filter --verbosity=8

or the short form:

inxi -zv8

Be prepared to provide more information and outputs from other commands whenever asked. It’s equally important to provide as much actionable information as possible in your first post, rather than simply indicating there is a problem.

Required reading
Resources

generaly, for big usage with /tmp, i test size before
as:

import shutil

def get_disk_destination(want_mo: int, default: str) -> (str, int):
    _, _, free = shutil.disk_usage("/tmp")
    # free = free // (1024**2)  # to Mio
    free = free // (1000 * 1000)  # to Mo
    return "/tmp" if free > want_mo else default, free


destination, size = get_disk_destination(6000, ".")
print("download in", destination)
print("/tmp available size :", size, "Mo")
# download
...
if destination.startswith("/tmp"):
    print("cp file in destination to disk")
    ...
1 Like

Based on the feedback I have refactored the script to allow for a user-defined temp folder.

The script will still default to use /tmp mostly because /tmp is tmpfs.

I acknowledge there may be cases - especially with review and preview editions which is downloaded as zip archives.

When assembling the archive the resource usage doubles and this could be what caused the issue for the OP.

The changes has not yet been pushed into production but can be reviewed at

Frede H / Manjaro Get Iso · GitLab

git clone https://gitlab.manjaro.org/fhdk/manjaro-get-iso

//EDIT:

Also looking on some optimization on querying the tmp folder size - inspired by @papajoke suggestion.

//EDIT:

Additional logic has been added to account for storage requirements.

Using a custom temp folder may introduce notable performance issues depending on the speed of the selected storage.

//EDIT:

2025-04-14T17:00:00Z

Version 0.15 is available using an up-to-date mirror

The terminal output will be similar to this example

 $ get-iso --review --full plasma
==> Storage dir: /home/fh/iso
==> Working dir: /tmp/tmp9l6sa6gg
   -> Processing plasma ISO
 --> Download: manjaro-kde-25.0-250412-linux612.iso.sha256
 --> Required space on tmpfs: 7803 MiB
 --> Required space on storage: 3841 MiB
 --> Download: manjaro-kde-25.0-250412-linux612.iso.z01
 --> Download: manjaro-kde-25.0-250412-linux612.iso.zip
   -> Testing archive integrity...iB
   -> Unpacking ISO to /tmp/tmp9l6sa6gg... 
   -> Wait for checksum to complete...     
 --> Checksum verified. manjaro-kde-25.0-250412-linux612.iso: OK
 --> Moved 'manjaro-kde-25.0-250412-linux612.iso.sha256' to '/home/fh/iso'      
 --> Moved 'manjaro-kde-25.0-250412-linux612.iso' to '/home/fh/iso'      
   -> Cleaning up...
==> ISO file: manjaro-kde-25.0-250412-linux612.iso
==> Storage : /home/fh/iso

//EDIT
Invalid date

Version 0.15.1 is available using an up-to-date mirror.

Improved error handling and message in case github or manjaro gitlab is not reachable.

2 Likes

Hi, sorry for my lack of answer, I didn’t notice I had no email notification on this forum.

Got the new version this morning by updating my system, so thank you all for the various suggestions and the improvement of the script !

To answer about the size of my /tmp, it was a default install of Manjaro on a notebook with only 12Go Ram.
I know I could have change the tmpfs size but didn’t see the point, 7G already seemed quite big for my usual usage.
And between using RAM or the SSD (most system these days are using SSD I think), the performance issue was not a problem for me.

One again, thank you !