Seite 1 von 1

Depot differences

Verfasst: 05 Feb 2018, 17:53
von dorian.borovina
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! :)

Re: Depot differences

Verfasst: 07 Feb 2018, 14:17
von n.wenselowski
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

Re: Depot differences

Verfasst: 20 Feb 2018, 09:23
von dorian.borovina
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!

Re: Depot differences

Verfasst: 10 Mär 2018, 20:58
von Markk786

Re: Depot differences

Verfasst: 12 Mär 2018, 09:39
von dorian.borovina
AFAIK, nope. :)

Re: Depot differences

Verfasst: 15 Mär 2018, 17:59
von n.wenselowski
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

Re: Depot differences

Verfasst: 19 Mär 2018, 11:11
von dorian.borovina
Hi Niko,

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

Best regards,

Dorian

Re: Depot differences

Verfasst: 21 Mär 2018, 12:05
von n.wenselowski
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

Re: Depot differences

Verfasst: 23 Mär 2018, 13:49
von dorian.borovina
Hi Niko,

Great, your approach is spot on!

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

Best regards,

Dorian Borovina

Re: Depot differences

Verfasst: 28 Mär 2018, 12:25
von n.wenselowski
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