File: remove-revision-update.patch

package info (click to toggle)
suricata-update 1.3.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,232 kB
  • sloc: python: 6,268; makefile: 184; sh: 31
file content (37 lines) | stat: -rw-r--r-- 1,314 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Description: remove git revision
 The upstream version assumes that it is installed from a Git repository
 and tries to insert the Git commit ID into the code.
Author: Sascha Steinbiss <satta@debian.org>
Last-Update: 2019-01-03
--- a/setup.py
+++ b/setup.py
@@ -15,18 +15,18 @@
     print("Suricata-Update requires Python 2.7 or newer.")
     sys.exit(0)
 
-def write_git_revision():
-    if not os.path.exists(".git"):
-        return
-    try:
-        revision = subprocess.check_output(
-            ["git", "rev-parse", "--short", "HEAD"])
-        with open("./suricata/update/revision.py", "w") as fileobj:
-            fileobj.write("revision = '%s'" % (revision.decode().strip()))
-    except Exception as err:
-        print("Failed to get current git revision: %s" % (err))
+#def write_git_revision():
+#    if not os.path.exists(".git"):
+#        return
+#    try:
+#        revision = subprocess.check_output(
+#            ["git", "rev-parse", "--short", "HEAD"])
+#        with open("./suricata/update/revision.py", "w") as fileobj:
+#            fileobj.write("revision = '%s'" % (revision.decode().strip()))
+#    except Exception as err:
+#        print("Failed to get current git revision: %s" % (err))
 
-write_git_revision()
+#write_git_revision()
 
 args = {
     "name": "suricata-update",