apt-clone icon indicating copy to clipboard operation
apt-clone copied to clipboard

Silently fails when dpkg-repack fails

Open BenWiederhake opened this issue 6 years ago • 0 comments

(downstream bug: #909443)

What led up to the situation?

I invoked apt-clone --with-dpkg-repack my-repacked.apt-clone.tar.gz.

I have teamviewer installed, so one of the many packages is teamviewer. Apparently, I deleted /etc/apt/sources.list.d/teamviewer.list at some point in time. This may have confused dpkg-repack.

What was the outcome of this action?

The teamviewer package did not get repacked, and was missing from the generated tarball. No exit code indicated that there was an error. (So automation would run into trouble).

There was only one warning from apt-clone, buried among many other similar lines:

dpkg-deb: error: conffile '/etc/apt/sources.list.d/teamviewer.list' does not appear in package
dpkg -repack: Error running: dpkg-deb --build dpkg-repack.teamviewer.tTztGb.
dpkg -repack: Problems were encountered in processing.
dpkg -repack: The package may be broken.

If this had been an important package (i.e., the printer drivers that brought me here), and if I hadn't caught this, then I would have been in trouble.

What outcome did I expect instead?

I expected one of the following:

  • Ideal: Set a non-zero exit code, include the "maybe broken" package anyway.
  • Acceptable: Set a non-zero exit code.
  • Acceptable: Set a non-zero exit code, refuse to generate apt-clone tarball.

Cheers, Ben

BenWiederhake avatar Sep 23 '18 18:09 BenWiederhake