Software Center Package Removal Behaviour

I did some quick tests and the removal behavior seems good to me.
Still I have doubts about these changes since I fear we will face some more hidden troubles.
Also be aware these changes will affect the yum behavior when used from the command line.

I would gladly review the PR, but before releasing the packages we need a big effort from the quality team :slight_smile:

1 Like

Itā€™s possible to set those options from a shell wrapper

yum --setopt=...

ā€¦the problem here is we have a python wrapper :slight_smile:

/sbin/e-smith/pkgaction

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

2 Likes

@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.0.1.1.0-1.ns7 å°†č¢« 删除
ā€”> äæē•™č½Æ件包ļ¼š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?

3 Likes

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:

2 Likes

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?
@ambassadors_group

2 Likes

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.ā€

2 Likes

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.

2 Likes

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:

2 Likes

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.

2 Likes

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