Package: cups
Version: 1.7.1-11
Severity: grave
Tags: patch
Justification: renders package unusable

Dear Maintainer,

cups-daemon fails to install on fresh systems because of missed /etc/cups. 
Message

Selecting previously unselected package cups-daemon.
Preparing to unpack .../cups-daemon_1.7.1-11.1_amd64.deb ...
/var/lib/dpkg/tmp.ci/preinst: 14: /var/lib/dpkg/tmp.ci/preinst: cannot create 
/etc/cups/cupsd-systemd-listen.conf: Directory nonexistent
dpkg: error processing archive 
/var/cache/apt/archives/cups-daemon_1.7.1-11.1_amd64.deb (--unpack):
 subprocess new pre-installation script returned error exit status 2

Creating the directory before writing a file in it solve the problem.
Patch attached.

Greetz Alf

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 
'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.14-0.towo.2-siduction-amd64 (SMP w/4 CPU cores; PREEMPT)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages cups depends on:
ii  cups-client            1.7.1-11
ii  cups-common            1.7.1-11
ii  cups-core-drivers      1.7.1-11
ii  cups-daemon            1.7.1-11
ii  cups-filters           1.0.50-1
ii  cups-ppdc              1.7.1-11
ii  cups-server-common     1.7.1-11
ii  debconf [debconf-2.0]  1.5.52
ii  ghostscript            9.05~dfsg-8+b1
ii  libavahi-client3       0.6.31-4
ii  libavahi-common3       0.6.31-4
ii  libc-bin               2.18-4
ii  libc6                  2.18-4
ii  libcups2               1.7.1-11
ii  libcupscgi1            1.7.1-11
ii  libcupsimage2          1.7.1-11
ii  libcupsmime1           1.7.1-11
ii  libcupsppdc1           1.7.1-11
ii  libgcc1                1:4.8.2-18
ii  libstdc++6             4.8.2-18
ii  libusb-1.0-0           2:1.0.17-1+b1
ii  lsb-base               4.1+Debian12
ii  poppler-utils          0.24.3-0r1
ii  procps                 1:3.3.9-4

Versions of packages cups recommends:
ii  avahi-daemon                     0.6.31-4
ii  colord                           1.0.6-1
ii  cups-filters [ghostscript-cups]  1.0.50-1
pn  printer-driver-gutenprint        <none>

Versions of packages cups suggests:
ii  cups-bsd               1.7.1-11
ii  cups-pdf               2.6.1-9
ii  foomatic-db            20140325-1
pn  hplip                  <none>
pn  printer-driver-hpcups  <none>
pn  smbclient              <none>
ii  udev                   204-8

-- debconf information:
* cupsys/raw-print: true
* cupsys/backend: lpd, socket, usb, snmp, dnssd
diff --git a/debian/cups-daemon.preinst b/debian/cups-daemon.preinst
index 3dfb9f0..7fc3f07 100644
--- a/debian/cups-daemon.preinst
+++ b/debian/cups-daemon.preinst
@@ -11,6 +11,7 @@ install|upgrade)
     fi
 
     if [ ! -f /etc/cups/cupsd-systemd-listen.conf ]; then
+        mkdir -p /etc/cups
 	cat >/etc/cups/cupsd-systemd-listen.conf <<EOF
 [Socket]
 # This file was generated by CUPS and _WILL_ be deleted or overwritten by it!

Reply via email to