Package: piuparts
Version: 0.41
Severity: normal
Tags: patch
Running
piuparts -t ... -m ... -d lenny -a piuparts
fails with
0m34.5s ERROR: Couldn't create file
/tmp/piuparts/tmpAV8F3d/etc/dpkg/dpkg.cfg.d/piuparts:
[Errno 2] No such file or directory:
'/tmp/piuparts/tmpAV8F3d/etc/dpkg/dpkg.cfg.d/piuparts'
because lenny does not ship /etc/dpkg/dpkg.cfg.d/
Attached patch fixes this.
Andreas
-- System Information:
Debian Release: 6.0.3
APT prefers stable
APT policy: (800, 'stable'), (700, 'testing'), (600, 'unstable'), (500,
'stable-updates'), (130, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages piuparts depends on:
ii apt 0.8.10.3+squeeze1
ii debootstrap 1.0.37
ii lsb-release 3.2-23.2squeeze1
ii lsof 4.81.dfsg.1-1
ii python 2.6.7-3
ii python-debian 0.1.18
ii python2.6 2.6.7-3
ii python2.7 2.7.2-5
piuparts recommends no packages.
Versions of packages piuparts suggests:
pn ghostscript 8.71~dfsg2-9
pn python-rpy <none>
-- no debconf information
--- Begin Message ---
/etc/dpkg/dpkg.cfg.d/ does not exist on lenny, so create the missing
directory before installing a file there
Signed-off-by: Andreas Beckmann <[email protected]>
---
piuparts.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/piuparts.py b/piuparts.py
index a731af2..5abf7ea 100644
--- a/piuparts.py
+++ b/piuparts.py
@@ -717,6 +717,8 @@ class Chroot:
lines.append('force-confdef\n')
logging.info("Warning: dpkg has been configured to use the
force-confdef option. This will hide problems, see #466118.")
if lines:
+ if not os.path.exists(self.relative("etc/dpkg/dpkg.cfg.d")):
+ os.mkdir(self.relative("etc/dpkg/dpkg.cfg.d"))
create_file(self.relative("etc/dpkg/dpkg.cfg.d/piuparts"),
"".join(lines))
--
tg: (b2989dd..) t/fix/lenny-dpkg.cfg.d (depends on: develop)
--- End Message ---