How to pre-select solutions (1 or 2) in autoyast xml config file
SUSE / openSUSEThis Forum is for the discussion of Suse Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to pre-select solutions (1 or 2) in autoyast xml config file
Hi,
I'm using SLES12sp5. I want to install python3-psutil and have encountered a problem in autoyast.
When I manually execute the zypper command at the prompt "zypper --gpg-auto-import-keys install python3-psutil", I would get the following (truncated) output, with options to select either 1/2/c. If I include the exact same command (with additional -n option) in the auto install xml config file, it would just auto select "c" and skip this zypper install command and move on to the next command I have in my xml file.
Problem: nothing provides /usr/bin/python33 needed by python3-psutil-5.7.0-128.5.x86_64
Solution 1: do not install python3-psutil-5.7.0-128.5.x86_64
Solution 2: break python3-psutil-5.7.0-128.5.x86_64 by ignoring some of its dependencies
Choose from above solutions by number or cancel [1/2/c] (c): 2
Resolving dependencies...
Resolving package dependencies...
The following NEW package is going to be installed:
python3-psutil
The following package has no support information from it's vendor:
python3-psutil
1 new package to install.
Overall download size: 441.0 KiB. Already cached: 0 B. After the operation, additional 2.4 MiB will be used.
Continue? [y/n/...? shows all options] (y): y
So, I would like to find out how should I construct my command in the xml file so that the auto installation process knows my pre-select option (either 1 or 2) for that particular package, and installs it without any user interaction. My codes are all in the init-script section.
Thanks for replying. I still get the same behavior after adding --force-resolution. I also tried echoing solution "2", but looks like zypper ignores the echo.
Problem: nothing provides /usr/bin/python33 needed by python3-psutil-5.7.0-128.5.x86_64
Solution 1: do not install python3-psutil-5.7.0-128.5.x86_64
Solution 2: break python3-psutil-5.7.0-128.5.x86_64 by ignoring some of its dependencies
Choose from above solutions by number or cancel [1/2/c] (c): c
Problem: nothing provides /usr/bin/python33 needed by python3-psutil-5.7.0-128.5.x86_64
Solution 1: do not install python3-psutil-5.7.0-128.5.x86_64
Solution 2: break python3-psutil-5.7.0-128.5.x86_64 by ignoring some of its dependencies
Choose from above solutions by number or cancel [1/2/c] (c): ^C
Problem: nothing provides /usr/bin/python33 needed by python3-psutil-5.7.0-128.5.x86_64
Solution 1: do not install python3-psutil-5.7.0-128.5.x86_64
Solution 2: break python3-psutil-5.7.0-128.5.x86_64 by ignoring some of its dependencies
Choose from above solutions by number or cancel [1/2/c] (c): ^C
Have you actually looked at the output of what's going on? You're trying to install a package that has dependencies that are not present in your system. And, it appears that the package's requirements are not "known" by the system, so it can't offer the option to install the required dependencies. You need to fix that FIRST.
Given that the link I attempted to post is broken (the closing paren is shown, but doesn't come through in the link), I would presume you didn't actually read up on zypper itself.
Ignoring dependencies is not wise as it will likely come back to cause you problems in the future.
If you insist on ignoring it, the correct syntax would be:
Problem: nothing provides /usr/bin/python33 needed by python3-psutil-5.7.0-128.5.x86_64
Solution 1: do not install python3-psutil-5.7.0-128.5.x86_64
Solution 2: break python3-psutil-5.7.0-128.5.x86_64 by ignoring some of its dependencies
Choose from above solutions by number or cancel [1/2/c] (c): c
For some packages I want to be able to select Solution 1. Like the example below, I want to exclude perl-HTML-TableExtract-2.11-7.8.noarch, perl-HTML-TokeParser-Simple-3.16-3.10.noarch when I install perl. So it's still coming back to the same problem- How I can pre-select the solutions.
Problem: nothing provides perl(HTML::ElementTable) >= 1.16 needed by perl-HTML-TableExtract-2.11-7.8.noarch
Solution 1: do not install perl-HTML-TableExtract-2.11-7.8.noarch
Solution 2: break perl-HTML-TableExtract-2.11-7.8.noarch by ignoring some of its dependencies
Choose from above solutions by number or skip, retry or cancel [1/2/s/r/c] (c): ^C
The current way of doing it is that I would just simply exclude those zypper cmds that require interaction and run them manually post OS installation. But the process would be so much simpler if this can be automated.
You are trying to create a way to work around required packages - zypper provides only built-in means to work around recommended ones. Things like --force-resolution are intended to tell zypper to find a fix for a problem if one exists, but it defaults to dropping out to interactive mode when it can't.
You've stated that you 'know' you don't need the indicated required package. Why not?
Hi Ember1205,
The computer I'm installing is intended to be a simple compute server. The reason I want only python3-psutil is because of other another tool "terminator". I can add this manually and the tool would just work fine. I don't need the dependencies pkgs for anything else.
I just want to see if there's possibility of adding this into auto config. Looks like there isn't one, at least for this OS version I guess.
Thanks for all your responses so far.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.