summaryrefslogtreecommitdiffstats
path: root/bin/apt-update-file
diff options
context:
space:
mode:
authorFlorian Weimer <fw@deneb.enyo.de>2005-09-12 20:08:46 +0000
committerFlorian Weimer <fw@deneb.enyo.de>2005-09-12 20:08:46 +0000
commit966408efc51713284e5428e32104ded6c2e34096 (patch)
treef930abe9d05039b3195929fc7e4a1e760878fd6a /bin/apt-update-file
parent1330c74186205a5261df8ed5d536b7a022e25654 (diff)
lib/python/debian_support.py:
Add support for downloading package file diffs. bin/apt-update-file: Driver script for the new functionality. (I will use this functionality to implement package database replication. The goal is to keep a local copy of all the interesting data, so that we no longer need to consult madison etc.) git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@1939 e39458fd-73e7-0310-bf30-c45bca0a0e42
Diffstat (limited to 'bin/apt-update-file')
-rwxr-xr-xbin/apt-update-file30
1 files changed, 30 insertions, 0 deletions
diff --git a/bin/apt-update-file b/bin/apt-update-file
new file mode 100755
index 0000000000..f424195b34
--- /dev/null
+++ b/bin/apt-update-file
@@ -0,0 +1,30 @@
+#!/usr/bin/python
+
+# This script is mainly used to demo the updateFile function.
+
+import os
+import os.path
+import string
+import sys
+
+def setup_paths():
+ check_file = 'lib/python/debian_support.py'
+ path = os.getcwd()
+ while 1:
+ if os.path.exists("%s/%s" % (path, check_file)):
+ sys.path = [path + '/lib/python'] + sys.path
+ return path
+ idx = string.rfind(path, '/')
+ if idx == -1:
+ raise ImportError, "could not setup paths"
+ path = path[0:idx]
+root_path = setup_paths()
+
+import bugs
+import debian_support
+
+if len(sys.argv) <> 3:
+ sys.stderr.write("usage: apt-update-file REMOTE LOCAL\n")
+ sys.exit(1)
+
+debian_support.updateFile(sys.argv[1], sys.argv[2], verbose=True)

© 2014-2024 Faster IT GmbH | imprint | privacy policy