packages.py: remove --prevent-downgrade (once again?)
This commit is contained in:
parent
c6fc2a186c
commit
d42c94e738
1 changed files with 4 additions and 3 deletions
|
@ -337,16 +337,17 @@ def add_file_to_repo(file_path: str, repo_name: str, arch: Arch):
|
||||||
cache_file = os.path.join(pacman_cache_dir, file_name)
|
cache_file = os.path.join(pacman_cache_dir, file_name)
|
||||||
if os.path.exists(cache_file):
|
if os.path.exists(cache_file):
|
||||||
os.unlink(cache_file)
|
os.unlink(cache_file)
|
||||||
result = subprocess.run([
|
cmd = [
|
||||||
'repo-add',
|
'repo-add',
|
||||||
'--remove',
|
'--remove',
|
||||||
'--prevent-downgrade',
|
|
||||||
os.path.join(
|
os.path.join(
|
||||||
repo_dir,
|
repo_dir,
|
||||||
f'{repo_name}.db.tar.xz',
|
f'{repo_name}.db.tar.xz',
|
||||||
),
|
),
|
||||||
target_file,
|
target_file,
|
||||||
])
|
]
|
||||||
|
logging.debug(f'repo: running cmd: {cmd}')
|
||||||
|
result = subprocess.run(cmd)
|
||||||
if result.returncode != 0:
|
if result.returncode != 0:
|
||||||
raise Exception(f'Failed add package {target_file} to repo {repo_name}')
|
raise Exception(f'Failed add package {target_file} to repo {repo_name}')
|
||||||
for ext in ['db', 'files']:
|
for ext in ['db', 'files']:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue