I had asked about applying patches here . I tried today using the same procedure on a different source-package and it failed. Sharing -~/games $ mkdir decopy~/games/decopy $ apt-get source decopyReading package lists... DoneNOTICE: 'decopy' packaging is maintained in the 'Git' version control system at:https://anonscm.debian.org/git/collab-maint/decopy.gitPlease use:git clone https://anonscm.debian.org/git/collab-maint/decopy.gitto retrieve the latest (possibly unreleased) updates to the package.Need to get 46.9 kB of source archives.Get:1 http://debian-mirror.sakura.ne.jp/debian unstable/main decopy0.2-1 (dsc) [1,943 B]Get:2 http://debian-mirror.sakura.ne.jp/debian unstable/main decopy0.2-1 (tar) [43.2 kB]Get:3 http://debian-mirror.sakura.ne.jp/debian unstable/main decopy0.2-1 (diff) [1,760 B]Fetched 46.9 kB in 42s (1,103 B/s)dpkg-source: info: extracting decopy in decopy-0.2dpkg-source: info: unpacking decopy_0.2.orig.tar.gzdpkg-source: info: unpacking decopy_0.2-1.debian.tar.xzThen listing -~/games/decopy $  ls                                                             decopy-0.2  decopy_0.2-1.debian.tar.xz  decopy_0.2-1.dsc  decopy_0.2.orig.tar.gzObviously decopy-0.2 is where things are. /games/decopy/decopy$ wget https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=854052;filename=use_tqdm_progress.patch;msg=10~/games/decopy/ $ [$] lsdecopy-0.2  decopy_0.2-1.debian.tar.xz  decopy_0.2-1.dscdecopy_0.2.orig.tar.gz use_tqdm_progress.patch~/games/decopy $ cd decopy-0.2~/games/decopy/decopy-0.2 $ patch -p1 < ../use_tqdm_progress.patch (Stripping trailing CRs from patch; use --binary to disable.)patching file decopy/cmdoptions.py(Stripping trailing CRs from patch; use --binary to disable.)patching file decopy/tree.pyHunk #2 succeeded at 190 (offset -6 lines).Hunk #3 succeeded at 201 (offset -6 lines).Hunk #4 succeeded at 303 (offset -6 lines).Hunk #5 succeeded at 364 (offset -6 lines).Patched it, and now using dch to have another go -     ~/games/decopy/decopy-0.2 $ dch -n Apply patch given in #854052.  ~/games/decopy/decopy-0.2 $Now the directory didn't change, apparently because this package is not a native package like dpkg is/was . What are the recommended steps here ?Also is there a way to know which package is a debian native package and which are not ? Any tests or something ?
Applying patches in debian packages - Part 2
debian;package management;compiling;patch
This is a 3.0 (quilt) package (see debian/source/format), so you'll need to use quilt to manage the patch. Revert the patch:patch -R -p1 < ../use_tqdm_progress.patchthen create the appropriate structure:mkdir -p debian/patchescp ../use_tqdm_progress.patch debian/patchesecho use_tqdm_progress.patch >> debian/patches/seriesYou should refresh the patch:quilt pushquilt refreshYour dch is fine, as is the fact that the directory name didn't change. You can build the package now:dpkg-buildpackage -us -ucAs far as native packages go, you can spot a native package by the fact that it doesn't have a hyphen in its version (generally speaking). Here, the version is 0.2-1, so it's not a native package. Inside the package, debian/source/format would be 3.0 (native) for a native package.