Compare commits
5 Commits
v0.0.11
...
080c9f42ff
Author | SHA1 | Date | |
---|---|---|---|
080c9f42ff | |||
3c3ee286ce | |||
d0d8930491 | |||
93508647e0 | |||
6135e55f92 |
51
e2e-tests/issue_72_install_with_deps_test.go
Normal file
51
e2e-tests/issue_72_install_with_deps_test.go
Normal file
@@ -0,0 +1,51 @@
|
||||
// ALR - Any Linux Repository
|
||||
// Copyright (C) 2025 Евгений Храмов
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//go:build e2e
|
||||
|
||||
package e2etests_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/alecthomas/assert/v2"
|
||||
"github.com/efficientgo/e2e"
|
||||
)
|
||||
|
||||
func TestE2EIssue72InstallWithDeps(t *testing.T) {
|
||||
dockerMultipleRun(
|
||||
t,
|
||||
"issue-72-install-with-deps",
|
||||
COMMON_SYSTEMS,
|
||||
func(t *testing.T, r e2e.Runnable) {
|
||||
err := r.Exec(e2e.NewCommand(
|
||||
"sudo",
|
||||
"alr",
|
||||
"addrepo",
|
||||
"--name",
|
||||
"alr-repo",
|
||||
"--url",
|
||||
"https://gitea.plemya-x.ru/Maks1mS/repo-for-tests.git",
|
||||
))
|
||||
assert.NoError(t, err)
|
||||
|
||||
err = r.Exec(e2e.NewCommand(
|
||||
"sudo", "alr", "in", "test-app-with-lib",
|
||||
))
|
||||
assert.NoError(t, err)
|
||||
},
|
||||
)
|
||||
}
|
@@ -115,7 +115,7 @@ func InstallCmd() *cli.Command {
|
||||
args.Slice(),
|
||||
)
|
||||
if err != nil {
|
||||
return cliutils.FormatCliExit(gotext.Get("Error parsing os release"), err)
|
||||
return cliutils.FormatCliExit(gotext.Get("Error when installing the package"), err)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
@@ -159,7 +159,7 @@ msgid "Command install expected at least 1 argument, got %d"
|
||||
msgstr ""
|
||||
|
||||
#: install.go:118
|
||||
msgid "Error parsing os release"
|
||||
msgid "Error when installing the package"
|
||||
msgstr ""
|
||||
|
||||
#: install.go:163
|
||||
@@ -190,6 +190,10 @@ msgstr ""
|
||||
msgid "Error pulling repositories"
|
||||
msgstr ""
|
||||
|
||||
#: internal/cliutils/app_builder/builder.go:152
|
||||
msgid "Error parsing os release"
|
||||
msgstr ""
|
||||
|
||||
#: internal/cliutils/app_builder/builder.go:165
|
||||
msgid "Unable to detect a supported package manager on the system"
|
||||
msgstr ""
|
||||
|
@@ -5,15 +5,15 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: unnamed project\n"
|
||||
"PO-Revision-Date: 2025-04-18 07:38+0300\n"
|
||||
"PO-Revision-Date: 2025-04-27 18:27+0300\n"
|
||||
"Last-Translator: Maxim Slipenko <maks1ms@alt-gnome.ru>\n"
|
||||
"Language-Team: Russian\n"
|
||||
"Language: ru\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
|
||||
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
|
||||
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
||||
"X-Generator: Gtranslator 48.0\n"
|
||||
|
||||
#: build.go:42
|
||||
@@ -166,8 +166,8 @@ msgid "Command install expected at least 1 argument, got %d"
|
||||
msgstr "Для команды install ожидался хотя бы 1 аргумент, получено %d"
|
||||
|
||||
#: install.go:118
|
||||
msgid "Error parsing os release"
|
||||
msgstr "Ошибка при разборе файла выпуска операционной системы"
|
||||
msgid "Error when installing the package"
|
||||
msgstr "Ошибка при установке пакета"
|
||||
|
||||
#: install.go:163
|
||||
msgid "Remove an installed package"
|
||||
@@ -197,6 +197,10 @@ msgstr "Ошибка инициализации базы данных"
|
||||
msgid "Error pulling repositories"
|
||||
msgstr "Ошибка при извлечении репозиториев"
|
||||
|
||||
#: internal/cliutils/app_builder/builder.go:152
|
||||
msgid "Error parsing os release"
|
||||
msgstr "Ошибка при разборе файла выпуска операционной системы"
|
||||
|
||||
#: internal/cliutils/app_builder/builder.go:165
|
||||
msgid "Unable to detect a supported package manager on the system"
|
||||
msgstr "Не удалось обнаружить поддерживаемый менеджер пакетов в системе"
|
||||
@@ -576,9 +580,6 @@ msgstr "Здесь нечего делать."
|
||||
#~ msgid "Error installing native packages"
|
||||
#~ msgstr "Ошибка при установке нативных пакетов"
|
||||
|
||||
#~ msgid "Error installing package"
|
||||
#~ msgstr "Ошибка при установке пакета"
|
||||
|
||||
#~ msgid "Error opening config file, using defaults"
|
||||
#~ msgstr ""
|
||||
#~ "Ошибка при открытии конфигурационного файла, используются значения по "
|
||||
|
@@ -439,7 +439,7 @@ func (b *Builder) BuildPackage(
|
||||
}
|
||||
|
||||
slog.Debug("BuildALRDeps")
|
||||
_, builtNames, repoDeps, err := b.BuildALRDeps(ctx, input, depends)
|
||||
builtPaths, builtNames, repoDeps, err := b.BuildALRDeps(ctx, input, depends)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -481,8 +481,8 @@ func (b *Builder) BuildPackage(
|
||||
return nil, err
|
||||
}
|
||||
|
||||
pkgPaths := removeDuplicates(res.BuiltPaths)
|
||||
pkgNames := removeDuplicates(res.BuiltNames)
|
||||
pkgPaths := removeDuplicates(append(builtPaths, res.BuiltPaths...))
|
||||
pkgNames := removeDuplicates(append(builtNames, res.BuiltNames...))
|
||||
|
||||
return &BuildResult{
|
||||
PackagePaths: pkgPaths,
|
||||
|
@@ -237,6 +237,7 @@ func GetSafeScriptExecutor() (ScriptExecutor, func(), error) {
|
||||
UnixSocketConfig: &plugin.UnixSocketConfig{
|
||||
Group: "alr",
|
||||
},
|
||||
SyncStderr: os.Stderr,
|
||||
})
|
||||
rpcClient, err := client.Client()
|
||||
if err != nil {
|
||||
|
@@ -73,7 +73,7 @@ func (e *LocalScriptExecutor) ExecuteFirstPass(ctx context.Context, input *Build
|
||||
|
||||
runner, err := interp.New(
|
||||
interp.Env(expand.ListEnviron(env...)), // Устанавливаем окружение
|
||||
interp.StdIO(os.Stdin, os.Stdout, os.Stderr), // Устанавливаем стандартный ввод-вывод
|
||||
interp.StdIO(os.Stdin, os.Stderr, os.Stderr), // Устанавливаем стандартный ввод-вывод
|
||||
interp.ExecHandler(helpers.Restricted.ExecHandler(handlers.NopExec)), // Ограничиваем выполнение
|
||||
interp.ReadDirHandler2(handlers.RestrictedReadDir(scriptDir)), // Ограничиваем чтение директорий
|
||||
interp.StatHandler(handlers.RestrictedStat(scriptDir)), // Ограничиваем доступ к статистике файлов
|
||||
@@ -193,7 +193,7 @@ func (e *LocalScriptExecutor) ExecuteSecondPass(
|
||||
fakeroot := handlers.FakerootExecHandler(2 * time.Second)
|
||||
runner, err := interp.New(
|
||||
interp.Env(expand.ListEnviron(env...)), // Устанавливаем окружение
|
||||
interp.StdIO(os.Stdin, os.Stdout, os.Stderr), // Устанавливаем стандартный ввод-вывод
|
||||
interp.StdIO(os.Stdin, os.Stderr, os.Stderr), // Устанавливаем стандартный ввод-вывод
|
||||
interp.ExecHandlers(func(next interp.ExecHandlerFunc) interp.ExecHandlerFunc {
|
||||
return helpers.Helpers.ExecHandler(fakeroot)
|
||||
}), // Обрабатываем выполнение через fakeroot
|
||||
|
@@ -17,7 +17,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
name='{{.Info.Name | tolower}}'
|
||||
name='python3-{{.Info.Name | tolower}}'
|
||||
version='{{.Info.Version}}'
|
||||
release='1'
|
||||
desc='{{.Info.Summary}}'
|
||||
@@ -48,3 +48,8 @@ package() {
|
||||
cd "$srcdir/{{.Info.Name}}-${version}"
|
||||
pip install --root="${pkgdir}/" . --no-deps --ignore-installed --disable-pip-version-check
|
||||
}
|
||||
|
||||
files() {
|
||||
printf '"%s" ' ./usr/local/lib/python3.*/site-packages/{{.Info.Name | tolower}}/*
|
||||
printf '"%s" ' ./usr/local/lib/python3.*/site-packages/{{.Info.Name | tolower}}-${version}.dist-info/*
|
||||
}
|
Reference in New Issue
Block a user