Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Install package as a dependency in openSUSE

  1. #1

    Default Install package as a dependency in openSUSE

    I moved to openSUSE from Arch Linux, where I could install packages as dependencies or optional with "--asdeps" prefix.

    What's an equivalent to do like that in openSUSE with YaST / Zypper?

    Thanks and best regards.

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    27,342

    Default Re: Install package as a dependency in openSUSE

    Hello and welcome here.

    Maybe you should explain better what that feature does. Those who never used Arch Linux may have no idea what you are after and thus it will be difficult if, and when yes how, you can achive the same result on openSUSE.
    Henk van Velden

  3. #3

    Default Re: Install package as a dependency in openSUSE

    Quote Originally Posted by hcvv View Post
    Hello and welcome here.

    Maybe you should explain better what that feature does. Those who never used Arch Linux may have no idea what you are after and thus it will be difficult if, and when yes how, you can achive the same result on openSUSE.

    Basically, "--asdeps" prefix installs package as a dependency or optional package ( recommends / suggestions).

    There are 2 main categories in pacman: explicitly installed and optionally installed / dependencies.

    Whenever you remove explicit packages, pacman also removes optionally installed packages and dependencies.

    However, if package is optional but you installed it as explicit (without "--asdeps" prefix), pacman won't automatically delete it, meaning this package would be an orphan remaining in the system.



    So, I'm wondering how I may install packages as recommendations / suggestions in openSUSE manually (for example, if they were not installed initially), so zypper could remove them when I delete the main package.

  4. #4
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    27,342

    Default Re: Install package as a dependency in openSUSE

    Thanks for the explanation. Nevertheless it is not completely clear to me. That may be because words like "recommended" "dependent", etc. may have a different technical meaning in the two worlds we are talking about.

    In the opensuse (RPM, zypper, YaST) world "dependent" packages are packages needed by other packages for the product in that last package to be able to realy work. E.g. a binary in pcakage A may need a run time library in package B to run at all, thus package B is a dependency of package A (and as such specified inside the RPM of A). (But of course that library can be a dependency of package C also, thus removing package B because you remove package A will break package C).

    Also I am not sure about the word "pacman" you use. We know Packman as a repository outside the official openSUSE repositories, that delivers packages not in the standard OSS repo, or working packages for not (fully) working ones. This because openSUSE can not offer them because of restrictions (e.g. on multi-media codecs) that may apply in certain jurisdictions.

    Recommended packages are packages that are thought (but this can be arbitrary) of being good to have in a "standard" installation (an installation were the owner does not want to decide for each and every bit of software himself if it is needed). It is a sort of service to the begining user. Most people simly except that list, but you can of course decide to not install then during system installation, or remove them later and (in both cases) block them, because, as recommened packages) they else wll be installed on the first occasion you want to install something else.

    Hope this helps in getting to a mutual understanding.
    Henk van Velden

  5. #5

    Default Re: Install package as a dependency in openSUSE

    Quote Originally Posted by hcvv View Post
    Thanks for the explanation. Nevertheless it is not completely clear to me. That may be because words like "recommended" "dependent", etc. may have a different technical meaning in the two worlds we are talking about.

    In the opensuse (RPM, zypper, YaST) world "dependent" packages are packages needed by other packages for the product in that last package to be able to realy work. E.g. a binary in pcakage A may need a run time library in package B to run at all, thus package B is a dependency of package A (and as such specified inside the RPM of A). (But of course that library can be a dependency of package C also, thus removing package B because you remove package A will break package C).

    Also I am not sure about the word "pacman" you use. We know Packman as a repository outside the official openSUSE repositories, that delivers packages not in the standard OSS repo, or working packages for not (fully) working ones. This because openSUSE can not offer them because of restrictions (e.g. on multi-media codecs) that may apply in certain jurisdictions.

    Recommended packages are packages that are thought (but this can be arbitrary) of being good to have in a "standard" installation (an installation were the owner does not want to decide for each and every bit of software himself if it is needed). It is a sort of service to the begining user. Most people simly except that list, but you can of course decide to not install then during system installation, or remove them later and (in both cases) block them, because, as recommened packages) they else wll be installed on the first occasion you want to install something else.

    Hope this helps in getting to a mutual understanding.
    Pacman is Arch Linux's PACkage MANager.

    I'd like to install recommended packages later myself, however, in Arch Linux you have to put manually "--asdeps" option ("asdeps" stands for "as dependency", which is also not always dependency, it may also be recommended or suggested package), because otherwise, when you remove the main package, those will stay as orphans.

    So, speaking of openSUSE, do I have to put some options like that or I may just install them as usual and they will lately be removed automatically when deleting the main package?

  6. #6
    Join Date
    Sep 2012
    Posts
    5,978

    Default Re: Install package as a dependency in openSUSE

    Quote Originally Posted by zanem0ne View Post
    I'd like to install recommended packages later myself, however, in Arch Linux you have to put manually "--asdeps" option ("asdeps" stands for "as dependency", which is also not always dependency, it may also be recommended or suggested package), because otherwise, when you remove the main package, those will stay as orphans.

    So, speaking of openSUSE, do I have to put some options like that or I may just install them as usual and they will lately be removed automatically when deleting the main package?
    By default soft dependencies are installed when you install package that suggests/recommends or supplements them. This can be disabled to install only mandatory dependencies (requires). Dependencies are never removed automatically when you remove package that caused them to be installed. zypper knows whether package was requested explicitly or installed as dependency and I think there is option to remove "unneeded" dependencies, but it is all or nothing.

  7. #7

    Default Re: Install package as a dependency in openSUSE

    Quote Originally Posted by arvidjaar View Post
    By default soft dependencies are installed when you install package that suggests/recommends or supplements them. This can be disabled to install only mandatory dependencies (requires). Dependencies are never removed automatically when you remove package that caused them to be installed. zypper knows whether package was requested explicitly or installed as dependency and I think there is option to remove "unneeded" dependencies, but it is all or nothing.
    I've been searching on how to mark package as automatically installed (suggestion/recommendation), from what I got there is no way to do that.

    Example: I want to install "engrampa" package. I'm not sure why, but for me zypper says:

    "The following 5 packages are suggested, but will not be installed:..."

    And then there are listed packages like "lzop", "lhasa" and others to deal with archives.

    Then I installed those manually, removed "engrampa" package, and those packages are still remain in my system as orphans (and no, they're not required or recommended by any other package).

    I guess this is problem, and the only thing I can do is just ignore it and manually clean up my system.

  8. #8
    Join Date
    Aug 2008
    Location
    Brazil
    Posts
    3,067

    Default Re: Install package as a dependency in openSUSE


  9. #9
    Join Date
    Jun 2008
    Location
    Yorkshire
    Posts
    368

    Default Re: Install package as a dependency in openSUSE

    if you use Software Manager in Yast you can select what you want (if I understand you correctly). In the menu bar 'Dependencies' allows you to toggle on/off 'install recommended packages' and 'Options' allows you to toggle on/off 'Clean up when deleting packages'.
    Pete

  10. #10
    Join Date
    Mar 2020
    Location
    São Leopoldo, RS, Brazil
    Posts
    252

    Default Re: Install package as a dependency in openSUSE

    Package inventory with zypper is not complete. Any package you name for zypper will be marked as explicitly installed (prefix i+). Default configuration installs recommended packages as implicit dependencies (prefix i). Explicit packages are not reported as unneeded. Implicit packages are reported as unneeded once explicit packages are removed. Suggested packages are not installed automatically.

    Some query commands:

    Code:
    echo all installed packages
    zypper search -si
    echo packages not explicitly installed which are not dependencies of explicit installs
    zypper packages --unneeded
    echo packages recommended by installed packages
    zypper packages --recommended
    echo packages suggested by installed packages
    zypper packages --suggested
    echo packages that don't have a backing repository (check only after a zypper dup)
    zypper packages --orphaned
    Installation:

    Code:
    echo remove a package and unneeded dependencies
    zypper rm -u package_name
    echo install all recommended packages, as explicit installs
    zypper inr
    openSUSE Tumbleweed

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •