Software Center Package Removal Behaviour

Kudos to @dnutan for opening a PR! Please go on!


@davidep, I will need some help (disclosure: I’m not a developer :cold_sweat:).

I was about to ask if the system commands (yum, rpm…) executed by the server-manager were aware of the locale context: now I know they use the language set at web login.

It is working almost well with rpm, as it gives a clean output, but there are some cases (nethserver-ftp) where it does not give accurate information on whatrequires a specific package.

Help with regex
Now I’m trying with /usr/bin/yum -C --assumeno remove $@ . If you can help on getting a proper regex pattern to match all the packages shown on Keeping package: lines (regardless of language), because I am tempted to the ugliness of forcing the language at runtime :grin:.

—> Keeping package: nethserver-samba-2.0.0-1.ns7.noarch due to nethserver-samba-audit-1.1.0-1.ns7.noarch

Some troublemakers:

// translation pattern: msgstr “—> 软件包 %s.%s.%s.%s-%s 将被 %s”
// translation pattern: msgstr “—> 保留软件包:%s 由于 %s”

—> 软件包 nethserver-mysql.noarch. 将被 删除
—> 保留软件包:nethserver-mysql-1.1.0-1.ns7.noarch 由于 nethserver-samba-audit-1.1.0-1.ns7.noarch

// translation pattern: msgstr “—> A(z) %s.%s %s:%s-%s csomaggal a következő történik: %s”
// translation pattern: msgstr “—> A(z) %s Csomag megtartása a következő miatt: %s”

—> A(z) nethserver-mysql.noarch 0:1.1.0-1.ns7 csomaggal a következő történik: törölve
—> A(z) nethserver-mysql-1.1.0-1.ns7.noarch Csomag megtartása a következő miatt: nethserver-samba-audit-1.1.0-1.ns7.noarch

–> Manteniendo paquete: nethserver-samba-2.0.0-1.ns7.noarch debido a nethserver-samba-audit-1.1.0-1.ns7.noarch

—> Balíček nethserver-samba-2.0.0-1.ns7.noarch ponechán, protože: nethserver-samba-audit-1.1.0-1.ns7.noarch

Help with permissions
If a shell script under /usr/libexec/nethserver/ needs to run under sudo when called from server-manager, do I need to set an acl on the file (for running tests)? how?

No hurry.

P.S. Don’t know if there is something in the yum python API that can be implemented to run at runtime without changing yum.conf

Now you are! :smiley:

I’d write a shell wrapper that invokes yum command by setting the environment variable LANG=C.

This would help on building a matching regex pattern.

No, permissions should be as usual (root,root,0755).

IIRC we already do it:

1 Like

@davidep, thanks for the tips. :slight_smile:

I’m holding the changes and thinking to dismiss them due to some quirks, as @giacomo feared.

From the UI seems to work well, but we may find packages with ¿circular dependencies? difficulting its removal from CLI, or other quircks:

  • circular dependencies ¿? between dkms and pfring-dkms, and between cups and ghostscript-cups
  • uninstalling cups removed acl package (pre-installed with the system) Maybe I did something wrong (in yum.conf) before installing/removing it.
  • Normal ¿?: @nethserver-mail: removes nethserver-roundcubemail (optionals), nethserver-getmail (optionals)
  • Same as happens without the changes: @nethserver-web-filter removes squid (with @nethserver-web-proxy installed)

What are your thoughts?


First of all, kudos! :smiley:
I din’t have the patience to dig into the web interface code like you did!

Circular dependencies on dkms packages can happen, but pfring-dkms comes from ntopng repository and, honestly, that package is crap.

I think both are correct.

Really no idea on this, but I saw this kind of strange behaviors long time ago when testing auto removal tools for yum.

IMHO package removal is a not-resolved problem and create a simple web interface for it is even more difficult :slight_smile:


I’d like to continue this discussion here gathering some thoughts about the current topic
What do you think to leave the “remove” activities in the CLI only, dropping the DELETE button?


I am in favor of such an option provided there will be documentation available on how to un-install nethserver modules.
I understand the default ‘yum uninstall packagename’ but I don’t know the official module packages.
It would be nice to see a wikipage with all the nethserver modules and how to install and de-install then through the commandline.

1 Like

Indeed, we need to document the command correctly and list the packages to uninstall

1 Like

I don’t think that to drop the delete button is a good idea. Nethserver claims to be easy to handle as it’s biggest advantage. To be able to install a package with a few clicks, but you can’t get rid of it without CLI? IMO bad manner. For those who just want to disable the installed package and don’t care about fragments that will remain it is good the way it is. And I think there are some of them.
Maybe an addtional notice, that for a full remove you have to go to CLI is an option.
Something like: “Please be aware, that this option only remove the neth-package. If you want to do a full remove, please reffer to the deinstallation notes in the wiki.”


I wouldn’t remove that button! Yes, as @giacomo said in the other topic, the Enterprise version does not have it, but the Enterprise version has also the config backup on cloud and factory reset in embedded systems: reinstalling from scratch and restoring the configuration is available out of the box :blush:

Documenting the right packages to remove is difficult: information must be consistent. I’d prefer trying to fix the group compositions and RPM dependencies, so that removals are not disruptive.

I consider such removals as bugs and they should be fixed, if possible.


The software center is a huge piece of code, but the signal won’t be good to remove the uninstall button IMHO.

If you have a bug, please correct it, it sounds simple :slight_smile:


I totally agree…
The delete button is clear… And the guy who access the Netserver webgui is a sysadmin or at least an advanced user… not a children.


sure…but the list of deleted rpm must be clear, the removal of dependencies must be the same like with the CLI, and of course when you remove nethserver-mysql, mysql itself should be removed (for example) and unfortunately a lot of nethserver-* rpm of course.

The current behaviour just does not look consistent.
The nethserver-webproxy example can be installed and it installs squid etc… But when you remove it, nethserver-nextcloud is removed too. This is highly unwanted behavior and has nothing to do with being a sysadmin or not.

1 Like

Perhaps doing it makes little sense. What does that involve?

Does the behaviour is the same with the cli ?

@stephdl: ermmm dunno shrucks
I must test this. If it is doing the same in webinterface and cli, then still IMO it is a bad thing that by removing a proxy, nextcloud gets removed too…

1 Like

I agree: it doesn’t look consistent but it is :frowning:

Yes it does.
This is how yum groups work.

Now I see it was a bad design decision to use yum groups as software module, my bad.
I don’t any viable alternative right now.

1 Like

I bet this is now fixed :wink:

necrobump :hushed:

Was on the breach to open an topic it is strange the dependency’s of a nethserver-module are not removed. :grinning:

And after reading this, IMHO it is still strange :face_with_raised_eyebrow: