]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- add executable name to description
authorArvin Schnell <aschnell@suse.de>
Wed, 29 Jun 2011 10:27:08 +0000 (12:27 +0200)
committerArvin Schnell <aschnell@suse.de>
Wed, 29 Jun 2011 10:27:08 +0000 (12:27 +0200)
scripts/zypp-plugin.py

index 32245953f08b7a2d2d832edb7bfd75beb8b7a826..19d7a5da54fd2f706c103775e53815f2ca8031a9 100755 (executable)
@@ -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()