r195 - /debtorrent/trunk/test.py
camrdale-guest at users.alioth.debian.org
camrdale-guest at users.alioth.debian.org
Sat Aug 4 03:12:17 UTC 2007
Author: camrdale-guest
Date: Sat Aug 4 03:12:16 2007
New Revision: 195
URL: http://svn.debian.org/wsvn/debtorrent/?sc=1&rev=195
Log:
Tests no longer require a user with ownership of /var/lib/dpkg/status to run.
Modified:
debtorrent/trunk/test.py
Modified: debtorrent/trunk/test.py
URL: http://svn.debian.org/wsvn/debtorrent/debtorrent/trunk/test.py?rev=195&op=diff
==============================================================================
--- debtorrent/trunk/test.py (original)
+++ debtorrent/trunk/test.py Sat Aug 4 03:12:16 2007
@@ -186,7 +186,6 @@
Lists "lists/";
xstatus "xstatus";
userstatus "status.user";
- status "/var/lib/dpkg/status";
cdroms "cdroms.list";
};
@@ -376,7 +375,8 @@
print '************************** apt-get (' + str(num_down) + ') ' + ' '.join(cmd) + ' **************************'
apt_conf = join([down_dir(num_down), 'etc', 'apt', 'apt.conf'])
- new_cmd = ['apt-get', '-d', '-q', '-c', apt_conf] + cmd
+ dpkg_status = join([down_dir(num_down), 'var', 'lib', 'dpkg', 'status'])
+ new_cmd = ['apt-get', '-d', '-q', '-c', apt_conf, '-o', 'Dir::state::status='+dpkg_status] + cmd
pid = os.spawnvp(os.P_NOWAIT, new_cmd[0], new_cmd)
return pid
@@ -459,8 +459,11 @@
# Create the directory structure needed by apt
makedirs([downloader_dir, 'etc', 'apt', 'apt.conf.d'])
makedirs([downloader_dir, 'var', 'lib', 'apt', 'lists', 'partial'])
+ makedirs([downloader_dir, 'var', 'lib', 'dpkg'])
makedirs([downloader_dir, 'var', 'cache', 'apt', 'archives', 'partial'])
touch([downloader_dir, 'var', 'lib', 'apt', 'lists', 'lock'])
+ touch([downloader_dir, 'var', 'lib', 'dpkg', 'lock'])
+ touch([downloader_dir, 'var', 'lib', 'dpkg', 'status'])
touch([downloader_dir, 'var', 'cache', 'apt', 'archives', 'lock'])
# Create apt's config files
More information about the Debtorrent-commits
mailing list