From: Arvin Schnell Date: Wed, 29 Jun 2011 10:27:08 +0000 (+0200) Subject: - add executable name to description X-Git-Tag: v0.1.3~345 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=401c3313dcea9fc9e9861ff07a3070e06476faa7;p=thirdparty%2Fsnapper.git - add executable name to description --- diff --git a/scripts/zypp-plugin.py b/scripts/zypp-plugin.py index 32245953..19d7a5da 100755 --- a/scripts/zypp-plugin.py +++ b/scripts/zypp-plugin.py @@ -1,5 +1,7 @@ #!/usr/bin/env python +from os import readlink, getppid +from os.path import basename from subprocess import Popen, PIPE from zypp_plugin import Plugin @@ -7,8 +9,10 @@ class MyPlugin(Plugin): def PLUGINBEGIN(self, headers, body): + exe = basename(readlink("/proc/%d/exe" % getppid())) + args = ["snapper", "create", "--type=pre", "--print-number", - "--cleanup-algorithm=number", "--description=zypp"] + "--cleanup-algorithm=number", "--description=zypp(%s)" % exe] self.o = Popen(args, stdout=PIPE).communicate()[0].strip() self.ack()