portsdowngrade

ports を downgrade する ports があることを知ったので早速やってみました。
http://www.mydigitallife.info/2005/11/22/portdowngrade-downgrade-to-previous-version-of-freebsds-ports/

インストール

# cd /usr/ports/sysutils/portdowngrade
# make DEFAULT_CVS_SERVER=":pserver:anoncvs@anoncvs.jp.FreeBSD.org:/home/ncvs"
# make install clean

じゃあ uim を downgrade してみる

# rehash
# portdowngrade uim
portdowngrade 0.6 by Heiner Eichmann
Please note, that nothing is changed in the ports tree
unless it is explicitly permitted in step 6!

Seeking port uim ...

Found several matches:
1: japanese/scim-uim
2: textproc/uim
3: textproc/uim-el
4: textproc/uim-el-xemacs21-mule
5: x11-toolkits/libbonobouimm
6: x11-toolkits/libgnomeprintuimm
7: x11-toolkits/libgnomeuimm
8: x11-toolkits/libgnomeuimm26

Please choose one:

2[Enter] を入力

Downgrading port: textproc/uim

Step 1: Checking out port from CVS repository
CVS root directory: :pserver:anoncvs@anoncvs.jp.FreeBSD.org:/home/ncvs
cvs checkout: warning: failed to open /root/.cvspass for reading: No such file or directory
cvs checkout: authorization failed: server anoncvs.jp.FreeBSD.org rejected access to /home/ncvs for user anoncvs
cvs checkout: used empty password; try "cvs login" with a real password
portdowngrade error: Can not check out port textproc/uim

An error had occured. If this was an cvs error, try another cvs server.
If this was an cvs login error, try the -o option.

See http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/anoncvs.html for details.

cvs login しなさいと怒られた。

# portdowngrade --login uim
portdowngrade 0.6 by Heiner Eichmann
Please note, that nothing is changed in the ports tree
unless it is explicitly permitted in step 6!

Seeking port uim ...

Found several matches:
1: japanese/scim-uim
2: textproc/uim
3: textproc/uim-el
4: textproc/uim-el-xemacs21-mule
5: x11-toolkits/libbonobouimm
6: x11-toolkits/libgnomeprintuimm
7: x11-toolkits/libgnomeuimm
8: x11-toolkits/libgnomeuimm26

Please choose one: 2

Downgrading port: textproc/uim
Logging in to :pserver:anoncvs@anoncvs.jp.freebsd.org:2401/home/ncvs
CVS password:

ここでパスワードを入力
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/anoncvs.html
http://www.jp.freebsd.org/www.FreeBSD.org/doc/ja_JP.eucJP/books/handbook/anoncvs.html
に書いてある。

cvs login: warning: skipping invalid entry in password file at line 1

Step 1: Checking out port from CVS repository
CVS root directory: :pserver:anoncvs@anoncvs.jp.FreeBSD.org:/home/ncvs

Step 2: Reading the port history from the CVS repository

Step 3: Analyzing the port history from the CVS repository

Step 4: Load port version numbers and present results
Keys: <space> : next page                      d : details
            p : previous page
      <enter> : leave presentation and downdgrade if wanted
===============================================================================
number         date         portversion  comment
    1  2006/01/22 02:55:05  1.0.1        Replace ugly "@unexec rmdir %D... 2>/d
    2  2005/12/25 05:47:34  1.0.1        - Update to 1.0.1.
    3  2005/12/02 18:46:55  0.4.9.1_2    Add byeoru Korean input module.
    4  2005/11/30 16:32:14  0.4.9.1_1    Move japanese/uim port to textproc cat
    5  2005/11/15 06:49:50  0.4.9.1_1    Mass-conversion to the USE_AUTOTOOLS N
    6  2005/11/06 17:41:07  0.4.9.1_1    Sync with libscim shared library versi
    7  2005/11/05 05:21:59  0.4.9.1_1    Bump PORTREVISION to chase the glib20
    8  2005/10/28 23:05:06  0.4.9.1      BROKEN on ia64: Segfault during build
    9  2005/10/01 16:47:34  0.4.9.1      - Update to 0.9.1. This version fixes
   10  2005/09/20 16:47:44  0.4.9        Update 0.4.9.
   11  2005/07/15 22:01:14  0.4.7.1      Update to 0.4.7.1.
   12  2005/06/26 19:42:42  0.4.7        Update to 0.4.7.
   13  2005/06/05 16:22:50  0.4.6_3      Correct the default path to the SKK di
   14  2005/06/05 16:05:11  0.4.6_3      Fix incorrect usage of  bind_textdomai
   15  2005/03/13 14:20:51  0.4.6_2      - Sync with libscim shared library ver
   16  2005/03/12 10:54:08  0.4.6_1      Bump PORTREVISION to chase the glib20
   17  2005/03/02 10:42:07  0.4.6        Remove patch-xim:xim.h to fix patch er
   18  2005/03/01 19:39:18  0.4.6        Don't make ${X11BASE}/lib/gtk-2.0/2.4.
   19  2005/03/01 19:34:02  0.4.6        - Update to 0.4.6.
   20  2005/02/28 01:02:19  0.4.5        BROKEN: Incomplete pkg-plist
   21  2004/11/27 12:12:17  0.4.5        Update MASTER_SITES.
   22  2004/10/31 14:27:51  0.4.5        Update to 0.4.5.
Total lines: 50. Command:
Enter version number to change port to (0: exit):

3[Enter] を入力

Step 5: Checking out choosen date of the port from the CVS repository

Step 6: Modifying the port
Port: textproc/uim
at : 2005/12/02 18:46:55
Type 'yes' to bring the port to the state of the date above
or 'no' to exit without changing anything. Note, that this only changes
the port, not the installed software! yes or no:

yes[Enter] を入力

The port has been set to the selected version. Install it if you wish.
If you have portupgrade installed, you should run

portsdb -Uu

now, to see the changes in the ports database. In any case

portupgrade -f uim

will install the changed port. Note: if you run cvsup, the port
is changed back to the choosen label!

言われる通りに portsdb, portupgrade を実行しよう

# portsdb -Uu (結構時間がかかります)
Updating the ports index ... Generating INDEX.tmp - please wait..Warning: Duplicate INDEX entry: apr-gdbm-db4-1.2.2_1
Warning: Duplicate INDEX entry: freeciv-gtk2-2.0.6
Warning: Duplicate INDEX entry: openssl-stable-0.9.7i
Warning: Duplicate INDEX entry: mod_frontpage2-5.0.2.2635
Warning: Duplicate INDEX entry: mod_jk2-apache2-2.0.4
Warning: Duplicate INDEX entry: mod_rpaf-ap2-0.5
 Done.
done
[Updating the portsdb <format:bdb1_btree> in /usr/ports ... - 14044 port entries found .........1000.........2000.........3000.........4000.........5000.........6000.........7000.........8000.........9000.........10000.........11000.........12000.........13000.........14000 ..... done]
# portupgrade -f uim
<snip compiling>
# pkg_info|grep uim
uim-0.4.9.1_2       Input method library

downgrade 成功。めでたしめでたし