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

[BUG] pkg.installed should install dependencies when directly installing .deb files (#10107 striked back) #62934

Closed
amato-gianluca opened this issue Oct 21, 2022 · 2 comments · Fixed by #63126
Assignees
Labels
Bug broken, incorrect, or confusing behavior Regression The issue is a bug that breaks functionality known to work in previous releases.

Comments

@amato-gianluca
Copy link

Description
pkg.installed should install dependencies when directly installing .deb files with the source parameter. This used to work fine for many releases, after issue #10107 was fixed, but the problem seems to be back for Salt 3005.1 Onedir on Ubuntu 22.04.

Setup

The server runs Salt 3005.1 on a CentsOS 8 Stream VM (package salt-3005-1.el8.noarch). The client runs Salt 3005.1 Onedir on Ubuntu 22.04 VM (package 3005.1+ds-1). I have the following SLS file:

mysql-workbench-community:
  pkg.installed:
    - sources:
      - mysql-workbench-community: salt://mysql-workbench-community_8.0.31-1ubuntu22.04_amd64.deb

Although this example is based on MySQL Workbench, I don't think there is anything specific about it.

Steps to Reproduce the behavior

The command ''salt state.apply mysql-workbench-community'' ends with the following error:

          ID: mysql-workbench-community
    Function: pkg.installed
      Result: False
     Comment: Problem encountered installing package(s). Additional info follows:
              
              errors:
                  - Running scope as unit: run-r43687132895d487aad4a60437855eb20.scope
                    dpkg: dependency problems prevent configuration of mysql-workbench-community:
                     mysql-workbench-community depends on libpcrecpp0v5 (>= 7.7); however:
                      Package libpcrecpp0v5 is not installed.
                     mysql-workbench-community depends on libproj22 (>= 7.2.0); however:
                      Package libproj22 is not installed.
                    
                    dpkg: error processing package mysql-workbench-community (--install):
                     dependency problems - leaving unconfigured
                    Errors were encountered while processing:
                     mysql-workbench-community
     Started: 18:23:29.925520
    Duration: 6364.328 ms
     Changes:   

In the client, the package manager is in a broken state: mysql-workbench-community is installed without its dependencies. It can be fixed with apt -f install.

Expected behavior
The package mysql-workbench-community is installed together with its dependencies.

Note
From what I understand, when the source parameter is used, the package is installed using dpkg instead of apt, although apt is perfectly able to install single deb packages and resolve dependencies at the same time.

@amato-gianluca amato-gianluca added Bug broken, incorrect, or confusing behavior needs-triage labels Oct 21, 2022
@welcome
Copy link

welcome bot commented Oct 21, 2022

Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
Please be sure to review our Code of Conduct. Also, check out some of our community resources including:

There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar.
If you have additional questions, email us at [email protected]. We’re glad you’ve joined our community and look forward to doing awesome things with you!

@OrangeDog OrangeDog added the Regression The issue is a bug that breaks functionality known to work in previous releases. label Oct 22, 2022
@whytewolf whytewolf self-assigned this Oct 26, 2022
@whytewolf
Copy link
Collaborator

this most likely is a consequence of onedir. aptpkg presently uses the apt python module found only within system python on debian and ubuntu.

We need to decouple this from those system python packages that are not available outside of system python.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior Regression The issue is a bug that breaks functionality known to work in previous releases.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants