dpkg-source regression when a patch removes all files from a directory

Bug #1057886 reported by Tyler Hicks
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dpkg (Ubuntu)
Fix Released
Medium
Barry Warsaw
Quantal
Fix Released
Medium
Barry Warsaw

Bug Description

I was recently working on a package update and created a patch which deleted all files in a directory. When I tried to build the package, I hit an unexpected dpkg-source error:

dpkg-source: info: using source format `3.0 (quilt)'
dpkg-source: info: building ruby1.9.1 using existing ./ruby1.9.1_1.9.3.194.orig.tar.gz
dpkg-source: info: building ruby1.9.1 in ruby1.9.1_1.9.3.194-1ubuntu1.debian.tar.gz
dpkg-source: info: building ruby1.9.1 in ruby1.9.1_1.9.3.194-1ubuntu1.dsc
 dpkg-genchanges -S >../ruby1.9.1_1.9.3.194-1ubuntu1_source.changes
dpkg-genchanges: not including original source code in upload
 dpkg-source --after-build ruby1.9.1-1.9.3.194
dpkg-source: error: failed to copy ruby1.9.1-1.9.3.194/.pc/20120927-rubygems_disable_upstream_certs.patch/lib/rubygems/ssl_certs/AddTrustExternalCARoot.pem to ruby1.9.1-1.9.3.194/lib/rubygems/ssl_certs/AddTrustExternalCARoot.pem: No such file or directory
dpkg-source: info: unapplying 20120927-rubygems_disable_upstream_certs.patch
dpkg-buildpackage: error: dpkg-source --after-build ruby1.9.1-1.9.3.194 gave error exit status 2
debuild: fatal error at line 1357:
dpkg-buildpackage -rfakeroot -d -us -uc -S failed

After doing some research, I found that it is a known bug and has a fix applied in upstream dpkg. The Debian bug report also has a reproducer.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=683547

Related branches

Revision history for this message
Tyler Hicks (tyhicks) wrote :

Passes test case found in the Debian bug. Also passes the simple tests in test-dpkg.py from the qa-regression-testing project.

To be clear, I do not need this fix to proceed with the update mentioned in this bug description. I've found a different/better way to do what I needed to do but since I did hit this bug, I figured it would be good to get the fix in to Ubuntu's dpkg before someone else hits it.

Thanks!

Changed in dpkg (Ubuntu):
assignee: Tyler Hicks (tyhicks) → nobody
status: In Progress → Confirmed
Micah Gersten (micahg)
tags: added: quantal regression-release
Barry Warsaw (barry)
Changed in dpkg (Ubuntu Quantal):
status: Confirmed → In Progress
assignee: nobody → Barry Warsaw (barry)
milestone: none → ubuntu-12.10
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dpkg - 1.16.7ubuntu6

---------------
dpkg (1.16.7ubuntu6) quantal; urgency=low

  [ Raphaël Hertzog ]
  * Fix dpkg-source regression in "3.0 (quilt)" source packages while
    unapplying patches that remove all files in a directory. Closes:
    #683547 (LP: #1057886)
 -- Barry Warsaw <email address hidden> Mon, 01 Oct 2012 14:39:06 -0400

Changed in dpkg (Ubuntu Quantal):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.