Depot differences

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

Depot differences

Beitrag 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! :)
Best regards,
Dorian Borovina
Benutzeravatar
n.wenselowski
Ex-uib-Team
Beiträge: 3194
Registriert: 04 Apr 2013, 12:15

Re: Depot differences

Beitrag 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

Code: Alles auswählen

import OPSI
dorian.borovina
Beiträge: 36
Registriert: 24 Aug 2017, 12:32

Re: Depot differences

Beitrag 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!
Best regards,
Dorian Borovina
Markk786
Beiträge: 2
Registriert: 02 Aug 2017, 06:23

Re: Depot differences

Beitrag von Markk786 »

Zuletzt geändert von Markk786 am 04 Sep 2018, 23:53, insgesamt 3-mal geändert.
dorian.borovina
Beiträge: 36
Registriert: 24 Aug 2017, 12:32

Re: Depot differences

Beitrag von dorian.borovina »

AFAIK, nope. :)
Best regards,
Dorian Borovina
Benutzeravatar
n.wenselowski
Ex-uib-Team
Beiträge: 3194
Registriert: 04 Apr 2013, 12:15

Re: Depot differences

Beitrag 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

Code: Alles auswählen

import OPSI
dorian.borovina
Beiträge: 36
Registriert: 24 Aug 2017, 12:32

Re: Depot differences

Beitrag 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
Best regards,
Dorian Borovina
Benutzeravatar
n.wenselowski
Ex-uib-Team
Beiträge: 3194
Registriert: 04 Apr 2013, 12:15

Re: Depot differences

Beitrag 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

Code: Alles auswählen

import OPSI
dorian.borovina
Beiträge: 36
Registriert: 24 Aug 2017, 12:32

Re: Depot differences

Beitrag 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
Best regards,
Dorian Borovina
Benutzeravatar
n.wenselowski
Ex-uib-Team
Beiträge: 3194
Registriert: 04 Apr 2013, 12:15

Re: Depot differences

Beitrag 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

Code: Alles auswählen

import OPSI
Antworten