Merge branch 'aur-packages' into 'main'
feat: add aur package support to system.yaml See merge request blendOS/system-tools/akshara!1
This commit is contained in:
commit
7c53002545
1 changed files with 23 additions and 0 deletions
23
akshara
23
akshara
|
@ -187,6 +187,8 @@ def update_system():
|
|||
'blend'
|
||||
]
|
||||
|
||||
aur_packages = []
|
||||
|
||||
services = [
|
||||
'akshara'
|
||||
]
|
||||
|
@ -209,6 +211,10 @@ def update_system():
|
|||
if type(blend_release.get('packages')) == list:
|
||||
packages += blend_release.get('packages')
|
||||
|
||||
if type(blend_release.get('aur-packages')) == list:
|
||||
packages += ['fakeroot', 'paru']
|
||||
aur_packages += blend_release.get('aur-packages')
|
||||
|
||||
if type(blend_release.get('services')) == list:
|
||||
services += blend_release.get('services')
|
||||
|
||||
|
@ -284,6 +290,23 @@ Server = {package_repo["repo-url"]}
|
|||
exit(50)
|
||||
if return_val == 0:
|
||||
break
|
||||
|
||||
counter = 0
|
||||
while True:
|
||||
exec_chroot('useradd', '-m', '-G', 'wheel', '-s', '/bin/bash', 'aur')
|
||||
exec_chroot('bash', '-c', 'echo "aur ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/aur')
|
||||
return_val = exec_chroot(
|
||||
'runuser', '-u', 'aur', '--', 'paru', '-Sy', '--noconfirm', '--needed',
|
||||
'--noprogressbar', '--skipreview', '--removemake', '--cleanafter', '--ask=4',
|
||||
*blend_release.get('aur-packages'))
|
||||
exec_chroot('userdel', '-r', 'aur')
|
||||
exec_chroot('rm', '-f', '/etc/sudoers.d/aur')
|
||||
counter += 1
|
||||
if counter > 30:
|
||||
error('failed to download AUR packages')
|
||||
exit(50)
|
||||
if return_val == 0:
|
||||
break
|
||||
|
||||
for service in services:
|
||||
if type(service) is str:
|
||||
|
|
Loading…
Reference in a new issue