clmbtti / mur Goto Github PK
View Code? Open in Web Editor NEWMUR: MESA Unattended Recovery
License: GNU General Public License v3.0
MUR: MESA Unattended Recovery
License: GNU General Public License v3.0
Hi,
I am testing the script (i am not a dev and not know about python), and I added some packages more, when run it the archlinux.org server banned me. If use a VPN i can access, so is a ban.
Additionally, vulkan-headers that is flagged out of date, breaks the script.
No user agent or the speed for query maybe I guess?, well, i put here my modification:
import subprocess
import os
PACKAGES = [
"mesa",
"mesa-demos",
"vulkan-mesa-layers",
"opencl-mesa",
"lib32-mesa",
"vulkan-intel",
"vulkan-swrast",
"mesa-vdpau",
"libva-mesa-driver",
"libva-vdpau-driver",
"libva",
"lib32-libva-vdpau-driver",
"lib32-libva-mesa-driver",
"lib32-mesa-demos",
"lib32-mesa-vdpau",
"lib32-vulkan-icd-loader",
"lib32-vulkan-intel",
"lib32-vulkan-radeon",
"mesa-utils",
"vulkan-radeon",
"vulkan-headers",
"vulkan-icd-loader",
"lib32-libva",
]
ARCH = subprocess.run(["uname", "-m"], capture_output=True, text=True).stdout.strip()
URL_PREFIX = f"https://archlinux.org/packages/@REPO@/{ARCH}"
URL_SUFFIX = "download"
CACHE_DIR = f"/tmp/package_cache"
# Create the cache directory inside /tmp if it does not exist
if not os.path.exists(CACHE_DIR):
os.makedirs(CACHE_DIR)
# Set permissions to allow the current user to create and modify files in it
os.chmod(CACHE_DIR, 0o755)
# Generate a list of package URLs using a list comprehension
PACKAGES_URL = [
f"{URL_PREFIX.replace('@REPO@', 'multilib')}/{package}/{URL_SUFFIX}"
if package.startswith("lib32-")
else f"{URL_PREFIX.replace('@REPO@', 'extra')}/{package}/{URL_SUFFIX}"
for package in PACKAGES
if subprocess.run(["pacman", "-Qi", package], capture_output=True, text=True).returncode == 0
]
# Start the yes command in the background to automatically respond "y" to the prompt
yes_process = subprocess.Popen(["yes", "S"], stdout=subprocess.PIPE)
# 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,
)
# Terminate the yes command
yes_process.terminate()
# Delete the cache directory
subprocess.run(["rm", "-rf", CACHE_DIR])
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.