From 230a5071f6e458ce51c1e8cb86e06788fdd647ff Mon Sep 17 00:00:00 2001 From: Akinori MUSHA Date: Sat, 17 Mar 2001 23:06:40 +0000 Subject: Add portupgrade, a tool to upgrade installed packages with ports. It upgrades ports without reinstalling dependent packages by directly modifying the package info recorded in the files under /var/db/pkg. e.g. portupgrade gtk portupgrade -cC gnome\* It currently has many design flaws (to me at least) but I am releasing this because it's functionally stable enough to use. (I believe.. ;) Use with care, at your own risk. --- ports-mgmt/portupgrade-devel/Makefile | 32 ++++++++++++++++++++++++++++++++ ports-mgmt/portupgrade-devel/distinfo | 1 + ports-mgmt/portupgrade-devel/pkg-comment | 1 + ports-mgmt/portupgrade-devel/pkg-descr | 23 +++++++++++++++++++++++ ports-mgmt/portupgrade-devel/pkg-plist | 12 ++++++++++++ ports-mgmt/portupgrade/Makefile | 32 ++++++++++++++++++++++++++++++++ ports-mgmt/portupgrade/distinfo | 1 + ports-mgmt/portupgrade/pkg-comment | 1 + ports-mgmt/portupgrade/pkg-descr | 23 +++++++++++++++++++++++ ports-mgmt/portupgrade/pkg-plist | 12 ++++++++++++ sysutils/Makefile | 1 + sysutils/portupgrade-devel/Makefile | 32 ++++++++++++++++++++++++++++++++ sysutils/portupgrade-devel/distinfo | 1 + sysutils/portupgrade-devel/pkg-comment | 1 + sysutils/portupgrade-devel/pkg-descr | 23 +++++++++++++++++++++++ sysutils/portupgrade-devel/pkg-plist | 12 ++++++++++++ sysutils/portupgrade/Makefile | 32 ++++++++++++++++++++++++++++++++ sysutils/portupgrade/distinfo | 1 + sysutils/portupgrade/pkg-comment | 1 + sysutils/portupgrade/pkg-descr | 23 +++++++++++++++++++++++ sysutils/portupgrade/pkg-plist | 12 ++++++++++++ 21 files changed, 277 insertions(+) create mode 100644 ports-mgmt/portupgrade-devel/Makefile create mode 100644 ports-mgmt/portupgrade-devel/distinfo create mode 100644 ports-mgmt/portupgrade-devel/pkg-comment create mode 100644 ports-mgmt/portupgrade-devel/pkg-descr create mode 100644 ports-mgmt/portupgrade-devel/pkg-plist create mode 100644 ports-mgmt/portupgrade/Makefile create mode 100644 ports-mgmt/portupgrade/distinfo create mode 100644 ports-mgmt/portupgrade/pkg-comment create mode 100644 ports-mgmt/portupgrade/pkg-descr create mode 100644 ports-mgmt/portupgrade/pkg-plist create mode 100644 sysutils/portupgrade-devel/Makefile create mode 100644 sysutils/portupgrade-devel/distinfo create mode 100644 sysutils/portupgrade-devel/pkg-comment create mode 100644 sysutils/portupgrade-devel/pkg-descr create mode 100644 sysutils/portupgrade-devel/pkg-plist create mode 100644 sysutils/portupgrade/Makefile create mode 100644 sysutils/portupgrade/distinfo create mode 100644 sysutils/portupgrade/pkg-comment create mode 100644 sysutils/portupgrade/pkg-descr create mode 100644 sysutils/portupgrade/pkg-plist diff --git a/ports-mgmt/portupgrade-devel/Makefile b/ports-mgmt/portupgrade-devel/Makefile new file mode 100644 index 000000000000..4ffbae362aff --- /dev/null +++ b/ports-mgmt/portupgrade-devel/Makefile @@ -0,0 +1,32 @@ +# New ports collection makefile for: portupgrade +# Date created: 18 March 2001 +# Whom: Akinori MUSHA aka knu +# +# $FreeBSD$ +# + +PORTNAME= portupgrade +PORTVERSION= 1.14 +CATEGORIES= sysutils +MASTER_SITES= ${MASTER_SITE_LOCAL} +MASTER_SITE_SUBDIR= knu +DISTNAME= pkgtools-20010318 + +MAINTAINER= knu@FreeBSD.org + +RUN_DEPENDS= ${RUBY_SITELIBDIR}/optparse.rb:${PORTSDIR}/devel/ruby-optparse + +USE_RUBY= yes + +NO_BUILD= yes + +do-install: + cd ${WRKSRC} && ${RUBY} install.rb + ${MKDIR} ${PREFIX}/share/zsh/site-functions + ${INSTALL_DATA} ${WRKSRC}/misc/zsh/* ${PREFIX}/share/zsh/site-functions/ +.if !defined(NOPORTDOCS) + ${MKDIR} ${PREFIX}/share/doc/${PORTNAME} + ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/${PORTNAME}/ +.endif + +.include diff --git a/ports-mgmt/portupgrade-devel/distinfo b/ports-mgmt/portupgrade-devel/distinfo new file mode 100644 index 000000000000..0387e80f0d82 --- /dev/null +++ b/ports-mgmt/portupgrade-devel/distinfo @@ -0,0 +1 @@ +MD5 (pkgtools-20010318.tar.gz) = 521197d6b16ef8f55482c1d819979d41 diff --git a/ports-mgmt/portupgrade-devel/pkg-comment b/ports-mgmt/portupgrade-devel/pkg-comment new file mode 100644 index 000000000000..9b81313fd42f --- /dev/null +++ b/ports-mgmt/portupgrade-devel/pkg-comment @@ -0,0 +1 @@ +A tool to upgrade installed packages with ports diff --git a/ports-mgmt/portupgrade-devel/pkg-descr b/ports-mgmt/portupgrade-devel/pkg-descr new file mode 100644 index 000000000000..10d2151606f8 --- /dev/null +++ b/ports-mgmt/portupgrade-devel/pkg-descr @@ -0,0 +1,23 @@ +Portupgrade is a tool to upgrade installed packages with ports. + +It upgrades ports without reinstalling dependent packages by directly +modifying the package info recorded in the files under /var/db/pkg. + +The procedures it takes is shown as follows: + + 1. Build the corresponding port of the given package + + 2. Fix the dependency info of the ones which depends on the given + package + + 3. Save the +REQUIRED_BY list of the given package + + 4. Uninstall the given package forcibly if -u is specified + + 5. Install the port + + 6. Restore the +REQUIRED_BY list + +The usage can be shown by running it without arguments or with a -h. + +Author: Akinori MUSHA diff --git a/ports-mgmt/portupgrade-devel/pkg-plist b/ports-mgmt/portupgrade-devel/pkg-plist new file mode 100644 index 000000000000..8423e512f464 --- /dev/null +++ b/ports-mgmt/portupgrade-devel/pkg-plist @@ -0,0 +1,12 @@ +sbin/portupgrade +%%RUBY_SITELIBDIR%%/pkg.rb +%%RUBY_SITELIBDIR%%/pkgdb.rb +%%RUBY_SITELIBDIR%%/pkginfo.rb +%%RUBY_SITELIBDIR%%/pkgversion.rb +%%RUBY_SITELIBDIR%%/portinfo.rb +%%RUBY_SITELIBDIR%%/ports.rb +%%RUBY_SITELIBDIR%%/portsdb.rb +share/zsh/site-functions/_portupgrade +@unexec if [ ! -x %D/bin/zsh ]; then rmdir -p %D/share/zsh/site-functions; fi +%%PORTDOCS%%share/doc/portupgrade/README +%%PORTDOCS%%@dirrm share/doc/portupgrade diff --git a/ports-mgmt/portupgrade/Makefile b/ports-mgmt/portupgrade/Makefile new file mode 100644 index 000000000000..4ffbae362aff --- /dev/null +++ b/ports-mgmt/portupgrade/Makefile @@ -0,0 +1,32 @@ +# New ports collection makefile for: portupgrade +# Date created: 18 March 2001 +# Whom: Akinori MUSHA aka knu +# +# $FreeBSD$ +# + +PORTNAME= portupgrade +PORTVERSION= 1.14 +CATEGORIES= sysutils +MASTER_SITES= ${MASTER_SITE_LOCAL} +MASTER_SITE_SUBDIR= knu +DISTNAME= pkgtools-20010318 + +MAINTAINER= knu@FreeBSD.org + +RUN_DEPENDS= ${RUBY_SITELIBDIR}/optparse.rb:${PORTSDIR}/devel/ruby-optparse + +USE_RUBY= yes + +NO_BUILD= yes + +do-install: + cd ${WRKSRC} && ${RUBY} install.rb + ${MKDIR} ${PREFIX}/share/zsh/site-functions + ${INSTALL_DATA} ${WRKSRC}/misc/zsh/* ${PREFIX}/share/zsh/site-functions/ +.if !defined(NOPORTDOCS) + ${MKDIR} ${PREFIX}/share/doc/${PORTNAME} + ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/${PORTNAME}/ +.endif + +.include diff --git a/ports-mgmt/portupgrade/distinfo b/ports-mgmt/portupgrade/distinfo new file mode 100644 index 000000000000..0387e80f0d82 --- /dev/null +++ b/ports-mgmt/portupgrade/distinfo @@ -0,0 +1 @@ +MD5 (pkgtools-20010318.tar.gz) = 521197d6b16ef8f55482c1d819979d41 diff --git a/ports-mgmt/portupgrade/pkg-comment b/ports-mgmt/portupgrade/pkg-comment new file mode 100644 index 000000000000..9b81313fd42f --- /dev/null +++ b/ports-mgmt/portupgrade/pkg-comment @@ -0,0 +1 @@ +A tool to upgrade installed packages with ports diff --git a/ports-mgmt/portupgrade/pkg-descr b/ports-mgmt/portupgrade/pkg-descr new file mode 100644 index 000000000000..10d2151606f8 --- /dev/null +++ b/ports-mgmt/portupgrade/pkg-descr @@ -0,0 +1,23 @@ +Portupgrade is a tool to upgrade installed packages with ports. + +It upgrades ports without reinstalling dependent packages by directly +modifying the package info recorded in the files under /var/db/pkg. + +The procedures it takes is shown as follows: + + 1. Build the corresponding port of the given package + + 2. Fix the dependency info of the ones which depends on the given + package + + 3. Save the +REQUIRED_BY list of the given package + + 4. Uninstall the given package forcibly if -u is specified + + 5. Install the port + + 6. Restore the +REQUIRED_BY list + +The usage can be shown by running it without arguments or with a -h. + +Author: Akinori MUSHA diff --git a/ports-mgmt/portupgrade/pkg-plist b/ports-mgmt/portupgrade/pkg-plist new file mode 100644 index 000000000000..8423e512f464 --- /dev/null +++ b/ports-mgmt/portupgrade/pkg-plist @@ -0,0 +1,12 @@ +sbin/portupgrade +%%RUBY_SITELIBDIR%%/pkg.rb +%%RUBY_SITELIBDIR%%/pkgdb.rb +%%RUBY_SITELIBDIR%%/pkginfo.rb +%%RUBY_SITELIBDIR%%/pkgversion.rb +%%RUBY_SITELIBDIR%%/portinfo.rb +%%RUBY_SITELIBDIR%%/ports.rb +%%RUBY_SITELIBDIR%%/portsdb.rb +share/zsh/site-functions/_portupgrade +@unexec if [ ! -x %D/bin/zsh ]; then rmdir -p %D/share/zsh/site-functions; fi +%%PORTDOCS%%share/doc/portupgrade/README +%%PORTDOCS%%@dirrm share/doc/portupgrade diff --git a/sysutils/Makefile b/sysutils/Makefile index 0c42f4635884..6ed85b3b42b6 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -88,6 +88,7 @@ SUBDIR += p5-Unix-Syslog SUBDIR += pib SUBDIR += pkg_remove + SUBDIR += portupgrade SUBDIR += prips SUBDIR += procmap SUBDIR += pslist diff --git a/sysutils/portupgrade-devel/Makefile b/sysutils/portupgrade-devel/Makefile new file mode 100644 index 000000000000..4ffbae362aff --- /dev/null +++ b/sysutils/portupgrade-devel/Makefile @@ -0,0 +1,32 @@ +# New ports collection makefile for: portupgrade +# Date created: 18 March 2001 +# Whom: Akinori MUSHA aka knu +# +# $FreeBSD$ +# + +PORTNAME= portupgrade +PORTVERSION= 1.14 +CATEGORIES= sysutils +MASTER_SITES= ${MASTER_SITE_LOCAL} +MASTER_SITE_SUBDIR= knu +DISTNAME= pkgtools-20010318 + +MAINTAINER= knu@FreeBSD.org + +RUN_DEPENDS= ${RUBY_SITELIBDIR}/optparse.rb:${PORTSDIR}/devel/ruby-optparse + +USE_RUBY= yes + +NO_BUILD= yes + +do-install: + cd ${WRKSRC} && ${RUBY} install.rb + ${MKDIR} ${PREFIX}/share/zsh/site-functions + ${INSTALL_DATA} ${WRKSRC}/misc/zsh/* ${PREFIX}/share/zsh/site-functions/ +.if !defined(NOPORTDOCS) + ${MKDIR} ${PREFIX}/share/doc/${PORTNAME} + ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/${PORTNAME}/ +.endif + +.include diff --git a/sysutils/portupgrade-devel/distinfo b/sysutils/portupgrade-devel/distinfo new file mode 100644 index 000000000000..0387e80f0d82 --- /dev/null +++ b/sysutils/portupgrade-devel/distinfo @@ -0,0 +1 @@ +MD5 (pkgtools-20010318.tar.gz) = 521197d6b16ef8f55482c1d819979d41 diff --git a/sysutils/portupgrade-devel/pkg-comment b/sysutils/portupgrade-devel/pkg-comment new file mode 100644 index 000000000000..9b81313fd42f --- /dev/null +++ b/sysutils/portupgrade-devel/pkg-comment @@ -0,0 +1 @@ +A tool to upgrade installed packages with ports diff --git a/sysutils/portupgrade-devel/pkg-descr b/sysutils/portupgrade-devel/pkg-descr new file mode 100644 index 000000000000..10d2151606f8 --- /dev/null +++ b/sysutils/portupgrade-devel/pkg-descr @@ -0,0 +1,23 @@ +Portupgrade is a tool to upgrade installed packages with ports. + +It upgrades ports without reinstalling dependent packages by directly +modifying the package info recorded in the files under /var/db/pkg. + +The procedures it takes is shown as follows: + + 1. Build the corresponding port of the given package + + 2. Fix the dependency info of the ones which depends on the given + package + + 3. Save the +REQUIRED_BY list of the given package + + 4. Uninstall the given package forcibly if -u is specified + + 5. Install the port + + 6. Restore the +REQUIRED_BY list + +The usage can be shown by running it without arguments or with a -h. + +Author: Akinori MUSHA diff --git a/sysutils/portupgrade-devel/pkg-plist b/sysutils/portupgrade-devel/pkg-plist new file mode 100644 index 000000000000..8423e512f464 --- /dev/null +++ b/sysutils/portupgrade-devel/pkg-plist @@ -0,0 +1,12 @@ +sbin/portupgrade +%%RUBY_SITELIBDIR%%/pkg.rb +%%RUBY_SITELIBDIR%%/pkgdb.rb +%%RUBY_SITELIBDIR%%/pkginfo.rb +%%RUBY_SITELIBDIR%%/pkgversion.rb +%%RUBY_SITELIBDIR%%/portinfo.rb +%%RUBY_SITELIBDIR%%/ports.rb +%%RUBY_SITELIBDIR%%/portsdb.rb +share/zsh/site-functions/_portupgrade +@unexec if [ ! -x %D/bin/zsh ]; then rmdir -p %D/share/zsh/site-functions; fi +%%PORTDOCS%%share/doc/portupgrade/README +%%PORTDOCS%%@dirrm share/doc/portupgrade diff --git a/sysutils/portupgrade/Makefile b/sysutils/portupgrade/Makefile new file mode 100644 index 000000000000..4ffbae362aff --- /dev/null +++ b/sysutils/portupgrade/Makefile @@ -0,0 +1,32 @@ +# New ports collection makefile for: portupgrade +# Date created: 18 March 2001 +# Whom: Akinori MUSHA aka knu +# +# $FreeBSD$ +# + +PORTNAME= portupgrade +PORTVERSION= 1.14 +CATEGORIES= sysutils +MASTER_SITES= ${MASTER_SITE_LOCAL} +MASTER_SITE_SUBDIR= knu +DISTNAME= pkgtools-20010318 + +MAINTAINER= knu@FreeBSD.org + +RUN_DEPENDS= ${RUBY_SITELIBDIR}/optparse.rb:${PORTSDIR}/devel/ruby-optparse + +USE_RUBY= yes + +NO_BUILD= yes + +do-install: + cd ${WRKSRC} && ${RUBY} install.rb + ${MKDIR} ${PREFIX}/share/zsh/site-functions + ${INSTALL_DATA} ${WRKSRC}/misc/zsh/* ${PREFIX}/share/zsh/site-functions/ +.if !defined(NOPORTDOCS) + ${MKDIR} ${PREFIX}/share/doc/${PORTNAME} + ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/${PORTNAME}/ +.endif + +.include diff --git a/sysutils/portupgrade/distinfo b/sysutils/portupgrade/distinfo new file mode 100644 index 000000000000..0387e80f0d82 --- /dev/null +++ b/sysutils/portupgrade/distinfo @@ -0,0 +1 @@ +MD5 (pkgtools-20010318.tar.gz) = 521197d6b16ef8f55482c1d819979d41 diff --git a/sysutils/portupgrade/pkg-comment b/sysutils/portupgrade/pkg-comment new file mode 100644 index 000000000000..9b81313fd42f --- /dev/null +++ b/sysutils/portupgrade/pkg-comment @@ -0,0 +1 @@ +A tool to upgrade installed packages with ports diff --git a/sysutils/portupgrade/pkg-descr b/sysutils/portupgrade/pkg-descr new file mode 100644 index 000000000000..10d2151606f8 --- /dev/null +++ b/sysutils/portupgrade/pkg-descr @@ -0,0 +1,23 @@ +Portupgrade is a tool to upgrade installed packages with ports. + +It upgrades ports without reinstalling dependent packages by directly +modifying the package info recorded in the files under /var/db/pkg. + +The procedures it takes is shown as follows: + + 1. Build the corresponding port of the given package + + 2. Fix the dependency info of the ones which depends on the given + package + + 3. Save the +REQUIRED_BY list of the given package + + 4. Uninstall the given package forcibly if -u is specified + + 5. Install the port + + 6. Restore the +REQUIRED_BY list + +The usage can be shown by running it without arguments or with a -h. + +Author: Akinori MUSHA diff --git a/sysutils/portupgrade/pkg-plist b/sysutils/portupgrade/pkg-plist new file mode 100644 index 000000000000..8423e512f464 --- /dev/null +++ b/sysutils/portupgrade/pkg-plist @@ -0,0 +1,12 @@ +sbin/portupgrade +%%RUBY_SITELIBDIR%%/pkg.rb +%%RUBY_SITELIBDIR%%/pkgdb.rb +%%RUBY_SITELIBDIR%%/pkginfo.rb +%%RUBY_SITELIBDIR%%/pkgversion.rb +%%RUBY_SITELIBDIR%%/portinfo.rb +%%RUBY_SITELIBDIR%%/ports.rb +%%RUBY_SITELIBDIR%%/portsdb.rb +share/zsh/site-functions/_portupgrade +@unexec if [ ! -x %D/bin/zsh ]; then rmdir -p %D/share/zsh/site-functions; fi +%%PORTDOCS%%share/doc/portupgrade/README +%%PORTDOCS%%@dirrm share/doc/portupgrade -- cgit v1.2.3