GithubHelp home page GithubHelp logo

Comments (5)

clmbtti avatar clmbtti commented on July 28, 2024 1

Closed. The script has in its scope only the download of a minimal set of necessary packages.

from mur.

clmbtti avatar clmbtti commented on July 28, 2024

You will need to add a one-second delay, as you are coming too hot for the server. Remember, we cannot control what arch mirror's behaviour will be once several files are demanded too quickly. They may read it as a DDoS attack.

Add to the top of your script import time:

#!/usr/bin/env python
import subprocess
import os
import time

And at the end, replace

# Run the pacman command, using the output of the yes command as the input
subprocess.run(
    ["sudo", "pacman", "--cachedir", CACHE_DIR, "-U"] + PACKAGES_URL,
    stdin=yes_process.stdout,
)

with:

# Download the packages with a delay between each download
for package_url in PACKAGES_URL:
    subprocess.run(["sudo", "pacman", "--cachedir", CACHE_DIR, "-U", package_url], stdin=yes_process.stdout)
    time.sleep(1)  # Pause for 1 second before continuing

Other than that, make sure all those packages are accessible in the path and consider removing those who aren't. I tested it on a VM and the request for one of those packages returned 404 for me.
Hope this helps you.

from mur.

rodrigogarcia2021 avatar rodrigogarcia2021 commented on July 28, 2024

You will need to add a one-second delay, as you are coming too hot for the server. Remember, we cannot control what arch mirror's behaviour will be once several files are demanded too quickly. They may read it as a DDoS attack.

Add to the top of your script import time:

#!/usr/bin/env python
import subprocess
import os
import time

And at the end, replace

# Run the pacman command, using the output of the yes command as the input
subprocess.run(
    ["sudo", "pacman", "--cachedir", CACHE_DIR, "-U"] + PACKAGES_URL,
    stdin=yes_process.stdout,
)

with:

# Download the packages with a delay between each download
for package_url in PACKAGES_URL:
    subprocess.run(["sudo", "pacman", "--cachedir", CACHE_DIR, "-U", package_url], stdin=yes_process.stdout)
    time.sleep(1)  # Pause for 1 second before continuing

Other than that, make sure all those packages are accessible in the path and consider removing those who aren't. I tested it on a VM and the request for one of those packages returned 404 for me. Hope this helps you.

Thank you very much.

yes, the package vulkan-headers is flagged as out of date, then the script can't download it (but using firefox i can)

I added 4 seconds, just in case.

from mur.

clmbtti avatar clmbtti commented on July 28, 2024

You are most welcome! I hope we find a better solution soon.

from mur.

rodrigogarcia2021 avatar rodrigogarcia2021 commented on July 28, 2024

You are most welcome! I hope we find a better solution soon.

I hope too, because I am reading a lot of people migrating to others arch based. For now, you save me the day and the month probably 👍

from mur.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.