diff options
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | debian/control | 4 | ||||
-rwxr-xr-x | debian/rules | 1 | ||||
-rwxr-xr-x | etckeeper-bzr/__init__.py (renamed from etckeeper-bzr.py) | 8 |
4 files changed, 10 insertions, 4 deletions
@@ -27,3 +27,4 @@ endif ifeq ($(LOWLEVEL_PACKAGE_MANAGER),pacman-g2) $(INSTALL_DATA) pacman-g2.hook $(DESTDIR)$(etcdir)/pacman-g2/hooks/etckeeper endif + -./etckeeper-bzr/__init__.py install --root=$(DESTDIR) diff --git a/debian/control b/debian/control index af675b6..df3e58c 100644 --- a/debian/control +++ b/debian/control @@ -1,7 +1,7 @@ Source: etckeeper Section: admin Priority: optional -Build-Depends: debhelper (>= 5), dpkg-dev (>= 1.9.0) +Build-Depends: debhelper (>= 5), dpkg-dev (>= 1.9.0), bzr (>= 1.4~), python-support (>= 0.5.3) Maintainer: Joey Hess <joeyh@debian.org> Standards-Version: 3.7.3 Vcs-Git: git://git.kitenet.net/etckeeper @@ -10,7 +10,7 @@ Homepage: http://kitenet.net/~joey/code/etckeeper/ Package: etckeeper Architecture: all Section: admin -Depends: git-core (>= 1:1.5.4) | mercurial | bzr (>= 1.0), ${misc:Depends} +Depends: git-core (>= 1:1.5.4) | mercurial | bzr (>= 1.4~), ${misc:Depends} Description: store /etc in git, mercurial, or bzr The etckeeper program is a tool to let /etc be stored in a git, mercurial, or bzr repository. It hooks into APT to automatically commit changes made to diff --git a/debian/rules b/debian/rules index eb737a5..28e3c1b 100755 --- a/debian/rules +++ b/debian/rules @@ -15,6 +15,7 @@ binary-indep: build dh_testroot dh_clean -k $(MAKE) install DESTDIR=debian/etckeeper + dh_pysupport dh_installdocs README TODO dh_installexamples dh_installchangelogs diff --git a/etckeeper-bzr.py b/etckeeper-bzr/__init__.py index 97a8689..a5381c5 100755 --- a/etckeeper-bzr.py +++ b/etckeeper-bzr/__init__.py @@ -3,11 +3,15 @@ """Runs etckeeper pre-commit when necessary.""" +import bzrlib from bzrlib.mutabletree import MutableTree from bzrlib.errors import BzrError, NotLocalUrl import os import subprocess +if bzrlib.version_info[:2] < (1,4): + raise "Version of Bazaar to old. Need at least 1.4." + def etckeeper_startcommit_hook(tree): if not os.path.exists(tree.abspath(".etckeeper")): # Only run the commit hook when this is an etckeeper branch @@ -22,5 +26,5 @@ MutableTree.hooks.name_hook(etckeeper_startcommit_hook, "etckeeper") if __name__ == "__main__": from distutils.core import setup setup(name="bzr-etckeeper", - package_dir={"bzrlib.plugins.etckeeper":__file__}, - py_modules=["bzrlib.plugins.etckeeper"]) + packages=["bzrlib.plugins.etckeeper"], + package_dir={"bzrlib.plugins.etckeeper":"etckeeper-bzr"}) |