[Python-apps-commits] r11579 - in packages/mercurial/trunk/debian/patches (1 file)

vicho at users.alioth.debian.org vicho at users.alioth.debian.org
Tue Nov 11 08:17:12 UTC 2014


    Date: Tuesday, November 11, 2014 @ 08:17:10
  Author: vicho
Revision: 11579

Fix deb_specific__fix_fhs_paths.patch so that it doesn't break the testsuite when building the package

Modified:
  packages/mercurial/trunk/debian/patches/deb_specific__fix_fhs_paths.patch

Modified: packages/mercurial/trunk/debian/patches/deb_specific__fix_fhs_paths.patch
===================================================================
--- packages/mercurial/trunk/debian/patches/deb_specific__fix_fhs_paths.patch	2014-11-11 03:40:34 UTC (rev 11578)
+++ packages/mercurial/trunk/debian/patches/deb_specific__fix_fhs_paths.patch	2014-11-11 08:17:10 UTC (rev 11579)
@@ -1,20 +1,20 @@
 Description: Use FHS compliant path for data
- mercurial installs expects its data files next to their py files in
- /usr/lib/python2.7/dist-packages/mercurial .  We put data file in the
- fhs compliant /usr/share/mercurial .
+ By default, mercurial installs expects its data files next to their
+ py files in /usr/lib/python2.7/dist-packages/mercurial .  Debian puts
+ the data files in the FHS compliant /usr/share/mercurial .  Fix the
+ path only when run from the FHS compliant path
+ (/usr/lib/pythonX.Y/dist-packages/mercurial) so as to not break the
+ testsuite when building the package.
 Author: Javi Merino <vicho at debian.org>
 
 --- a/mercurial/util.py
 +++ b/mercurial/util.py
-@@ -578,8 +578,10 @@ def mainfrozen():
+@@ -578,6 +578,8 @@ def mainfrozen():
  if mainfrozen():
      # executable version (py2exe) doesn't support __file__
      datapath = os.path.dirname(sys.executable)
--else:
-+elif sys.argv[0] == "gendoc.py":
++elif __file__.startswith("/usr/lib/python"):
++    datapath = "/usr/share/mercurial"
+ else:
      datapath = os.path.dirname(__file__)
-+else:
-+    datapath = "/usr/share/mercurial"
  
- i18n.setdatapath(datapath)
- 




More information about the Python-apps-commits mailing list