endless pulse

どっくんどっくんふるえる毎日を過ごしています

Macportsアップデート2011/9/7編

どうもお久しぶりです。夏休みのメモで今後の自分のためになりそうなものをとりあえずあげておきます。
Macportsってどうしてこんなにいっつもアップグレードが素直にいかないの〜

p5.12-locale-gettextがupgradeできない

いつものMacportsのselfupdate→outdatedのupgradeという流れの話。

$ sudo port selfupdate
$ sudo port upgrade outdated

upgrade outdatedの途中で必ず、以下が出る。。

Warning: No port p5.12-locale-gettext found in the index.
--->  Computing dependencies for help2man
Error: Dependency 'p5.12-locale-gettext' not found.
Error: Unable to upgrade port: 1
To report a bug, see <http://guide.macports.org/#project.tickets>

p5.12-locale-gettextはp5-locale-gettextと関連が?
試しにp5.12-locale-gettextをクリーン。

$ sudo port clean p5.12-locale-gettext
Error: Port p5.12-locale-gettext not found
To report a bug, see <http://guide.macports.org/#project.tickets>

え、ないの。
じゃあp5-locale-gettextは??

$ sudo port clean p5-locale-gettext
--->  Cleaning p5-locale-gettext
$

おおあった。そしてちゃんとcleanされてる。

うーん、、何がどうインストールされているか全然わからーん、、ということで関連したものを調べてみる。

$ sudo port installed | grep p5-locale-gettext
  p5-locale-gettext @1.05_2
  p5-locale-gettext @1.05_3
  p5-locale-gettext @1.05_5 (active)
$ sudo port installed | grep p5.12
$

やっぱり、p5-locale〜系はいくつかあった。というか前のバージョンか。

(少しメモが飛んでいて不確かだけど、
p5-locale〜をuninstallしようとしたら、たぶん依存関係でhelp2manがいるからダメだよ、って出たのだと思う。)
で、help2manをuninstallしようとしたらこんな反応が。

$ sudo port uninstall help2man
--->  The following versions of help2man are currently installed:
--->      help2man @1.37.1_1
--->      help2man @1.38.2_0
--->      help2man @1.38.4_0
--->      help2man @1.39.3_0 (active)
Error: port uninstall failed: Registry error: Please specify the full version as recorded in the port registry.
$

ん、バージョンまで指定すれば消せるってことかー。

$ sudo port uninstall help2man @1.37.1_1
--->  Uninstalling help2man @1.37.1_1
$

このままどんどん消すぞー!

だけど、help2manを全部消そうとしたら怒られた。

$ sudo port uninstall help2man @1.39.3_0
--->  Unable to uninstall help2man @1.39.3_0, the following ports depend on it:
--->  	autoconf @2.65_1
--->  	autoconf @2.68_0
--->  	autoconf @2.68_1
--->  	autoconf @2.68_2
--->  	autoconf263 @2.63_0
Error: port uninstall failed: Please uninstall the ports that depend on help2man first.
$ 

おやおや、またか。

autoconfを全部消したら、autoconfもhelp2manもp5-locale-gettextも消えた。
でもまた

$ sudo port upgrade outdated

やっても全く同じエラーが出る。help2manはもうないのに…。

$ port outdated | grep help

の結果は空っぽ。

$ sudo port selfupdate

をもう一度やることにする。
それが無事終わったので、

$ sudo port upgrade outdated

を再度。

問題のp5.12-locale-gettextを超えて、無事修了!!
そのあと消したp5-locale-gettext、help2man、autoconfをインストールし直したらなんのエラーも起きなかった。
いろいろ理解できてないけど、通って安心。。。