Manpages

名 前

dpkg−name − Debian パ ッ ケ ー ジ を 完 全 パ ッ ケ ー ジ 名 に リ ネ ー ム

書 式

dpkg−name [option...] [−−] file...

説 明

こ の マ ニ ュ ア ル ペ ー ジ で は 、 dpkg−name シ ェ ル ス ク リ プ ト に つ い て 説 明 す る 。 こ れ は 、 Debian パ ッ ケ ー ジ を 完 全 パ ッ ケ ー ジ 名 に 、 簡 単 に 変 更 す る 方 法 を 提 供 す る 。 完 全 パ ッ ケ ー ジ 名 と は 、 パ ッ ケ ー ジ の control フ ァ イ ル で 指 定 さ れ た package_version_architecture.package−type と い う 形 式 で あ る 。 フ ァ イ ル 名 の version 部 分 は 、 ア ッ プ ス ト リ ー ム の バ ー ジ ョ ン 情 報 に 続 き 、 オ プ シ ョ ン で ハ イ フ ン お よ び リ ビ ジ ョ ン 情 報 が 続 い た も の で あ る 。 package−type 部 分 は 、 Package−Type フ ィ ー ル ド が 設 定 さ れ て い れ ば そ の 内 容 が 用 い ら れ る 。 デ フ ォ ル ト は deb で あ る 。

オ プ シ ョ ン

−a, −−no−architecture リ ネ ー ム 後 の フ ァ イ ル 名 に ア ー キ テ ク チ ャ 情 報 を 含 め な い 。
−k
, −−symlink フ ァ イ ル 名 の リ ネ ー ム 処 理 と し て 、 フ ァ イ ル を 移 動 す る 代 わ り に シ ン ボ リ ッ ク リ ン ク を 作 成 す る 。
−o
, −−overwrite リ ネ ー ム 後 の フ ァ イ ル 名 と 同 名 の フ ァ イ ル が あ れ ば 、 上 書 き す る 。
−s
, −−subdir [dir]

Files will be moved into a subdirectory. If the directory given as argument exists the files will be moved into that directory otherwise the name of the target directory is extracted from the section field in the control part of the package. The target directory will be «unstable/binary−architecture/section». If the section is not found in the control, then no−section is assumed, and in this case, as well as for sections non−free and contrib the target directory is «section/binary−architecture». The section field is not required so a lot of packages will find their way to the no−section area. Use this option with care, it’s messy.

−c, −−create−dir

This option can used together with the −s option. If a target directory isn’t found it will be created automatically. Use this option with care.

−?, −−help 利 用 方 法 を 表 示 し て 終 了 す る 。
−v
, −−version バ ー ジ ョ ン 情 報 を 表 示 し て 終 了 す る 。

バ グ

Some packages don’t follow the name structure package_version_architecture.deb. Packages renamed by dpkg−name will follow this structure. Generally this will have no impact on how packages are installed by dselect(1)/dpkg(1), but other installation tools might depend on this naming structure.

dpkg−name bar−foo.deb

The file bar−foo.deb will be renamed to bar−foo_1.0−2_i386.deb or something similar (depending on whatever information is in the control part of bar−foo.deb).

find /root/debian/ −name ’*.deb’ | xargs −n 1 dpkg−name −a

All files with the extension deb in the directory /root/debian and its subdirectory’s will be renamed by dpkg−name if required into names with no architecture information.

find −name ’*.deb’ | xargs −n 1 dpkg−name −a −o −s −c や っ て は い け な い ! 多 く の パ ッ ケ ー ジ は セ ク シ ョ ン 情 報 を も っ て い な い の で 、 ア ー カ イ ブ が ぐ ち ゃ ぐ ち ゃ に な っ て し ま う だ ろ う 。 や っ て は い け な い !
dpkg−deb −−build debian−tmp && dpkg−name −o −s .. debian−tmp.deb
こ れ は 新 し い パ ッ ケ ー ジ を 作 る 時 に 使 う こ と が で き る 。

関 連 項 目

deb(5), deb−control(5), dpkg(1), dpkg−deb(1), find(1), xargs(1).

翻 訳 者

高 橋 基 信 <monyo [AT] monyo.com>. 喜 瀬 浩 <kise [AT] fuyuneko.jp>. 関 戸 幸 一 <sekido [AT] mbox.jp>. 鍋 谷 栄 展 <nabe [AT] debian.jp>. 倉 澤 望 <nabetaro [AT] debian.jp>. 石 川 睦 <ishikawa [AT] linux.jp>. 鵜 飼 文 敏 <ukai [AT] debian.jp>. 中 野 武 雄 <nakano [AT] apm.jp>.

翻 訳 校 正

Debian JP Documentation ML <debian-doc [AT] debian.jp>.