diff --git a/src/usr/lib/ydf/components/package/ydf-package-service.bash b/src/usr/lib/ydf/components/package/ydf-package-service.bash index c760fbb..1f62bb7 100644 --- a/src/usr/lib/ydf/components/package/ydf-package-service.bash +++ b/src/usr/lib/ydf/components/package/ydf-package-service.bash @@ -30,7 +30,7 @@ fi # readonly __YDF_PACKAGE_SERVICE_INSTRUCTIONS_MANJARO="preinstall pacman yay install postinstall ${__YDF_PACKAGE_SERVICE_INSTRUCTIONS_COMMON}" # readonly __YDF_PACKAGE_SERVICE_INSTRUCTIONS_UBUNTU="preinstall apt install postinstall ${__YDF_PACKAGE_SERVICE_INSTRUCTIONS_COMMON}" # shellcheck disable=SC2016 -readonly __YDF_PACKAGE_SERVICE_INSTRUCTIONS_COMMON='install @flatpak @snap docker_compose:docker-compose.yml plugin_zsh:${pkg_name}.plugin.zsh homeln/ homelnr/ homecp/ rootcp/ homecat/ rootcat/ homecps/ rootcps/ postinstall' +readonly __YDF_PACKAGE_SERVICE_INSTRUCTIONS_COMMON='install @flatpak @snap docker_compose:docker-compose.yml plugin_zsh:${pkg_name}.plugin.zsh homeln/ homelnr/ homecp/ rootcp/ homecat/ rootcat/ homecps/ rootcps/ dconf_ini:dconf.ini/ postinstall' readonly __YDF_PACKAGE_SERVICE_INSTRUCTIONS_MANJARO="preinstall @pacman @yay ${__YDF_PACKAGE_SERVICE_INSTRUCTIONS_COMMON}" # readonly __YDF_PACKAGE_SERVICE_INSTRUCTIONS_UBUNTU="preinstall install postinstall ${__YDF_PACKAGE_SERVICE_INSTRUCTIONS_COMMON}" @@ -410,6 +410,19 @@ ydf::package_service::__instruction_rootcps() { "$1" rootcps } +# +# Execute dconf_ini instruction +# +# Arguments: +# pkg_name string package name +# +# Returns: +# 0 on success, non-zero on error. +# +ydf::package_service::__instruction_dconf_ini() { + dconf load / Mouse +[org/gnome/desktop/peripherals/mouse] +speed=0.5 diff --git a/tests/usr/lib/ydf/components/package/ydf-package-command.f.bats b/tests/usr/lib/ydf/components/package/ydf-package-command.f.bats index 3b4db9f..dbb5e31 100644 --- a/tests/usr/lib/ydf/components/package/ydf-package-command.f.bats +++ b/tests/usr/lib/ydf/components/package/ydf-package-command.f.bats @@ -629,3 +629,18 @@ line 11' .* root root .* /.my/dir1/file11 .* root root .* /.my/file1" } + +# Tests for ydf package install ./19dconf +@test "ydf package install ./19dconf Should succeed" { + local -r _package_dir="${TEST_FIXTURES_DIR}/packages/19dconf" + + run ydf package install "$_package_dir" + + assert_success + assert_output "" + + # run dconf dump /org/gnome/desktop/peripherals/mouse/ + + # assert_success + # assert_output "" +} diff --git a/tests/usr/lib/ydf/components/package/ydf-package-service.i.bats b/tests/usr/lib/ydf/components/package/ydf-package-service.i.bats index 3c12c89..07f32f2 100644 --- a/tests/usr/lib/ydf/components/package/ydf-package-service.i.bats +++ b/tests/usr/lib/ydf/components/package/ydf-package-service.i.bats @@ -816,3 +816,8 @@ line 11' @test "ydf::package_service::__instruction_rootcps() DUMMY" { : } + +# Tests for ydf::package_service::__instruction_dconf_ini() +@test "ydf::package_service::__instruction_dconf_ini() DUMMY" { + : +}