Commit 9b4ce7bce5f30712fd926ab4599a803314a07719

Authored by Nicolas de Pesloüan
Committed by Michal Marek
1 parent 1b9a50d931

deb-pkg: Fix building outside of source tree (O=...).

When building linux-headers package using deb-pkg, builddeb erroneously assume
current directory is the source tree. This is not true if building in another
directory, using make O=... deb-pkg.

This patch fix this problem.

Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Tested-by: Nikolai Kondrashov <spbnick@gmail.com>
Acked-by: maximilian attems <max@stro.at>
Signed-off-by: Michal Marek <mmarek@suse.cz>

Showing 1 changed file with 3 additions and 3 deletions Side-by-side Diff

scripts/package/builddeb
... ... @@ -238,12 +238,12 @@
238 238 fi
239 239  
240 240 # Build header package
241   -find . -name Makefile -o -name Kconfig\* -o -name \*.pl > /tmp/files$$
242   -find arch/$SRCARCH/include include scripts -type f >> /tmp/files$$
  241 +(cd $srctree; find . -name Makefile -o -name Kconfig\* -o -name \*.pl > /tmp/files$$)
  242 +(cd $srctree; find arch/$SRCARCH/include include scripts -type f >> /tmp/files$$)
243 243 (cd $objtree; find .config Module.symvers include scripts -type f >> /tmp/objfiles$$)
244 244 destdir=$kernel_headers_dir/usr/src/linux-headers-$version
245 245 mkdir -p "$destdir"
246   -tar -c -f - -T /tmp/files$$ | (cd $destdir; tar -xf -)
  246 +(cd $srctree; tar -c -f - -T /tmp/files$$) | (cd $destdir; tar -xf -)
247 247 (cd $objtree; tar -c -f - -T /tmp/objfiles$$) | (cd $destdir; tar -xf -)
248 248 rm -f /tmp/files$$ /tmp/objfiles$$
249 249 arch=$(dpkg --print-architecture)