Depot differences

dorian.borovina
Beiträge: 34
Registriert: 24 Aug 2017, 12:32

Depot differences

Beitragvon dorian.borovina » 05 Feb 2018, 17:53

Dear devs,

I would like to thank you sincerely for your amazing work. Keep on rocking it!

One idea I have, nothing much, but makes man happy. :)

When you execute

Code: Alles auswählen

opsi-package-manager -D -d ALL


in order to see the difference between the depots, and if there is a PERFECT match, which means that all the depots are in sync,

command is returning nothing.

Like, really nothing. Gar nichts. :D

It would be nice if it could return " Depots are in sync" or something like that, just to let us know.

Thank you! :)

Benutzeravatar
n.wenselowski
Beiträge: 2850
Registriert: 04 Apr 2013, 12:15

Re: Depot differences

Beitragvon n.wenselowski » 07 Feb 2018, 14:17

Hi,

thanks for the kind words!

I openend an internal ticket for this as this is probably easy to implement.
If you want to implement this by yourself I'd happily give help!


Kind regards

Niko
Kein Support per DM!
_________________________
opsi support - uib gmbh
For productive opsi installations we recommend support contracts.

dorian.borovina
Beiträge: 34
Registriert: 24 Aug 2017, 12:32

Re: Depot differences

Beitragvon dorian.borovina » 20 Feb 2018, 09:23

Hi Niko,

I'm not a software dev, and my python skills are not something I would put on my CV.
But, let's take a look. :)
I did some research, and I belive I'm on the right track.

In the opsi-package-manager script, I've found this.

Code: Alles auswählen

if differs:
                                for line in lines:
                                        print line.encode(self.encoding, 'replace')
                                print ""


There is no else following this, so I would like to add it.

Code: Alles auswählen

else:
            print "There are no difference between the depots"


It does the job, but it looks like that it goes through the every line and prints the output for each one of it.
Can we summarise it somehow? :D

Thank You for your help!

Markk786
Beiträge: 2
Registriert: 02 Aug 2017, 06:23

Re: Depot differences

Beitragvon Markk786 » 10 Mär 2018, 20:58

Zuletzt geändert von Markk786 am 04 Sep 2018, 23:53, insgesamt 3-mal geändert.

dorian.borovina
Beiträge: 34
Registriert: 24 Aug 2017, 12:32

Re: Depot differences

Beitragvon dorian.borovina » 12 Mär 2018, 09:39

AFAIK, nope. :)

Benutzeravatar
n.wenselowski
Beiträge: 2850
Registriert: 04 Apr 2013, 12:15

Re: Depot differences

Beitragvon n.wenselowski » 15 Mär 2018, 17:59

Hi,

sorry for the late response. I was quite busy with opsi 4.1 and the conference.

Change looks good from the first glance. I'll look into also providing a translation for this.
I hope to be able to work a little bit more on this in the next week. I'lll let you know when there is a version available for tests!


Bye

Niko
Kein Support per DM!
_________________________
opsi support - uib gmbh
For productive opsi installations we recommend support contracts.

dorian.borovina
Beiträge: 34
Registriert: 24 Aug 2017, 12:32

Re: Depot differences

Beitragvon dorian.borovina » 19 Mär 2018, 11:11

Hi Niko,

No worries, take your time.
It's not like it's a crucial OPSI component or something :D

Best regards,

Dorian

Benutzeravatar
n.wenselowski
Beiträge: 2850
Registriert: 04 Apr 2013, 12:15

Re: Depot differences

Beitragvon n.wenselowski » 21 Mär 2018, 12:05

Hi Dorian,

this has been released in opsi-utils 4.1.1.19-1. This version is currently in experimental.
If you want to help translate check out this post.

The approach I took is that it only shows a message if there aren't any differences because otherwise environments with many packages would be spammed with messages that their packages have no differences and it would be harder to find out where exactly the differences are.



Bye

Niko
Kein Support per DM!
_________________________
opsi support - uib gmbh
For productive opsi installations we recommend support contracts.

dorian.borovina
Beiträge: 34
Registriert: 24 Aug 2017, 12:32

Re: Depot differences

Beitragvon dorian.borovina » 23 Mär 2018, 13:49

Hi Niko,

Great, your approach is spot on!

I will be glad to translate the OPSI on Croatian language. :)

Best regards,

Dorian Borovina

Benutzeravatar
n.wenselowski
Beiträge: 2850
Registriert: 04 Apr 2013, 12:15

Re: Depot differences

Beitragvon n.wenselowski » 28 Mär 2018, 12:25

Hi Dorian,

dorian.borovina hat geschrieben:Great, your approach is spot on!

I will be glad to translate the OPSI on Croatian language. :)

Great to hear!


Bye

Niko
Kein Support per DM!
_________________________
opsi support - uib gmbh
For productive opsi installations we recommend support contracts.