Debianパッケージを構築しながら.svnを削除してください
-
13-11-2019 - |
質問
Debianパッケージを構築している間、Debian / MyPackageName.installファイルを使用して、ファイルとフォルダのコピー先のDebhelperパッケージ化ツールに伝えます。
問題は、フォルダにパッケージツリーにコピーされ、ついにターゲットマシンに移動する.svnフォルダが含まれていることです。パッケージビルド中に.svnフォルダを除外する標準的な方法はありますか?
解決
ビルドシステムの検索方法はわかりませんが、.svn(cvs、.gitなど)を除外するために、-X
:のdh_install
オプションを使用できます。
$ dh_install -X .svn
.
またはdebian/rules
ファイルのdh_always_exclude変数のエクスポート:
$ cat debian/rules
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1
export DH_ALWAYS_EXCLUDE=CVS:.svn
%:
dh $@
. 他のヒント
@jb_nizet正しい書いているのは、svn export
を使用してすべての.svnフォルダなしでディレクトリを取得できます。エクスポートを使用できない場合は、find -name .svn -and -type d -exec rm -rf {} +
を使用して、ディレクトリのすべての.svnフォルダを再帰的に削除できます。
所属していません StackOverflow