Can zypper install/remove a package with out dependencies

Gday, i’m still pretty new to opensuse, and one package manager i really appreciate is pacman because of it’s ability to handle dependencies but ignore them if i choose to. I’ve permanently left Debian because of it’s inability to do this with apt or dpkg (dpkg can but not very well). Does zypper have the ability to ignore dependencies if i want?

On 03/01/2012 06:36 AM, knightron wrote:
> Does zypper have the ability to ignore dependencies if i want?

do you mean, for example, if you want to install ABC which has a
dependency named XYZ and you don’t want XYZ installed, can you still
install ABC?

sure you can do that…

but why would you want to? because you will find that ABC does not
work as expected, if at all. because while you have ignored the
dependency, ABC can not…if it needs XYZ to work, then it will not
without. see?

its kinda like asking: If i buy this car can i ignore buying gasoline
for it? (sure you can, but don’t make plans to drive it)


DD
What does DistroWatch write about YOU?: http://tinyurl.com/SUSEonDW

There several reasons i may want to ignore dependencies. For one, not all dependencies are real dependencies, for example, sometimes i like to use gnome2/mate desktop environment, but i hate nautilus, i prefer xfdesktop and Dolphin, but nautilus is a dependency of gnome-session. (or at least in Debian; i’m not super familiar with Opensuse yet). Another reason. I may have compiled a dep from source for some reason and the package manager is not aware of it. Or maybe it’s a package that depends on a lower version of a library, then i have installed, and a simple symlink of the library would work nicely; that way i don’t have to down grade. Satisfying?
So is there a way?

Am 01.03.2012 21:16, schrieb knightron:
>
> So is there a way?
>
Yes, of course zypper can do this and the rpm command can do this and by
the way apt-get/aptitude can also do this on debian.


PC: oS 11.4 (dual boot 12.1) 64 bit | Intel Core i7-2600@3.40GHz | KDE
4.6.0 | GeForce GT 420 | 16GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.8.0 |
nVidia ION | 3GB Ram

On 03/01/2012 09:16 PM, knightron wrote:
>
> Satisfying?
> So is there a way?

the Gnome desktop environment is a product of a group of developers
independent from both Debian and openSUSE…and, if due to internal
dependencies as established by the Gnome developers it is impossible to
install the Gnome environment without installing Nautilus, then you must
install it Nautilus, or not install Gnome…your choice…

if that is the case (i have no idea if it is a (your term) “real”
dependency, or not) but generally whether you are using Debian,
openSUSE, Fedora or whatever…you will have to agree to the
dependencies as set by the originators…

however since Gnome is open source software you have the ability to
change the source code to remove all the “unreal” dependencies you wish…

alternatively there are lots of desktop environments without Nautilus,
try several of them…

but, personally i would find it easier to just install Gnome and not use
Nautilus…in fact i do something similar constantly: i installed KDE
and that default installs KMail, which i have never used…and don’t
intend to…

also you could install both KDE and Gnome and ignore Nautilus and always
use Dolphin running in Gnome…see there are lots of ways to skin this
cat…and, as far as i know all of those ways are also available if
running Debian, openSUSE, Red Hat, etc etc etc…

satisfied?


DD
What does DistroWatch write about YOU?: http://tinyurl.com/SUSEonDW

On 2012-03-01 21:16, knightron wrote:
>
> There several reasons i may want to ignore dependencies. For one, not
> all dependencies are real dependencies, for example, sometimes i like to
> use gnome2/mate desktop environment, but i hate nautilus, i prefer

That’s a bad example you selected, because Nautilus is necesary in gnome
even if you never use it - because the gnome desktop uses it in the
background. What for I’ll leave as an exercise :-p

Nautilus is a real dependency, in any distro.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Am 01.03.2012 23:48, schrieb Carlos E. R.:
> On 2012-03-01 21:16, knightron wrote:
>>
>> There several reasons i may want to ignore dependencies. For one, not
>> all dependencies are real dependencies, for example, sometimes i like to
>> use gnome2/mate desktop environment, but i hate nautilus, i prefer
>
> That’s a bad example you selected, because Nautilus is necesary in gnome
> even if you never use it - because the gnome desktop uses it in the
> background. What for I’ll leave as an exercise :-p
>
> Nautilus is a real dependency, in any distro.
>
Agreed that this was a bad example, but the OP also gave a good example
I sometimes run into myself.
Compile a software/library yourself which is at the same time a
dependency for another software which is available as a package.
An example for me was long ago when I compiled my own versions of
gnuplot which was also a dependency for octave without creating my own
gnuplot rpm.
Of course you can turn your own compilation into a rpm and install it to
bypass the problem but not everyone including myself can do that always
easily esp. for complex software.
So it is then sometimes easier to install said package with lets say
“rpm -i --force --nodeps” than to jump through all the other hoops.

I for my part think that the original question is completely valid when
used with care for such a use case.


PC: oS 11.4 (dual boot 12.1) 64 bit | Intel Core i7-2600@3.40GHz | KDE
4.6.0 | GeForce GT 420 | 16GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.8.0 |
nVidia ION | 3GB Ram

On 2012-03-02 00:02, Martin Helm wrote:
> Am 01.03.2012 23:48, schrieb Carlos E. R.:

> Agreed that this was a bad example, but the OP also gave a good example
> I sometimes run into myself.

Yes, it is possible, but I don’t use zypper when hitting that kind of
problem. Even in your example, you use “rpm” :slight_smile:

> Of course you can turn your own compilation into a rpm and install it to
> bypass the problem but not everyone including myself can do that always
> easily esp. for complex software.

You can use checkinstall to create the rpm. It is not perfect, it is frown
upon by devs - but it is an rpm and fits in. :slight_smile:

> I for my part think that the original question is completely valid when
> used with care for such a use case.

I think that zypper prompts a question in that case and that you have to
answer. But as I said, I don’t use zypper for those cases. If I hit that
case, I bail out and start up yast instead.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Am 02.03.2012 01:33, schrieb Carlos E. R.:
>> Of course you can turn your own compilation into a rpm and install it to
>> bypass the problem but not everyone including myself can do that always
>> easily esp. for complex software.
>
> You can use checkinstall to create the rpm. It is not perfect, it is frown
> upon by devs - but it is an rpm and fits in. :slight_smile:
>
That is only sometimes an option since it creates a monolithic rpm and
not the set of splitted rpm’s one sometimes need (xyz, xyz-devel and so
on since there may be others), so instead of that (I tested it several
times) I find the classical way without rpm cleaner, but that’s now a
bit off topic. You notice also probably that I spoke about the past,
since a few years my system never have an unresolved dependency since I
create proper rpm’s when needed, but that was a long learning curve.

You are right that I used the rpm command to deliberately break
dependencies not zypper. The original question included if zypper can do
that and the answer is yes - even if its IMHO not a convenient tool for
this.


PC: oS 11.4 (dual boot 12.1) 64 bit | Intel Core i7-2600@3.40GHz | KDE
4.6.0 | GeForce GT 420 | 16GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.8.0 |
nVidia ION | 3GB Ram

@ Martin
I’m aware that Debian can thanks, i mentioned in brackets in my first post “dpkg can but not very well”; i deem it to not do it very well because it won’t continue to ignore them after the original ignore and will attempt to ‘resolve’ it every time apt i used afterwards .
@DenverD
Sorry, i don’t mean to come off as a smart ars with my ‘satisfied’ comment; I couldn’t think of how else to finish my paragraph. You made me laugh with the ‘real dependencies’ quote. I used that term, but am aware that a real dependency is one determined by the developers. What i meant by ‘real’ was essential ones… Thankyou for helping
@robin
It is not a bad example, And i used it because it’s a real life example, from my Slackware partition where i’ve installed Gnome 2.30 and then removed Nautilus to get as described and have a perfectly fine desktop.

I am new to not only Opensuse, but rpm based distros. I’ve never used one; i’ve been using Gnu/Linux for about a year now, and during that time, it has been mostly spent with slackware and Debian. So perhaps my question should have been, ‘how to install a package without dependencies’. Excuse my ignorance, i originally stated zypper, because i thought that’s how one would go about it.
So what i’ve got is:
‘rpm -i --force --nodeps’ (Thankyou Martin)
Many people have also said that zypper can do it too, but no one has actually said how.

On 03/02/2012 12:02 AM, Martin Helm wrote:
> I for my part think that the original question is completely valid when
> used with care for such a use case.

yes, the question was valid and so is your answer…i very carefully
selected my words when i wrote “if that is the case” as in:

if the dependency must not be ignored–don’t (or rewrite the source)…
if the dependency can be ignored–@knightron decides
if on Debian, openSUSE or other–probably has no bearing (but, could
since distro hackers may have adjusted with the code)

in all cases: dumping Debian because Gnome requires Nautilus is not valid.


DD
What does DistroWatch write about YOU?: http://tinyurl.com/SUSEonDW

On 03/02/2012 03:56 AM, knightron wrote:
> Many people have also said that zypper can do it too, but no one has
> actually said how.

interesting things found in ‘man zypper’ while searching on the string
“depend”:

under the heading “install (in) options” these flags:
–no-recommends
-R, --no-force-resolution

under the heading “source-install (si) <name>” these flags:
-d, --build-deps-only
-D, --no-build-deps

while searching the man i was surprised to find:
http://old-en.opensuse.org/Software_Management/Dependencies


DD
What does DistroWatch write about YOU?: http://tinyurl.com/SUSEonDW

On 2012-03-02 03:56, knightron wrote:
>
> @ Martin
> I’m aware that Debian can thanks, i mentioned in brackets in my first
> post “dpkg can but not very well”; i deem it to not do it very well
> because it won’t continue to ignore them after the original ignore and
> will attempt to ‘resolve’ it every time apt i used afterwards .

YaST at least will remember the choices you make, till you reset them by
asking YaST to rethink the dependencies. Zypper I don’t know, as I don’t
use it in such cases.

> @robin
> It is not a bad example, And i used it because it’s a real life
> example, from my Slackware partition where i’ve installed Gnome 2.30 and
> then removed Nautilus to get as described and have a perfectly fine
> desktop.

Without icons, at least in openSUSE.

> ‘how to install a package without
> dependencies’.

You must have a good reason for that, because the advice is to find out how
to fulfill them.

> Many people have also said that zypper can do it too, but no one has
> actually said how.

I did. I said that I think (from long time ago recollection) is that zypper
gives you a set of choices and ask you to select 1, 2 or 3, and then it
rethinks the case.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Thankyou DeverD for the informative links, and flags that i should have picked up. So you know ;i have not left my previous distro because i wanted to use Gnome without Nautilus; that was just an example. In fact i’m using kde at the moment with no gnome/mate.
Robin, i think you may have overlooked part of my example. I didn’t just say replace nautilus with Dolphin, i also mentioned xfdesktop.
I think that i posted good reasons. I don’t normally need to install packages without deps, but sometimes i think it is appropriate under certain circumstances, and i am trying to prepare for a possible event that may occur up the road where such task is needed. Thanks for your help Robin, but your example isn’t quite what i was after. If i ‘zypper remove foo’ it will automatically remove the dep too. I think the rpm -i --force --nodeps may be the best solution. I’m going to mark this as solved guys. Thanks for all your help.

… How do i mark this as solved? i can’t see an option.

On Fri, 02 Mar 2012 11:26:03 +0000, knightron wrote:

> . How do i mark this as solved? i can’t see an option.

There isn’t one - there have been many, many discussions about the pros/
cons of marking threads as solved, so I won’t rehash the reasons again
here. :slight_smile:

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

Am 02.03.2012 10:53, schrieb Carlos E. R.:
>> Many people have also said that zypper can do it too, but no one has
>> actually said how.
>
> I did. I said that I think (from long time ago recollection) is that zypper
> gives you a set of choices and ask you to select 1, 2 or 3, and then it
> rethinks the case.
>
Just to add that is exactly what I meant by yes it can do it, it simply
asks the user to confirm breaking dependencies and install anyway.


PC: oS 11.4 (dual boot 12.1) 64 bit | Intel Core i7-2600@3.40GHz | KDE
4.6.0 | GeForce GT 420 | 16GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.8.0 |
nVidia ION | 3GB Ram

Am 02.03.2012 10:53, schrieb Carlos E. R.:
> On 2012-03-02 03:56, knightron wrote:
>>
>> @ Martin
>> I’m aware that Debian can thanks, i mentioned in brackets in my first
>> post “dpkg can but not very well”; i deem it to not do it very well
>> because it won’t continue to ignore them after the original ignore and
>> will attempt to ‘resolve’ it every time apt i used afterwards .
>
> YaST at least will remember the choices you make, till you reset them by
> asking YaST to rethink the dependencies. Zypper I don’t know, as I don’t
> use it in such cases.
>
Last time I ignored a dependency with a forced install through rpm (and
that was around 11.1 or 11.2, so I cannot say if it is still true) it
was also respected by yast afterwards, so I’ld guess that its the same
for zypper (but I never tried).


PC: oS 11.4 (dual boot 12.1) 64 bit | Intel Core i7-2600@3.40GHz | KDE
4.6.0 | GeForce GT 420 | 16GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.8.0 |
nVidia ION | 3GB Ram

To make this clear. rpm is a package manager and zypper is nothing more than a dependency resolution engine over it. So it makes no sense for zypper to have an option to ignore dependencies (but in the case where it can’t find them and asks the user).

To the best of my knowledge other dependency resolution engines have/had problems solving dependencies in a “broken” system (meaning a system with unfilled dependencies for some of the installed packages). But since ZYpp is so clever it isn’t a problem. It will not try to “fix” the system unless you ask it to (with “zypper verify”). Soft dependencies (recommends/supplements) will still behave as always… they are installed by default but the user can decide not to install them and they will not be suggested for installation any more (unless they are a hard dependency of something else).

On 2012-03-02 12:26, knightron wrote:
> Thanks for your
> help Robin, but your example isn’t quite what i was after. If i ‘zypper
> remove foo’ it will automatically remove the dep too.

Ah, what I said was for installation, not for removal.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)