Package: dgit
Version: 1.4
Severity: normal

The smash strategy should not fail when the current contents of
debian/patches/ does not apply cleanly to the upstream source.
Intuitively, one meaning of the smash strategy is "I know that no sane
linearisation can be automatically generated from the git history, so
just give me a diff."

For example, today I merged a new upstream version to a package with a
single patch in debian/patches/.  The patch no longer cleanly applies,
but I know that the only modifications I've made to the upstream source
should go into that single patch.  So I should be able to just use the
smash strategy, and then rename the resulting patch that dgit leaves in
debian/patches/.

However, the smash strategy fails:

    hephaestus ~/src/stylish-haskell % dgit --quilt=smash build
    Format `3.0 (quilt)', checking/updating patch stack
    starting quiltify (multiple patches, smash mode)
    dpkg-source: error: LC_ALL=C patch -t -F 0 -N -p1 -u -V never -E -b -B 
.pc/0001-Debianize-README.patch/ --reject-file=- < 
stylish-haskell-0.6.1.0/debian/patches/0001-Debianize-README.patch gave error 
exit status 1
    dgit: failed command: sh -ec 'exec dpkg-source --no-check -x fake.dsc 
>/dev/null'
    dgit: subprocess failed with error exit status 2

The reason is that `dpkg-source --no-check -x fake.dsc' fails because
the patches don't apply cleanly.  Perhaps dgit should detect this
failure, and respond by generating the upstream diff itself by looking
at the orig.tar and comparing it with HEAD, put that in debian/patches/
and be done with it.  If this sounds sensible, I could prepare a patch.

Thanks!

-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (900, 'testing')
Architecture: i386 (i686)

Kernel: Linux 4.5.0-2-686-pae (SMP w/2 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages dgit depends on:
ii  ca-certificates                   20160104
ii  coreutils                         8.25-2
ii  curl                              7.47.0-1
ii  devscripts                        2.16.6
ii  dpkg-dev                          1.18.9
ii  dput                              0.9.6.4
ii  git [git-core]                    1:2.8.1-1
ii  libdpkg-perl                      1.18.9
ii  libjson-perl                      2.90-1
ii  libperl5.22 [libdigest-sha-perl]  5.22.2-3
ii  libwww-perl                       6.15-1
ii  perl                              5.22.2-3

Versions of packages dgit recommends:
ii  openssh-client [ssh-client]  1:7.2p2-7

Versions of packages dgit suggests:
ii  sbuild  0.69.0-2

-- no debconf information

-- 
Sean Whitton

Attachment: signature.asc
Description: PGP signature

Reply via email to