Compare commits

..

8 Commits

6 changed files with 9 additions and 7 deletions

View File

@ -30,7 +30,7 @@ mv dist/ahriman-*.tar.gz package/archlinux
chmod +777 package/archlinux # because fuck you that's why
cd package/archlinux
sudo -u nobody -- makepkg -cf --skipchecksums --noconfirm
sudo -u nobody -- makepkg --packagelist | grep -v -- -debug- | pacman -U --noconfirm -
sudo -u nobody -- makepkg --packagelist | grep -v -- -debug- | pacman -U --noconfirm --nodeps -
# create machine-id which is required by build tools
systemd-machine-id-setup

View File

@ -79,7 +79,8 @@ RUN cd "/home/build/ahriman" && \
tox -e archive && \
cp ./dist/*.tar.gz "package/archlinux" && \
cd "package/archlinux" && \
runuser -u build -- makepkg --noconfirm --install --skipchecksums && \
runuser -u build -- makepkg --noconfirm --skipchecksums && \
runuser -u build -- makepkg --packagelist | grep -v -- -debug- | pacman -U --noconfirm --nodeps - && \
cd / && rm -r "/home/build/ahriman"
# cleanup unused

View File

@ -65,7 +65,7 @@ package_ahriman-triggers() {
package_ahriman-web() {
pkgname='ahriman-web'
pkgdesc="ArcH linux ReposItory MANager, web server"
depends=("$pkgbase=$pkgver" 'python-aiohttp-apispec-git' 'python-aiohttp-cors' 'python-aiohttp-jinja2')
depends=("$pkgbase=$pkgver" 'python-aiohttp-apispec>=3.0.0' 'python-aiohttp-cors' 'python-aiohttp-jinja2')
optdepends=('python-aioauth-client: OAuth2 authorization support'
'python-aiohttp-security: authorization support'
'python-aiohttp-session: authorization support'

View File

@ -54,10 +54,10 @@ class ConfigurationMultiDict(dict[str, Any]):
value(Any): value of the related key
Raises:
OptionError: if the key already exists in the dictionary, but not a single value list
OptionError: if the key already exists in the dictionary, but not a single value list or a string
"""
match self.get(key):
case [current_value]:
case [current_value] | str(current_value): # type: ignore[misc]
value = f"{current_value} {value}"
case None:
pass

View File

@ -29,6 +29,7 @@ prefix = Path(sys.prefix).relative_to("/")
site_packages = Path(site.getsitepackages()[0]).relative_to("/")
SUBPACKAGES = {
"ahriman": [
prefix / "bin",
prefix / "lib" / "systemd",
prefix / "share",
site_packages / "ahriman",

View File

@ -40,9 +40,9 @@ def test_setitem_array_exception() -> None:
must raise exception if the current value is not a single value array
"""
instance = ConfigurationMultiDict()
instance["key[]"] = "value1"
instance["key[]"] = ["value1", "value2"]
with pytest.raises(OptionError):
instance["key[]"] = ["value2"]
instance["key[]"] = ["value3"]
def test_setitem_exception() -> None: