aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorknu <knu@FreeBSD.org>2001-03-18 07:06:40 +0800
committerknu <knu@FreeBSD.org>2001-03-18 07:06:40 +0800
commit5af0f8e0b624d1ecc466dbbb03c3752e84477980 (patch)
tree9b44c39548c01cb67f27f82cd17ac5fed198a40d
parent1483eed57cd48b8fb8be1d67d0d784124a73816e (diff)
downloadfreebsd-ports-gnome-5af0f8e0b624d1ecc466dbbb03c3752e84477980.tar.gz
freebsd-ports-gnome-5af0f8e0b624d1ecc466dbbb03c3752e84477980.tar.zst
freebsd-ports-gnome-5af0f8e0b624d1ecc466dbbb03c3752e84477980.zip
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.
-rw-r--r--ports-mgmt/portupgrade-devel/Makefile32
-rw-r--r--ports-mgmt/portupgrade-devel/distinfo1
-rw-r--r--ports-mgmt/portupgrade-devel/pkg-comment1
-rw-r--r--ports-mgmt/portupgrade-devel/pkg-descr23
-rw-r--r--ports-mgmt/portupgrade-devel/pkg-plist12
-rw-r--r--ports-mgmt/portupgrade/Makefile32
-rw-r--r--ports-mgmt/portupgrade/distinfo1
-rw-r--r--ports-mgmt/portupgrade/pkg-comment1
-rw-r--r--ports-mgmt/portupgrade/pkg-descr23
-rw-r--r--ports-mgmt/portupgrade/pkg-plist12
-rw-r--r--sysutils/Makefile1
-rw-r--r--sysutils/portupgrade-devel/Makefile32
-rw-r--r--sysutils/portupgrade-devel/distinfo1
-rw-r--r--sysutils/portupgrade-devel/pkg-comment1
-rw-r--r--sysutils/portupgrade-devel/pkg-descr23
-rw-r--r--sysutils/portupgrade-devel/pkg-plist12
-rw-r--r--sysutils/portupgrade/Makefile32
-rw-r--r--sysutils/portupgrade/distinfo1
-rw-r--r--sysutils/portupgrade/pkg-comment1
-rw-r--r--sysutils/portupgrade/pkg-descr23
-rw-r--r--sysutils/portupgrade/pkg-plist12
21 files changed, 277 insertions, 0 deletions
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 <knu@idaemons.org>
+#
+# $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 <bsd.port.mk>
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 <knu@FreeBSD.org>
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 <knu@idaemons.org>
+#
+# $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 <bsd.port.mk>
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 <knu@FreeBSD.org>
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 <knu@idaemons.org>
+#
+# $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 <bsd.port.mk>
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 <knu@FreeBSD.org>
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 <knu@idaemons.org>
+#
+# $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 <bsd.port.mk>
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 <knu@FreeBSD.org>
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