Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to skip prepare step - "Unrecognized package manager." #3405

Open
abitrolly opened this issue Dec 5, 2024 · 3 comments
Open

Unable to skip prepare step - "Unrecognized package manager." #3405

abitrolly opened this issue Dec 5, 2024 · 3 comments

Comments

@abitrolly
Copy link
Contributor

The following test/plan script fails with "Unrecognized package manager." error, but according to the script, the package manager should not run.

summary: Test nix installer
provision:
    how: container
    image: archlinux
prepare:
    how: shell
    script: echo prepare
execute:
    how: tmt
    script: echo hello

The output of tmt run.

/var/tmp/tmt/run-012

/tmt_testing_plan
    discover
        how: shell
        summary: 1 test selected
    provision
        queued provision.provision task #1: default-0
        
        provision.provision task #1: default-0
        how: container
        image: archlinux
        multihost name: default-0
        arch: unknown
        distro: Arch Linux
    
        summary: 1 guest provisioned
    prepare
        queued push task #1: push to default-0
        
        push task #1: push to default-0
    
        queued prepare task #1: essential-requires on default-0
        queued prepare task #2: default-0 on default-0
        
        prepare task #1: essential-requires on default-0
        how: install
        summary: Install essential required packages
        name: essential-requires
        where: default-0
        fail: Unrecognized package manager.
    finish
    
        container: stopped
        container: removed
        container: network removed
        summary: 0 tasks completed

plan failed

The exception was caused by 1 earlier exceptions

Cause number 1:

    prepare step failed

    The exception was caused by 1 earlier exceptions

    Cause number 1:

        Unrecognized package manager.
@happz
Copy link
Collaborator

happz commented Dec 5, 2024

tmt uses a couple of commands under the hood, namely rsync, and may try to install them if they are not available. We have not try tmt with Arch Linux yet, AFAIK, and the "unrecognized package manager" may very well be correct. Adding necessary primitives to bootstrap it shouldn't be hard though, feel free to contribute, see the supported ones in https://github.com/teemtee/tmt/tree/main/tmt/package_managers

@abitrolly
Copy link
Contributor Author

tmt uses a couple of commands under the hood, namely rsync, and may try to install them if they are not available.

Why exactly it needs them? Is it documented anywhere?

Adding necessary primitives to bootstrap it shouldn't be hard though, feel free to contribute, see the supported ones in https://github.com/teemtee/tmt/tree/main/tmt/package_managers

It would be nice if the project could reuse existing state of art, such as https://github.com/beyondmeh/piu

@happz
Copy link
Collaborator

happz commented Dec 5, 2024

tmt uses a couple of commands under the hood, namely rsync, and may try to install them if they are not available.

Why exactly it needs them?

E.g. rsync is used for pushing and pulling data between a runner and guests; flock is used to synchronize changes to tmt accounting data on the guest.

Is it documented anywhere?

It is not, yet, working on it.

Adding necessary primitives to bootstrap it shouldn't be hard though, feel free to contribute, see the supported ones in https://github.com/teemtee/tmt/tree/main/tmt/package_managers

It would be nice if the project could reuse existing state of art, such as https://github.com/beyondmeh/piu

It can, and it often does. On the other hand, the set of necessary primitives isn't large, we had to tweak the implementation several times in the past because of development of these tools, and we have the needed flexibility. We can use an existing tool - piu looks interesting, but it seems to be unmaintained for two years, which is a very long time - but we would loose this flexibility and ability to address changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants