3

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 decopy

Reading package lists... Done
NOTICE: 'decopy' packaging is maintained in the 'Git' version control system at:
https://anonscm.debian.org/git/collab-maint/decopy.git
Please use:
git clone https://anonscm.debian.org/git/collab-maint/decopy.git
to 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 decopy
0.2-1 (dsc) [1,943 B]
Get:2 http://debian-mirror.sakura.ne.jp/debian unstable/main decopy
0.2-1 (tar) [43.2 kB]
Get:3 http://debian-mirror.sakura.ne.jp/debian unstable/main decopy
0.2-1 (diff) [1,760 B]
Fetched 46.9 kB in 42s (1,103 B/s)
dpkg-source: info: extracting decopy in decopy-0.2
dpkg-source: info: unpacking decopy_0.2.orig.tar.gz
dpkg-source: info: unpacking decopy_0.2-1.debian.tar.xz

Then listing -

~/games/decopy $  ls                                                             

decopy-0.2  decopy_0.2-1.debian.tar.xz  decopy_0.2-1.dsc  decopy_0.2.orig.tar.gz

Obviously 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/ $ ─[$] ls

decopy-0.2  decopy_0.2-1.debian.tar.xz  decopy_0.2-1.dsc
decopy_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.py
Hunk #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 ?

4

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.patch

then create the appropriate structure:

mkdir -p debian/patches
cp ../use_tqdm_progress.patch debian/patches
echo use_tqdm_progress.patch >> debian/patches/series

You should refresh the patch:

quilt push
quilt refresh

Your dch is fine, as is the fact that the directory name didn't change. You can build the package now:

dpkg-buildpackage -us -uc

As 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.

  • umm... shouldn't we somehow bump the version number, something like `decopy_0.2-1+1nmu' or something for us to know it's not from Debian universe, but self-manufactured debian package. – shirish Feb 10 '17 at 19:28
  • @Wumpus thanks for the edit! In this particular instance there was no file to clobber, but you're right in general. – Stephen Kitt Feb 10 '17 at 19:31
  • @shirish that's what dch -n does; for a non-native package it only needs to add an entry to debian/changelog, it doesn't rename the directory. (Even in the native case it doesn't really need to, it just does it to match what dpkg-source -x would produce.) – Stephen Kitt Feb 10 '17 at 19:33
  • aha...ok, so now I know a bit more :) – shirish Feb 10 '17 at 19:36
  • It was a quilt package with no patches? Is that just because you have to specify some kind of patch format, even when you don't have any, to satisfy the package builder? – user41515 Feb 10 '17 at 20:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.