##// END OF EJS Templates
beaker: patch for easier debugging of function locks
marcink -
r408:3c3cf46e default
parent child Browse files
Show More
@@ -0,0 +1,20 b''
1 diff -rup Beaker-1.9.1-orig/beaker/container.py Beaker-1.9.1/beaker/container.py
2 --- Beaker-1.9.1-orig/beaker/container.py 2018-04-10 10:23:04.000000000 +0200
3 +++ Beaker-1.9.1/beaker/container.py 2018-04-10 10:23:34.000000000 +0200
4 @@ -353,13 +353,13 @@ class Value(object):
5 debug("get_value returning old value while new one is created")
6 return value
7 else:
8 - debug("lock_creatfunc (didnt wait)")
9 + debug("lock_creatfunc `%s` (didnt wait)", self.createfunc.__name__)
10 has_createlock = True
11
12 if not has_createlock:
13 - debug("lock_createfunc (waiting)")
14 + debug("lock_createfunc `%s` (waiting)", self.createfunc.__name__)
15 creation_lock.acquire()
16 - debug("lock_createfunc (waited)")
17 + debug("lock_createfunc `%s` (waited)", self.createfunc.__name__)
18
19 try:
20 # see if someone created the value already
@@ -1,54 +1,60 b''
1 # Overrides for the generated python-packages.nix
1 # Overrides for the generated python-packages.nix
2 #
2 #
3 # This function is intended to be used as an extension to the generated file
3 # This function is intended to be used as an extension to the generated file
4 # python-packages.nix. The main objective is to add needed dependencies of C
4 # python-packages.nix. The main objective is to add needed dependencies of C
5 # libraries and tweak the build instructions where needed.
5 # libraries and tweak the build instructions where needed.
6
6
7 { pkgs, basePythonPackages }:
7 { pkgs, basePythonPackages }:
8
8
9 let
9 let
10 sed = "sed -i";
10 sed = "sed -i";
11 in
11 in
12
12
13 self: super: {
13 self: super: {
14
14
15 Beaker = super.Beaker.override (attrs: {
16 patches = [
17 ./patch-beaker-lock-func-debug.diff
18 ];
19 });
20
15 subvertpy = super.subvertpy.override (attrs: {
21 subvertpy = super.subvertpy.override (attrs: {
16 # TODO: johbo: Remove the "or" once we drop 16.03 support
22 # TODO: johbo: Remove the "or" once we drop 16.03 support
17 SVN_PREFIX = "${pkgs.subversion.dev or pkgs.subversion}";
23 SVN_PREFIX = "${pkgs.subversion.dev or pkgs.subversion}";
18 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
24 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
19 pkgs.aprutil
25 pkgs.aprutil
20 pkgs.subversion
26 pkgs.subversion
21 ];
27 ];
22 preBuild = pkgs.lib.optionalString pkgs.stdenv.isDarwin ''
28 preBuild = pkgs.lib.optionalString pkgs.stdenv.isDarwin ''
23 ${sed} -e "s/'gcc'/'clang'/" setup.py
29 ${sed} -e "s/'gcc'/'clang'/" setup.py
24 '';
30 '';
25 });
31 });
26
32
27 hgsubversion = super.hgsubversion.override (attrs: {
33 hgsubversion = super.hgsubversion.override (attrs: {
28 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
34 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
29 pkgs.sqlite
35 pkgs.sqlite
30 basePythonPackages.sqlite3
36 basePythonPackages.sqlite3
31 ];
37 ];
32 });
38 });
33
39
34 mercurial = super.mercurial.override (attrs: {
40 mercurial = super.mercurial.override (attrs: {
35 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
41 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
36 self.python.modules.curses
42 self.python.modules.curses
37 ] ++ pkgs.lib.optional pkgs.stdenv.isDarwin
43 ] ++ pkgs.lib.optional pkgs.stdenv.isDarwin
38 pkgs.darwin.apple_sdk.frameworks.ApplicationServices;
44 pkgs.darwin.apple_sdk.frameworks.ApplicationServices;
39 });
45 });
40
46
41 pyramid = super.pyramid.override (attrs: {
47 pyramid = super.pyramid.override (attrs: {
42 postFixup = ''
48 postFixup = ''
43 wrapPythonPrograms
49 wrapPythonPrograms
44 # TODO: johbo: "wrapPython" adds this magic line which
50 # TODO: johbo: "wrapPython" adds this magic line which
45 # confuses pserve.
51 # confuses pserve.
46 ${sed} '/import sys; sys.argv/d' $out/bin/.pserve-wrapped
52 ${sed} '/import sys; sys.argv/d' $out/bin/.pserve-wrapped
47 '';
53 '';
48 });
54 });
49
55
50 # Avoid that setuptools is replaced, this leads to trouble
56 # Avoid that setuptools is replaced, this leads to trouble
51 # with buildPythonPackage.
57 # with buildPythonPackage.
52 setuptools = basePythonPackages.setuptools;
58 setuptools = basePythonPackages.setuptools;
53
59
54 }
60 }
General Comments 0
You need to be logged in to leave comments. Login now