title: dpkg giving error "Is a directory"
body: <p>I am trying to create a Debain .deb package. Package is being created successfully but I am getting following error when I try to install it:</p>
  
  <pre><code> unable to open file '/var/lib/dpkg/tmp.ci//opt': Is a directory
  </code></pre>
  
  <p>The package directory structure is :</p>
  
  <pre><code>.
  └── DEBIAN
      ├── control
      ├── opt
      │   └── myDir
      │       └── myfile
      ├── postinst
      └── preinst
  </code></pre>
  
  <p>In preinst I've - <code>mkdir -p /opt/myDir</code> postinst is empty</p>
  
  <p>If I try to install package on a different host, I get below error:</p>
  
  <blockquote>
    <p>package control info rmdir of `opt' didn't say not a dir: Directory
    not empty</p>
  </blockquote>
  
  <p>Any ideas?</p>