aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkinori MUSHA <knu@FreeBSD.org>2004-01-31 17:15:13 +0000
committerAkinori MUSHA <knu@FreeBSD.org>2004-01-31 17:15:13 +0000
commit2e991b1aa559154bb65ad3b129f3643735e1dd4b (patch)
tree2210fc4800dfcaf0d2d46ab3b08a892968b02523
parent2a9911b9a642146579976a622bfaa1ae603f4abd (diff)
downloadports-2e991b1aa559154bb65ad3b129f3643735e1dd4b.tar.gz
ports-2e991b1aa559154bb65ad3b129f3643735e1dd4b.zip
Add a patch to make portupgrade just use stdout/stderr redirection to
keep build logs rather than calling script(1) when stdin is not a tty. I wonder if this works against the portupgrade-from-cron problem...
Notes
Notes: svn path=/head/; revision=99628
-rw-r--r--ports-mgmt/portupgrade-devel/Makefile1
-rw-r--r--ports-mgmt/portupgrade-devel/files/patch-pkgtools.rb46
-rw-r--r--ports-mgmt/portupgrade/Makefile1
-rw-r--r--ports-mgmt/portupgrade/files/patch-pkgtools.rb46
-rw-r--r--sysutils/portupgrade-devel/Makefile1
-rw-r--r--sysutils/portupgrade-devel/files/patch-pkgtools.rb46
-rw-r--r--sysutils/portupgrade/Makefile1
-rw-r--r--sysutils/portupgrade/files/patch-pkgtools.rb46
8 files changed, 188 insertions, 0 deletions
diff --git a/ports-mgmt/portupgrade-devel/Makefile b/ports-mgmt/portupgrade-devel/Makefile
index 2ceba7fb7180..7c8eb3195579 100644
--- a/ports-mgmt/portupgrade-devel/Makefile
+++ b/ports-mgmt/portupgrade-devel/Makefile
@@ -7,6 +7,7 @@
PORTNAME= portupgrade
PORTVERSION= 20040113
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= ftp://ftp.iDaemons.org/pub/distfiles/ \
${MASTER_SITE_LOCAL}
diff --git a/ports-mgmt/portupgrade-devel/files/patch-pkgtools.rb b/ports-mgmt/portupgrade-devel/files/patch-pkgtools.rb
new file mode 100644
index 000000000000..3d7e68a52709
--- /dev/null
+++ b/ports-mgmt/portupgrade-devel/files/patch-pkgtools.rb
@@ -0,0 +1,46 @@
+Index: lib/pkgtools.rb
+===================================================================
+RCS file: /home/cvs/pkgtools/lib/pkgtools.rb,v
+retrieving revision 1.116
+diff -u -r1.116 pkgtools.rb
+--- lib/pkgtools.rb 19 Oct 2003 11:56:34 -0000 1.116
++++ lib/pkgtools.rb 16 Jan 2004 12:11:11 -0000
+@@ -478,14 +478,20 @@
+ alias system! sudo
+ alias xsystem! xsudo
+
+-# script, xscript
+-def __script(x, file, *args)
+- if file
+- __system(x, '/usr/bin/script', '-qa', file, *args)
++def logged_command(file, args)
++ if !file
++ args
++ elsif STDIN.tty?
++ ['/usr/bin/script', '-qa', file, *args]
+ else
+- __system(x, *args)
++ ['/bin/sh', '-c', sprintf('%s >>%s 2>&1', shelljoin(*args), shelljoin(file))]
+ end
+ end
++
++# script, xscript
++def __script(x, file, *args)
++ __system(x, *logged_command(file, args))
++end
+ def script(file, *args)
+ __script(false, file, *args)
+ end
+@@ -495,11 +501,7 @@
+
+ # script!, xscript!
+ def __script!(x, file, *args)
+- if file
+- __sudo(x, '/usr/bin/script', '-qa', file, *args)
+- else
+- __sudo(x, *args)
+- end
++ __sudo(x, *logged_command(file, args))
+ end
+ def script!(file, *args)
+ __script!(false, file, *args)
diff --git a/ports-mgmt/portupgrade/Makefile b/ports-mgmt/portupgrade/Makefile
index 2ceba7fb7180..7c8eb3195579 100644
--- a/ports-mgmt/portupgrade/Makefile
+++ b/ports-mgmt/portupgrade/Makefile
@@ -7,6 +7,7 @@
PORTNAME= portupgrade
PORTVERSION= 20040113
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= ftp://ftp.iDaemons.org/pub/distfiles/ \
${MASTER_SITE_LOCAL}
diff --git a/ports-mgmt/portupgrade/files/patch-pkgtools.rb b/ports-mgmt/portupgrade/files/patch-pkgtools.rb
new file mode 100644
index 000000000000..3d7e68a52709
--- /dev/null
+++ b/ports-mgmt/portupgrade/files/patch-pkgtools.rb
@@ -0,0 +1,46 @@
+Index: lib/pkgtools.rb
+===================================================================
+RCS file: /home/cvs/pkgtools/lib/pkgtools.rb,v
+retrieving revision 1.116
+diff -u -r1.116 pkgtools.rb
+--- lib/pkgtools.rb 19 Oct 2003 11:56:34 -0000 1.116
++++ lib/pkgtools.rb 16 Jan 2004 12:11:11 -0000
+@@ -478,14 +478,20 @@
+ alias system! sudo
+ alias xsystem! xsudo
+
+-# script, xscript
+-def __script(x, file, *args)
+- if file
+- __system(x, '/usr/bin/script', '-qa', file, *args)
++def logged_command(file, args)
++ if !file
++ args
++ elsif STDIN.tty?
++ ['/usr/bin/script', '-qa', file, *args]
+ else
+- __system(x, *args)
++ ['/bin/sh', '-c', sprintf('%s >>%s 2>&1', shelljoin(*args), shelljoin(file))]
+ end
+ end
++
++# script, xscript
++def __script(x, file, *args)
++ __system(x, *logged_command(file, args))
++end
+ def script(file, *args)
+ __script(false, file, *args)
+ end
+@@ -495,11 +501,7 @@
+
+ # script!, xscript!
+ def __script!(x, file, *args)
+- if file
+- __sudo(x, '/usr/bin/script', '-qa', file, *args)
+- else
+- __sudo(x, *args)
+- end
++ __sudo(x, *logged_command(file, args))
+ end
+ def script!(file, *args)
+ __script!(false, file, *args)
diff --git a/sysutils/portupgrade-devel/Makefile b/sysutils/portupgrade-devel/Makefile
index 2ceba7fb7180..7c8eb3195579 100644
--- a/sysutils/portupgrade-devel/Makefile
+++ b/sysutils/portupgrade-devel/Makefile
@@ -7,6 +7,7 @@
PORTNAME= portupgrade
PORTVERSION= 20040113
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= ftp://ftp.iDaemons.org/pub/distfiles/ \
${MASTER_SITE_LOCAL}
diff --git a/sysutils/portupgrade-devel/files/patch-pkgtools.rb b/sysutils/portupgrade-devel/files/patch-pkgtools.rb
new file mode 100644
index 000000000000..3d7e68a52709
--- /dev/null
+++ b/sysutils/portupgrade-devel/files/patch-pkgtools.rb
@@ -0,0 +1,46 @@
+Index: lib/pkgtools.rb
+===================================================================
+RCS file: /home/cvs/pkgtools/lib/pkgtools.rb,v
+retrieving revision 1.116
+diff -u -r1.116 pkgtools.rb
+--- lib/pkgtools.rb 19 Oct 2003 11:56:34 -0000 1.116
++++ lib/pkgtools.rb 16 Jan 2004 12:11:11 -0000
+@@ -478,14 +478,20 @@
+ alias system! sudo
+ alias xsystem! xsudo
+
+-# script, xscript
+-def __script(x, file, *args)
+- if file
+- __system(x, '/usr/bin/script', '-qa', file, *args)
++def logged_command(file, args)
++ if !file
++ args
++ elsif STDIN.tty?
++ ['/usr/bin/script', '-qa', file, *args]
+ else
+- __system(x, *args)
++ ['/bin/sh', '-c', sprintf('%s >>%s 2>&1', shelljoin(*args), shelljoin(file))]
+ end
+ end
++
++# script, xscript
++def __script(x, file, *args)
++ __system(x, *logged_command(file, args))
++end
+ def script(file, *args)
+ __script(false, file, *args)
+ end
+@@ -495,11 +501,7 @@
+
+ # script!, xscript!
+ def __script!(x, file, *args)
+- if file
+- __sudo(x, '/usr/bin/script', '-qa', file, *args)
+- else
+- __sudo(x, *args)
+- end
++ __sudo(x, *logged_command(file, args))
+ end
+ def script!(file, *args)
+ __script!(false, file, *args)
diff --git a/sysutils/portupgrade/Makefile b/sysutils/portupgrade/Makefile
index 2ceba7fb7180..7c8eb3195579 100644
--- a/sysutils/portupgrade/Makefile
+++ b/sysutils/portupgrade/Makefile
@@ -7,6 +7,7 @@
PORTNAME= portupgrade
PORTVERSION= 20040113
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= ftp://ftp.iDaemons.org/pub/distfiles/ \
${MASTER_SITE_LOCAL}
diff --git a/sysutils/portupgrade/files/patch-pkgtools.rb b/sysutils/portupgrade/files/patch-pkgtools.rb
new file mode 100644
index 000000000000..3d7e68a52709
--- /dev/null
+++ b/sysutils/portupgrade/files/patch-pkgtools.rb
@@ -0,0 +1,46 @@
+Index: lib/pkgtools.rb
+===================================================================
+RCS file: /home/cvs/pkgtools/lib/pkgtools.rb,v
+retrieving revision 1.116
+diff -u -r1.116 pkgtools.rb
+--- lib/pkgtools.rb 19 Oct 2003 11:56:34 -0000 1.116
++++ lib/pkgtools.rb 16 Jan 2004 12:11:11 -0000
+@@ -478,14 +478,20 @@
+ alias system! sudo
+ alias xsystem! xsudo
+
+-# script, xscript
+-def __script(x, file, *args)
+- if file
+- __system(x, '/usr/bin/script', '-qa', file, *args)
++def logged_command(file, args)
++ if !file
++ args
++ elsif STDIN.tty?
++ ['/usr/bin/script', '-qa', file, *args]
+ else
+- __system(x, *args)
++ ['/bin/sh', '-c', sprintf('%s >>%s 2>&1', shelljoin(*args), shelljoin(file))]
+ end
+ end
++
++# script, xscript
++def __script(x, file, *args)
++ __system(x, *logged_command(file, args))
++end
+ def script(file, *args)
+ __script(false, file, *args)
+ end
+@@ -495,11 +501,7 @@
+
+ # script!, xscript!
+ def __script!(x, file, *args)
+- if file
+- __sudo(x, '/usr/bin/script', '-qa', file, *args)
+- else
+- __sudo(x, *args)
+- end
++ __sudo(x, *logged_command(file, args))
+ end
+ def script!(file, *args)
+ __script!(false, file, *args)