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

zypper-aptitude: Testing for the principal package manager on a Linux system #98

Closed
colbec opened this issue Aug 29, 2016 · 3 comments · Fixed by #99
Closed

zypper-aptitude: Testing for the principal package manager on a Linux system #98

colbec opened this issue Aug 29, 2016 · 3 comments · Fixed by #99

Comments

@colbec
Copy link

colbec commented Aug 29, 2016

At least one github project (https://github.com/JuliaLang/BinDeps.jl) currently tests for the existence of an apt-get on a system with the command apt-get -v. If zypper-aptitude is installed on an openSUSE system as in Leap 42.1 the result is an unfortunate call to zypper GUI which must be cancelled for the process to continue.
One solution is simply to remove the zypper-aptitude package from the openSUSE system. Then apt-get does not exist and the script takes the necessary steps.
I wonder if the perl script which controls the action of the system on receiving a call to apt-get might more appropriately respond to "apt-get -v" by a simple action not involving a call to zypper? Or perhaps there is an alternate process that can be considered for testing the real role of apt-get on openSUSE?

ref: JuliaPackaging/BinDeps.jl#202

@mlandres
Copy link
Member

mlandres commented Sep 5, 2016

@bmwiedemann: Bernhard please have a look at it.
(I'm also not sure if calling /sbin/yast2 -i is actually a good idea)

@bmwiedemann
Copy link
Member

bmwiedemann commented Sep 6, 2016

The intent was to map aptitude/apt-get commands to their zypper equivalents
and since aptitude becomes interactive when called without args, that was what I did for the wrapper.

I could map a apt-get -v to a call of zypper --version

> zypper --version
zypper 1.12.44

would that help?

otherwise, we could also just drop the yast -i part and return some help text instead.

@colbec
Copy link
Author

colbec commented Sep 6, 2016

Hmmm, it is a bit tricky, isn't it? Presumably there is a cohort of openSUSE users that benefit from the existence of apt-get on a zypper controlled system and we must keep them happy. On the other hand it can be difficult to test what package manager is present as the main actor.

Probably the suggestion of @bmwiedemann to have the openSUSE apt-get return the text version string of zypper would be good. Then the test in other programmes could be to parse the version string to see if it contains the string apt-get, at which point on openSUSE the test returns false which is what we want.

bmwiedemann added a commit to bmwiedemann/zypper that referenced this issue Sep 6, 2016
this broke package-manager detection for bindeps
fixes openSUSE#98
bmwiedemann added a commit to bmwiedemann/zypper that referenced this issue Sep 6, 2016
and only call interactive yast installer when called as aptitude.
This broke package-manager detection for bindeps
fixes openSUSE#98
bmwiedemann added a commit to bmwiedemann/zypper that referenced this issue Sep 9, 2016
and only call interactive yast installer when called as aptitude.
This broke package-manager detection for bindeps
fixes openSUSE#98
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

Successfully merging a pull request may close this issue.

3 participants