PDA

View Full Version : --noautoremove want to remove pkgs



feddy
5th October 2017, 10:37 AM
dnf remove --noautoremove fpc-src
Dependencies resolved.
================================================== ================================================== ================================================== ===============
Package Arch Version Repository Size
================================================== ================================================== ================================================== ===============
Removing:
fpc-src x86_64 3.0.2-1.fc26 @@commandline 196 M
Removing depended packages:
lazarus x86_64 1.6.4-2.fc26 @@commandline 532 M

Transaction Summary
================================================== ================================================== ================================================== ===============
Remove 1 Package

Freed space: 729 M
Is this ok [y/N]: n
Operation aborted.


Isn't that the whole point of the --noautoremove option ?

--noautoremove
disable removal of dependencies that are no longer used. It sets clean_requirements_on_remove conf option to False.


How can I remove the fpc package without removing lazarus?

thx,

srakitnican
5th October 2017, 08:43 PM
No, autoremove removes packages that are not required by any other package and are not installed by user explicitly. In this case package `lazarus` depends on `fpc-src` as it is marked by package maintainer here: https://src.fedoraproject.org/rpms/lazarus/blob/master/f/lazarus.spec#_17

I am don't know if it is correct or not. If package works without it, maybe it could be marked with a `Recommends` tag which allows to not have it installed. Ask maintainer if in doubt.

feddy
6th October 2017, 06:00 AM
thanks, I was misunderstanding that option but that still leaves the fundamental question I asked:




How can I remove the fpc package without removing lazarus?

That will leave laz broken since it lacks a dep . but I intend to deal with that. There must be a way to over-ride the dependency check and just get it to do what I tell it to do if I provide an explicit option saying this is really what I intend.

srakitnican
6th October 2017, 10:38 AM
In short, you can't. Not in a sane way that doesn't break dependency resolution (rpm --nodeps).

You can however rebuilt the package without the dependency, and then install your version. Check Copr or Mock. Or work with package maintainer to come to a solution that works for everyone.

dodona
6th October 2017, 07:00 PM
I recommend to build lazarus out of the sources. This is the typical UNIX way, especially in BSD, to install software. I build 28 packages directly from the repositories{git, svn} via cron on a daily base.