9 commits - backend/compile.py backend/Makefile.defs client/tools proxy/proxy spacewalk/certs-tools utils/compile.py utils/Makefile.defs
by Michael Mraka
backend/Makefile.defs | 6 -
backend/compile.py | 105 ---------------------------
client/tools/osad/Makefile.defs | 4 -
client/tools/osad/compile.py | 105 ---------------------------
client/tools/rhncfg/Makefile.defs | 5 -
client/tools/rhncfg/compile.py | 105 ---------------------------
client/tools/rhncfg/solaris/build-solaris.sh | 1
client/tools/rhncustominfo/Makefile.defs | 4 -
client/tools/rhncustominfo/compile.py | 105 ---------------------------
client/tools/spacewalk-koan/Makefile.defs | 4 -
client/tools/spacewalk-koan/compile.py | 105 ---------------------------
proxy/proxy/Makefile.defs | 4 -
proxy/proxy/compile.py | 105 ---------------------------
spacewalk/certs-tools/Makefile.defs | 4 -
spacewalk/certs-tools/compile.py | 105 ---------------------------
utils/Makefile.defs | 6 -
utils/compile.py | 105 ---------------------------
17 files changed, 19 insertions(+), 859 deletions(-)
New commits:
commit 2b18d613f79d2bcc2ec05a337c8723dc90e5c3d3
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Sep 30 23:58:01 2010 +0200
fixed tabs in Makefiles
diff --git a/client/tools/osad/Makefile.defs b/client/tools/osad/Makefile.defs
index 6164760..138ea4d 100644
--- a/client/tools/osad/Makefile.defs
+++ b/client/tools/osad/Makefile.defs
@@ -55,7 +55,7 @@ clean ::
%.pyc : %.py
python -c "import compileall; compileall.compile_dir('$(CURDIR)')"
%.pyo : %.py
- python -OO -c "import compileall; compileall.compile_dir('$(CURDIR)')"
+ python -OO -c "import compileall; compileall.compile_dir('$(CURDIR)')"
# useful macro
descend-subdirs = @$(foreach d,$(SUBDIRS), $(MAKE) -C $(d) $@ || exit 1; )
diff --git a/client/tools/rhncfg/Makefile.defs b/client/tools/rhncfg/Makefile.defs
index 6f71741..e937e6e 100644
--- a/client/tools/rhncfg/Makefile.defs
+++ b/client/tools/rhncfg/Makefile.defs
@@ -58,7 +58,7 @@ clean ::
%.pyc : %.py
python -c "import compileall; compileall.compile_dir('$(CURDIR)')"
%.pyo : %.py
- python -OO -c "import compileall; compileall.compile_dir('$(CURDIR)')"
+ python -OO -c "import compileall; compileall.compile_dir('$(CURDIR)')"
%.8 : %.sgml
[ -f /usr/bin/docbook2man ] && /usr/bin/docbook2man $< || true
diff --git a/client/tools/rhncustominfo/Makefile.defs b/client/tools/rhncustominfo/Makefile.defs
index 123870a..724b3fc 100644
--- a/client/tools/rhncustominfo/Makefile.defs
+++ b/client/tools/rhncustominfo/Makefile.defs
@@ -53,7 +53,7 @@ clean ::
%.pyc : %.py
python -c "import compileall; compileall.compile_dir('$(CURDIR)')"
%.pyo : %.py
- python -OO -c "import compileall; compileall.compile_dir('$(CURDIR)')"
+ python -OO -c "import compileall; compileall.compile_dir('$(CURDIR)')"
# useful macro
descend-subdirs = @$(foreach d,$(SUBDIRS), $(MAKE) -C $(d) $@ || exit 1; )
diff --git a/client/tools/spacewalk-koan/Makefile.defs b/client/tools/spacewalk-koan/Makefile.defs
index 0ba39c1..7924c15 100644
--- a/client/tools/spacewalk-koan/Makefile.defs
+++ b/client/tools/spacewalk-koan/Makefile.defs
@@ -61,7 +61,7 @@ clean ::
%.pyc : %.py
python -c "import compileall; compileall.compile_dir('$(CURDIR)')"
%.pyo : %.py
- python -OO -c "import compileall; compileall.compile_dir('$(CURDIR)')"
+ python -OO -c "import compileall; compileall.compile_dir('$(CURDIR)')"
# useful macro
descend-subdirs = @$(foreach d,$(SUBDIRS), $(MAKE) -C $(d) $@ || exit 1; )
diff --git a/spacewalk/certs-tools/Makefile.defs b/spacewalk/certs-tools/Makefile.defs
index bc5e700..02dac00 100644
--- a/spacewalk/certs-tools/Makefile.defs
+++ b/spacewalk/certs-tools/Makefile.defs
@@ -68,7 +68,7 @@ clean ::
%.pyc : %.py
python -c "import compileall; compileall.compile_dir('$(CURDIR)')"
%.pyo : %.py
- python -OO -c "import compileall; compileall.compile_dir('$(CURDIR)')"
+ python -OO -c "import compileall; compileall.compile_dir('$(CURDIR)')"
# useful macro
descend-subdirs = @$(foreach d,$(SUBDIRS), $(MAKE) -C $(d) $@ || exit 1; )
commit a46fb258a7fc151ce8aabd32cf5327ad7ed02931
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Sep 30 23:08:20 2010 +0200
replaced local copy of compile.py with standard compileall module
diff --git a/client/tools/spacewalk-koan/Makefile.defs b/client/tools/spacewalk-koan/Makefile.defs
index 94e4c2c..0ba39c1 100644
--- a/client/tools/spacewalk-koan/Makefile.defs
+++ b/client/tools/spacewalk-koan/Makefile.defs
@@ -59,9 +59,9 @@ clean ::
# default compile rules
%.pyc : %.py
- $(TOP)/compile.py $< $@
+ python -c "import compileall; compileall.compile_dir('$(CURDIR)')"
%.pyo : %.py
- python -OO $(TOP)/compile.py $< $@
+ python -OO -c "import compileall; compileall.compile_dir('$(CURDIR)')"
# useful macro
descend-subdirs = @$(foreach d,$(SUBDIRS), $(MAKE) -C $(d) $@ || exit 1; )
diff --git a/client/tools/spacewalk-koan/compile.py b/client/tools/spacewalk-koan/compile.py
deleted file mode 100755
index 09bb23c..0000000
--- a/client/tools/spacewalk-koan/compile.py
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (c) 2008 Red Hat, Inc.
-#
-# This software is licensed to you under the GNU General Public License,
-# version 2 (GPLv2). There is NO WARRANTY for this software, express or
-# implied, including the implied warranties of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
-# along with this software; if not, see
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
-#
-# Red Hat trademarks are not licensed under GPLv2. No permission is
-# granted to use or replicate Red Hat trademarks that are incorporated
-# in this software or its documentation.
-#
-#
-# python compiler. "Borrowed" from Python's py_compile module. As
-# opposed to the Python one, this script returns error codes when a
-# compile fails, so it can be used from Makefiles
-#
-# $Id$
-
-import os
-import sys
-import marshal
-import traceback
-import string
-import __builtin__
-
-import imp
-MAGIC = imp.get_magic()
-
-if len(sys.argv) != 3:
- print "Usage:", sys.argv[0], "infile outfile"
- sys.exit(-1)
-infile = sys.argv[1]
-outfile = sys.argv[2]
-
-def wr_long(f, x):
- "Internal; write a 32-bit int to a file in little-endian order."
- f.write(chr( x & 0xff))
- f.write(chr((x >> 8) & 0xff))
- f.write(chr((x >> 16) & 0xff))
- f.write(chr((x >> 24) & 0xff))
-
-def compile(file, cfile=None, dfile=None):
- """Byte-compile one Python source file to Python bytecode.
-
- Arguments:
-
- file: source filename
- cfile: target filename; defaults to source with 'c' or 'o' appended
- ('c' normally, 'o' in optimizing mode, giving .pyc or .pyo)
- dfile: purported filename; defaults to source (this is the filename
- that will show up in error messages)
-
- Note that it isn't necessary to byte-compile Python modules for
- execution efficiency -- Python itself byte-compiles a module when
- it is loaded, and if it can, writes out the bytecode to the
- corresponding .pyc (or .pyo) file.
-
- However, if a Python installation is shared between users, it is a
- good idea to byte-compile all modules upon installation, since
- other users may not be able to write in the source directories,
- and thus they won't be able to write the .pyc/.pyo file, and then
- they would be byte-compiling every module each time it is loaded.
- This can slow down program start-up considerably.
-
- See compileall.py for a script/module that uses this module to
- byte-compile all installed files (or all files in selected
- directories).
- """
-
- f = open(file)
- try:
- timestamp = long(os.fstat(f.fileno())[8])
- except AttributeError:
- timestamp = long(os.stat(file)[8])
- codestring = f.read()
- f.close()
- if codestring and codestring[-1] != '\n':
- codestring = codestring + '\n'
- try:
- codeobject = __builtin__.compile(codestring, dfile or file, 'exec')
- except SyntaxError, detail:
- lines = traceback.format_exception_only(SyntaxError, detail)
- sys.stderr.write("%s: Error compiling\n" % file)
- for line in lines:
- sys.stderr.write(string.replace(line, 'File "<string>"',
- 'File "%s"' % (dfile or file)))
- return -1
- if not cfile:
- cfile = file + (__debug__ and 'c' or 'o')
- fc = open(cfile, 'wb')
- fc.write('\0\0\0\0')
- wr_long(fc, timestamp)
- marshal.dump(codeobject, fc)
- fc.flush()
- fc.seek(0, 0)
- fc.write(MAGIC)
- fc.close()
- return 0
-
-if compile(infile, outfile) != 0:
- sys.exit(-1)
commit 5165f0cecde885c1322d1271347f55783a3ff739
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Sep 30 23:08:20 2010 +0200
replaced local copy of compile.py with standard compileall module
diff --git a/client/tools/rhncustominfo/Makefile.defs b/client/tools/rhncustominfo/Makefile.defs
index eec937f..123870a 100644
--- a/client/tools/rhncustominfo/Makefile.defs
+++ b/client/tools/rhncustominfo/Makefile.defs
@@ -51,9 +51,9 @@ clean ::
# default compile rules
%.pyc : %.py
- $(TOP)/compile.py $< $@
+ python -c "import compileall; compileall.compile_dir('$(CURDIR)')"
%.pyo : %.py
- python -OO $(TOP)/compile.py $< $@
+ python -OO -c "import compileall; compileall.compile_dir('$(CURDIR)')"
# useful macro
descend-subdirs = @$(foreach d,$(SUBDIRS), $(MAKE) -C $(d) $@ || exit 1; )
diff --git a/client/tools/rhncustominfo/compile.py b/client/tools/rhncustominfo/compile.py
deleted file mode 100755
index 09bb23c..0000000
--- a/client/tools/rhncustominfo/compile.py
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (c) 2008 Red Hat, Inc.
-#
-# This software is licensed to you under the GNU General Public License,
-# version 2 (GPLv2). There is NO WARRANTY for this software, express or
-# implied, including the implied warranties of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
-# along with this software; if not, see
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
-#
-# Red Hat trademarks are not licensed under GPLv2. No permission is
-# granted to use or replicate Red Hat trademarks that are incorporated
-# in this software or its documentation.
-#
-#
-# python compiler. "Borrowed" from Python's py_compile module. As
-# opposed to the Python one, this script returns error codes when a
-# compile fails, so it can be used from Makefiles
-#
-# $Id$
-
-import os
-import sys
-import marshal
-import traceback
-import string
-import __builtin__
-
-import imp
-MAGIC = imp.get_magic()
-
-if len(sys.argv) != 3:
- print "Usage:", sys.argv[0], "infile outfile"
- sys.exit(-1)
-infile = sys.argv[1]
-outfile = sys.argv[2]
-
-def wr_long(f, x):
- "Internal; write a 32-bit int to a file in little-endian order."
- f.write(chr( x & 0xff))
- f.write(chr((x >> 8) & 0xff))
- f.write(chr((x >> 16) & 0xff))
- f.write(chr((x >> 24) & 0xff))
-
-def compile(file, cfile=None, dfile=None):
- """Byte-compile one Python source file to Python bytecode.
-
- Arguments:
-
- file: source filename
- cfile: target filename; defaults to source with 'c' or 'o' appended
- ('c' normally, 'o' in optimizing mode, giving .pyc or .pyo)
- dfile: purported filename; defaults to source (this is the filename
- that will show up in error messages)
-
- Note that it isn't necessary to byte-compile Python modules for
- execution efficiency -- Python itself byte-compiles a module when
- it is loaded, and if it can, writes out the bytecode to the
- corresponding .pyc (or .pyo) file.
-
- However, if a Python installation is shared between users, it is a
- good idea to byte-compile all modules upon installation, since
- other users may not be able to write in the source directories,
- and thus they won't be able to write the .pyc/.pyo file, and then
- they would be byte-compiling every module each time it is loaded.
- This can slow down program start-up considerably.
-
- See compileall.py for a script/module that uses this module to
- byte-compile all installed files (or all files in selected
- directories).
- """
-
- f = open(file)
- try:
- timestamp = long(os.fstat(f.fileno())[8])
- except AttributeError:
- timestamp = long(os.stat(file)[8])
- codestring = f.read()
- f.close()
- if codestring and codestring[-1] != '\n':
- codestring = codestring + '\n'
- try:
- codeobject = __builtin__.compile(codestring, dfile or file, 'exec')
- except SyntaxError, detail:
- lines = traceback.format_exception_only(SyntaxError, detail)
- sys.stderr.write("%s: Error compiling\n" % file)
- for line in lines:
- sys.stderr.write(string.replace(line, 'File "<string>"',
- 'File "%s"' % (dfile or file)))
- return -1
- if not cfile:
- cfile = file + (__debug__ and 'c' or 'o')
- fc = open(cfile, 'wb')
- fc.write('\0\0\0\0')
- wr_long(fc, timestamp)
- marshal.dump(codeobject, fc)
- fc.flush()
- fc.seek(0, 0)
- fc.write(MAGIC)
- fc.close()
- return 0
-
-if compile(infile, outfile) != 0:
- sys.exit(-1)
commit 1d73174c2f3b21a372a8ca4368eae945e243eafc
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Sep 30 23:08:20 2010 +0200
replaced local copy of compile.py with standard compileall module
diff --git a/client/tools/rhncfg/Makefile.defs b/client/tools/rhncfg/Makefile.defs
index dcc747e..6f71741 100644
--- a/client/tools/rhncfg/Makefile.defs
+++ b/client/tools/rhncfg/Makefile.defs
@@ -56,9 +56,10 @@ clean ::
# default compile rules
%.pyc : %.py
- $(TOP)/compile.py $< $@
+ python -c "import compileall; compileall.compile_dir('$(CURDIR)')"
%.pyo : %.py
- python -OO $(TOP)/compile.py $< $@
+ python -OO -c "import compileall; compileall.compile_dir('$(CURDIR)')"
+
%.8 : %.sgml
[ -f /usr/bin/docbook2man ] && /usr/bin/docbook2man $< || true
diff --git a/client/tools/rhncfg/compile.py b/client/tools/rhncfg/compile.py
deleted file mode 100755
index 09bb23c..0000000
--- a/client/tools/rhncfg/compile.py
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (c) 2008 Red Hat, Inc.
-#
-# This software is licensed to you under the GNU General Public License,
-# version 2 (GPLv2). There is NO WARRANTY for this software, express or
-# implied, including the implied warranties of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
-# along with this software; if not, see
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
-#
-# Red Hat trademarks are not licensed under GPLv2. No permission is
-# granted to use or replicate Red Hat trademarks that are incorporated
-# in this software or its documentation.
-#
-#
-# python compiler. "Borrowed" from Python's py_compile module. As
-# opposed to the Python one, this script returns error codes when a
-# compile fails, so it can be used from Makefiles
-#
-# $Id$
-
-import os
-import sys
-import marshal
-import traceback
-import string
-import __builtin__
-
-import imp
-MAGIC = imp.get_magic()
-
-if len(sys.argv) != 3:
- print "Usage:", sys.argv[0], "infile outfile"
- sys.exit(-1)
-infile = sys.argv[1]
-outfile = sys.argv[2]
-
-def wr_long(f, x):
- "Internal; write a 32-bit int to a file in little-endian order."
- f.write(chr( x & 0xff))
- f.write(chr((x >> 8) & 0xff))
- f.write(chr((x >> 16) & 0xff))
- f.write(chr((x >> 24) & 0xff))
-
-def compile(file, cfile=None, dfile=None):
- """Byte-compile one Python source file to Python bytecode.
-
- Arguments:
-
- file: source filename
- cfile: target filename; defaults to source with 'c' or 'o' appended
- ('c' normally, 'o' in optimizing mode, giving .pyc or .pyo)
- dfile: purported filename; defaults to source (this is the filename
- that will show up in error messages)
-
- Note that it isn't necessary to byte-compile Python modules for
- execution efficiency -- Python itself byte-compiles a module when
- it is loaded, and if it can, writes out the bytecode to the
- corresponding .pyc (or .pyo) file.
-
- However, if a Python installation is shared between users, it is a
- good idea to byte-compile all modules upon installation, since
- other users may not be able to write in the source directories,
- and thus they won't be able to write the .pyc/.pyo file, and then
- they would be byte-compiling every module each time it is loaded.
- This can slow down program start-up considerably.
-
- See compileall.py for a script/module that uses this module to
- byte-compile all installed files (or all files in selected
- directories).
- """
-
- f = open(file)
- try:
- timestamp = long(os.fstat(f.fileno())[8])
- except AttributeError:
- timestamp = long(os.stat(file)[8])
- codestring = f.read()
- f.close()
- if codestring and codestring[-1] != '\n':
- codestring = codestring + '\n'
- try:
- codeobject = __builtin__.compile(codestring, dfile or file, 'exec')
- except SyntaxError, detail:
- lines = traceback.format_exception_only(SyntaxError, detail)
- sys.stderr.write("%s: Error compiling\n" % file)
- for line in lines:
- sys.stderr.write(string.replace(line, 'File "<string>"',
- 'File "%s"' % (dfile or file)))
- return -1
- if not cfile:
- cfile = file + (__debug__ and 'c' or 'o')
- fc = open(cfile, 'wb')
- fc.write('\0\0\0\0')
- wr_long(fc, timestamp)
- marshal.dump(codeobject, fc)
- fc.flush()
- fc.seek(0, 0)
- fc.write(MAGIC)
- fc.close()
- return 0
-
-if compile(infile, outfile) != 0:
- sys.exit(-1)
diff --git a/client/tools/rhncfg/solaris/build-solaris.sh b/client/tools/rhncfg/solaris/build-solaris.sh
index 7a4a1aa..5f40ad0 100755
--- a/client/tools/rhncfg/solaris/build-solaris.sh
+++ b/client/tools/rhncfg/solaris/build-solaris.sh
@@ -58,7 +58,6 @@ perl -pi -e "s|os.path.join\(os.sep|os.path.join\('$DEST_PREFIX'|" \
./config_common/local_config.py
perl -pi -e "s|^#!/usr/bin/python|#!$DEST_PREFIX/bin/python|" \
- ./compile.py \
./config_client/rhncfg-client.py \
./config_management/rhncfg-manager.py
commit f58f6cdfdbaa7e25ab88ea13ebb3ff3f3546eda6
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Sep 30 22:51:11 2010 +0200
replaced local copy of compile.py with standard compileall module
diff --git a/client/tools/osad/Makefile.defs b/client/tools/osad/Makefile.defs
index 5adc1c1..6164760 100644
--- a/client/tools/osad/Makefile.defs
+++ b/client/tools/osad/Makefile.defs
@@ -53,9 +53,9 @@ clean ::
# default compile rules
%.pyc : %.py
- $(TOP)/compile.py $< $@
+ python -c "import compileall; compileall.compile_dir('$(CURDIR)')"
%.pyo : %.py
- python -OO $(TOP)/compile.py $< $@
+ python -OO -c "import compileall; compileall.compile_dir('$(CURDIR)')"
# useful macro
descend-subdirs = @$(foreach d,$(SUBDIRS), $(MAKE) -C $(d) $@ || exit 1; )
diff --git a/client/tools/osad/compile.py b/client/tools/osad/compile.py
deleted file mode 100755
index 09bb23c..0000000
--- a/client/tools/osad/compile.py
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (c) 2008 Red Hat, Inc.
-#
-# This software is licensed to you under the GNU General Public License,
-# version 2 (GPLv2). There is NO WARRANTY for this software, express or
-# implied, including the implied warranties of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
-# along with this software; if not, see
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
-#
-# Red Hat trademarks are not licensed under GPLv2. No permission is
-# granted to use or replicate Red Hat trademarks that are incorporated
-# in this software or its documentation.
-#
-#
-# python compiler. "Borrowed" from Python's py_compile module. As
-# opposed to the Python one, this script returns error codes when a
-# compile fails, so it can be used from Makefiles
-#
-# $Id$
-
-import os
-import sys
-import marshal
-import traceback
-import string
-import __builtin__
-
-import imp
-MAGIC = imp.get_magic()
-
-if len(sys.argv) != 3:
- print "Usage:", sys.argv[0], "infile outfile"
- sys.exit(-1)
-infile = sys.argv[1]
-outfile = sys.argv[2]
-
-def wr_long(f, x):
- "Internal; write a 32-bit int to a file in little-endian order."
- f.write(chr( x & 0xff))
- f.write(chr((x >> 8) & 0xff))
- f.write(chr((x >> 16) & 0xff))
- f.write(chr((x >> 24) & 0xff))
-
-def compile(file, cfile=None, dfile=None):
- """Byte-compile one Python source file to Python bytecode.
-
- Arguments:
-
- file: source filename
- cfile: target filename; defaults to source with 'c' or 'o' appended
- ('c' normally, 'o' in optimizing mode, giving .pyc or .pyo)
- dfile: purported filename; defaults to source (this is the filename
- that will show up in error messages)
-
- Note that it isn't necessary to byte-compile Python modules for
- execution efficiency -- Python itself byte-compiles a module when
- it is loaded, and if it can, writes out the bytecode to the
- corresponding .pyc (or .pyo) file.
-
- However, if a Python installation is shared between users, it is a
- good idea to byte-compile all modules upon installation, since
- other users may not be able to write in the source directories,
- and thus they won't be able to write the .pyc/.pyo file, and then
- they would be byte-compiling every module each time it is loaded.
- This can slow down program start-up considerably.
-
- See compileall.py for a script/module that uses this module to
- byte-compile all installed files (or all files in selected
- directories).
- """
-
- f = open(file)
- try:
- timestamp = long(os.fstat(f.fileno())[8])
- except AttributeError:
- timestamp = long(os.stat(file)[8])
- codestring = f.read()
- f.close()
- if codestring and codestring[-1] != '\n':
- codestring = codestring + '\n'
- try:
- codeobject = __builtin__.compile(codestring, dfile or file, 'exec')
- except SyntaxError, detail:
- lines = traceback.format_exception_only(SyntaxError, detail)
- sys.stderr.write("%s: Error compiling\n" % file)
- for line in lines:
- sys.stderr.write(string.replace(line, 'File "<string>"',
- 'File "%s"' % (dfile or file)))
- return -1
- if not cfile:
- cfile = file + (__debug__ and 'c' or 'o')
- fc = open(cfile, 'wb')
- fc.write('\0\0\0\0')
- wr_long(fc, timestamp)
- marshal.dump(codeobject, fc)
- fc.flush()
- fc.seek(0, 0)
- fc.write(MAGIC)
- fc.close()
- return 0
-
-if compile(infile, outfile) != 0:
- sys.exit(-1)
commit 1e2081824a51b05feb18d0e8733ab75ab4f6fb96
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Sep 30 22:51:11 2010 +0200
replaced local copy of compile.py with standard compileall module
diff --git a/spacewalk/certs-tools/Makefile.defs b/spacewalk/certs-tools/Makefile.defs
index db92cc8..bc5e700 100644
--- a/spacewalk/certs-tools/Makefile.defs
+++ b/spacewalk/certs-tools/Makefile.defs
@@ -66,9 +66,9 @@ clean ::
# default compile rules
%.pyc : %.py
- $(TOP)/compile.py $< $@
+ python -c "import compileall; compileall.compile_dir('$(CURDIR)')"
%.pyo : %.py
- python -OO $(TOP)/compile.py $< $@
+ python -OO -c "import compileall; compileall.compile_dir('$(CURDIR)')"
# useful macro
descend-subdirs = @$(foreach d,$(SUBDIRS), $(MAKE) -C $(d) $@ || exit 1; )
diff --git a/spacewalk/certs-tools/compile.py b/spacewalk/certs-tools/compile.py
deleted file mode 100755
index 847debb..0000000
--- a/spacewalk/certs-tools/compile.py
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (c) 2008 Red Hat, Inc.
-#
-# This software is licensed to you under the GNU General Public License,
-# version 2 (GPLv2). There is NO WARRANTY for this software, express or
-# implied, including the implied warranties of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
-# along with this software; if not, see
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
-#
-# Red Hat trademarks are not licensed under GPLv2. No permission is
-# granted to use or replicate Red Hat trademarks that are incorporated
-# in this software or its documentation.
-#
-#
-# python compiler. "Borrowed" from Python's py_compile module. As
-# opposed to the Python one, this script returns error codes when a
-# compile fails, so it can be used from Makefiles
-#
-# $Id$
-
-import os
-import sys
-import marshal
-import traceback
-import string
-import __builtin__
-
-import imp
-MAGIC = imp.get_magic()
-
-if len(sys.argv) != 3:
- print "Usage:", sys.argv[0], "infile outfile"
- sys.exit(-1)
-infile = sys.argv[1]
-outfile = sys.argv[2]
-
-def wr_long(f, x):
- "Internal; write a 32-bit int to a file in little-endian order."
- f.write(chr( x & 0xff))
- f.write(chr((x >> 8) & 0xff))
- f.write(chr((x >> 16) & 0xff))
- f.write(chr((x >> 24) & 0xff))
-
-def compile(file, cfile=None, dfile=None):
- """Byte-compile one Python source file to Python bytecode.
-
- Arguments:
-
- file: source filename
- cfile: target filename; defaults to source with 'c' or 'o' appended
- ('c' normally, 'o' in optimizing mode, giving .pyc or .pyo)
- dfile: purported filename; defaults to source (this is the filename
- that will show up in error messages)
-
- Note that it isn't necessary to byte-compile Python modules for
- execution efficiency -- Python itself byte-compiles a module when
- it is loaded, and if it can, writes out the bytecode to the
- corresponding .pyc (or .pyo) file.
-
- However, if a Python installation is shared between users, it is a
- good idea to byte-compile all modules upon installation, since
- other users may not be able to write in the source directories,
- and thus they won't be able to write the .pyc/.pyo file, and then
- they would be byte-compiling every module each time it is loaded.
- This can slow down program start-up considerably.
-
- See compileall.py for a script/module that uses this module to
- byte-compile all installed files (or all files in selected
- directories).
- """
-
- f = open(file)
- try:
- timestamp = long(os.fstat(f.fileno())[8])
- except AttributeError:
- timestamp = long(os.stat(file)[8])
- codestring = f.read()
- f.close()
- if codestring and codestring[-1] != '\n':
- codestring = codestring + '\n'
- try:
- codeobject = __builtin__.compile(codestring, dfile or file, 'exec')
- except SyntaxError, detail:
- lines = traceback.format_exception_only(SyntaxError, detail)
- sys.stderr.write("%s: Error compiling\n" % file)
- for line in lines:
- sys.stderr.write(string.replace(line, 'File "<string>"',
- 'File "%s"' % (dfile or file)))
- return -1
- if not cfile:
- cfile = file + (__debug__ and 'c' or 'o')
- fc = open(cfile, 'wb')
- fc.write('\0\0\0\0')
- wr_long(fc, timestamp)
- marshal.dump(codeobject, fc)
- fc.flush()
- fc.seek(0, 0)
- fc.write(MAGIC)
- fc.close()
- return 0
-
-if compile(infile, outfile) != 0:
- sys.exit(-1)
commit 3ae30f9fdf27820275cab5177cda1108fd413301
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Sep 30 22:51:11 2010 +0200
replaced local copy of compile.py with standard compileall module
diff --git a/utils/Makefile.defs b/utils/Makefile.defs
index 8e35f51..9f8ee98 100644
--- a/utils/Makefile.defs
+++ b/utils/Makefile.defs
@@ -52,9 +52,9 @@ clean ::
# default compile rules
%.pyc : %.py
- python $(TOP)/compile.py $< $@
-#%.pyo : %.py
-# python -OO $(TOP)/compile.py $< $@
+ python -c "import compileall; compileall.compile_dir('$(CURDIR)')"
+%.pyo : %.py
+ python -OO -c "import compileall; compileall.compile_dir('$(CURDIR)')"
# useful macro
descend-subdirs = @$(foreach d,$(SUBDIRS), $(MAKE) -C $(d) $@ || exit 1; )
diff --git a/utils/compile.py b/utils/compile.py
deleted file mode 100755
index 847debb..0000000
--- a/utils/compile.py
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (c) 2008 Red Hat, Inc.
-#
-# This software is licensed to you under the GNU General Public License,
-# version 2 (GPLv2). There is NO WARRANTY for this software, express or
-# implied, including the implied warranties of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
-# along with this software; if not, see
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
-#
-# Red Hat trademarks are not licensed under GPLv2. No permission is
-# granted to use or replicate Red Hat trademarks that are incorporated
-# in this software or its documentation.
-#
-#
-# python compiler. "Borrowed" from Python's py_compile module. As
-# opposed to the Python one, this script returns error codes when a
-# compile fails, so it can be used from Makefiles
-#
-# $Id$
-
-import os
-import sys
-import marshal
-import traceback
-import string
-import __builtin__
-
-import imp
-MAGIC = imp.get_magic()
-
-if len(sys.argv) != 3:
- print "Usage:", sys.argv[0], "infile outfile"
- sys.exit(-1)
-infile = sys.argv[1]
-outfile = sys.argv[2]
-
-def wr_long(f, x):
- "Internal; write a 32-bit int to a file in little-endian order."
- f.write(chr( x & 0xff))
- f.write(chr((x >> 8) & 0xff))
- f.write(chr((x >> 16) & 0xff))
- f.write(chr((x >> 24) & 0xff))
-
-def compile(file, cfile=None, dfile=None):
- """Byte-compile one Python source file to Python bytecode.
-
- Arguments:
-
- file: source filename
- cfile: target filename; defaults to source with 'c' or 'o' appended
- ('c' normally, 'o' in optimizing mode, giving .pyc or .pyo)
- dfile: purported filename; defaults to source (this is the filename
- that will show up in error messages)
-
- Note that it isn't necessary to byte-compile Python modules for
- execution efficiency -- Python itself byte-compiles a module when
- it is loaded, and if it can, writes out the bytecode to the
- corresponding .pyc (or .pyo) file.
-
- However, if a Python installation is shared between users, it is a
- good idea to byte-compile all modules upon installation, since
- other users may not be able to write in the source directories,
- and thus they won't be able to write the .pyc/.pyo file, and then
- they would be byte-compiling every module each time it is loaded.
- This can slow down program start-up considerably.
-
- See compileall.py for a script/module that uses this module to
- byte-compile all installed files (or all files in selected
- directories).
- """
-
- f = open(file)
- try:
- timestamp = long(os.fstat(f.fileno())[8])
- except AttributeError:
- timestamp = long(os.stat(file)[8])
- codestring = f.read()
- f.close()
- if codestring and codestring[-1] != '\n':
- codestring = codestring + '\n'
- try:
- codeobject = __builtin__.compile(codestring, dfile or file, 'exec')
- except SyntaxError, detail:
- lines = traceback.format_exception_only(SyntaxError, detail)
- sys.stderr.write("%s: Error compiling\n" % file)
- for line in lines:
- sys.stderr.write(string.replace(line, 'File "<string>"',
- 'File "%s"' % (dfile or file)))
- return -1
- if not cfile:
- cfile = file + (__debug__ and 'c' or 'o')
- fc = open(cfile, 'wb')
- fc.write('\0\0\0\0')
- wr_long(fc, timestamp)
- marshal.dump(codeobject, fc)
- fc.flush()
- fc.seek(0, 0)
- fc.write(MAGIC)
- fc.close()
- return 0
-
-if compile(infile, outfile) != 0:
- sys.exit(-1)
commit 7dc4ca4840b409d8533e8868618119211b5bee7c
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Sep 30 23:38:58 2010 +0200
replaced local copy of compile.py with standard compileall module
diff --git a/backend/Makefile.defs b/backend/Makefile.defs
index ee3fe86..f368792 100644
--- a/backend/Makefile.defs
+++ b/backend/Makefile.defs
@@ -62,9 +62,9 @@ clean ::
# default compile rules
%.pyc : %.py
- python $(TOP)/compile.py $< $@
-#%.pyo : %.py
-# python -OO $(TOP)/compile.py $< $@
+ python -c "import compileall; compileall.compile_dir('$(CURDIR)')"
+%.pyo : %.py
+ python -OO -c "import compileall; compileall.compile_dir('$(CURDIR)')"
# useful macro
descend-subdirs = @$(foreach d,$(SUBDIRS), $(MAKE) -C $(d) $@ || exit 1; )
diff --git a/backend/compile.py b/backend/compile.py
deleted file mode 100755
index 09bb23c..0000000
--- a/backend/compile.py
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (c) 2008 Red Hat, Inc.
-#
-# This software is licensed to you under the GNU General Public License,
-# version 2 (GPLv2). There is NO WARRANTY for this software, express or
-# implied, including the implied warranties of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
-# along with this software; if not, see
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
-#
-# Red Hat trademarks are not licensed under GPLv2. No permission is
-# granted to use or replicate Red Hat trademarks that are incorporated
-# in this software or its documentation.
-#
-#
-# python compiler. "Borrowed" from Python's py_compile module. As
-# opposed to the Python one, this script returns error codes when a
-# compile fails, so it can be used from Makefiles
-#
-# $Id$
-
-import os
-import sys
-import marshal
-import traceback
-import string
-import __builtin__
-
-import imp
-MAGIC = imp.get_magic()
-
-if len(sys.argv) != 3:
- print "Usage:", sys.argv[0], "infile outfile"
- sys.exit(-1)
-infile = sys.argv[1]
-outfile = sys.argv[2]
-
-def wr_long(f, x):
- "Internal; write a 32-bit int to a file in little-endian order."
- f.write(chr( x & 0xff))
- f.write(chr((x >> 8) & 0xff))
- f.write(chr((x >> 16) & 0xff))
- f.write(chr((x >> 24) & 0xff))
-
-def compile(file, cfile=None, dfile=None):
- """Byte-compile one Python source file to Python bytecode.
-
- Arguments:
-
- file: source filename
- cfile: target filename; defaults to source with 'c' or 'o' appended
- ('c' normally, 'o' in optimizing mode, giving .pyc or .pyo)
- dfile: purported filename; defaults to source (this is the filename
- that will show up in error messages)
-
- Note that it isn't necessary to byte-compile Python modules for
- execution efficiency -- Python itself byte-compiles a module when
- it is loaded, and if it can, writes out the bytecode to the
- corresponding .pyc (or .pyo) file.
-
- However, if a Python installation is shared between users, it is a
- good idea to byte-compile all modules upon installation, since
- other users may not be able to write in the source directories,
- and thus they won't be able to write the .pyc/.pyo file, and then
- they would be byte-compiling every module each time it is loaded.
- This can slow down program start-up considerably.
-
- See compileall.py for a script/module that uses this module to
- byte-compile all installed files (or all files in selected
- directories).
- """
-
- f = open(file)
- try:
- timestamp = long(os.fstat(f.fileno())[8])
- except AttributeError:
- timestamp = long(os.stat(file)[8])
- codestring = f.read()
- f.close()
- if codestring and codestring[-1] != '\n':
- codestring = codestring + '\n'
- try:
- codeobject = __builtin__.compile(codestring, dfile or file, 'exec')
- except SyntaxError, detail:
- lines = traceback.format_exception_only(SyntaxError, detail)
- sys.stderr.write("%s: Error compiling\n" % file)
- for line in lines:
- sys.stderr.write(string.replace(line, 'File "<string>"',
- 'File "%s"' % (dfile or file)))
- return -1
- if not cfile:
- cfile = file + (__debug__ and 'c' or 'o')
- fc = open(cfile, 'wb')
- fc.write('\0\0\0\0')
- wr_long(fc, timestamp)
- marshal.dump(codeobject, fc)
- fc.flush()
- fc.seek(0, 0)
- fc.write(MAGIC)
- fc.close()
- return 0
-
-if compile(infile, outfile) != 0:
- sys.exit(-1)
commit 834f46538c027329537deae4b067c60dbba74498
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Sep 30 22:51:11 2010 +0200
replaced local copy of compile.py with standard compileall module
diff --git a/proxy/proxy/Makefile.defs b/proxy/proxy/Makefile.defs
index 98652f1..5935079 100644
--- a/proxy/proxy/Makefile.defs
+++ b/proxy/proxy/Makefile.defs
@@ -51,9 +51,9 @@ clean ::
# default compile rules
%.pyc : %.py
- $(TOP)/compile.py $< $@
+ python -c "import compileall; compileall.compile_dir('$(CURDIR)')"
%.pyo : %.py
- python -OO $(TOP)/compile.py $< $@
+ python -OO -c "import compileall; compileall.compile_dir('$(CURDIR)')"
# useful macro
descend-subdirs = @$(foreach d,$(SUBDIRS), $(MAKE) -C $(d) $@ || exit 1; )
diff --git a/proxy/proxy/compile.py b/proxy/proxy/compile.py
deleted file mode 100755
index 847debb..0000000
--- a/proxy/proxy/compile.py
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (c) 2008 Red Hat, Inc.
-#
-# This software is licensed to you under the GNU General Public License,
-# version 2 (GPLv2). There is NO WARRANTY for this software, express or
-# implied, including the implied warranties of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
-# along with this software; if not, see
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
-#
-# Red Hat trademarks are not licensed under GPLv2. No permission is
-# granted to use or replicate Red Hat trademarks that are incorporated
-# in this software or its documentation.
-#
-#
-# python compiler. "Borrowed" from Python's py_compile module. As
-# opposed to the Python one, this script returns error codes when a
-# compile fails, so it can be used from Makefiles
-#
-# $Id$
-
-import os
-import sys
-import marshal
-import traceback
-import string
-import __builtin__
-
-import imp
-MAGIC = imp.get_magic()
-
-if len(sys.argv) != 3:
- print "Usage:", sys.argv[0], "infile outfile"
- sys.exit(-1)
-infile = sys.argv[1]
-outfile = sys.argv[2]
-
-def wr_long(f, x):
- "Internal; write a 32-bit int to a file in little-endian order."
- f.write(chr( x & 0xff))
- f.write(chr((x >> 8) & 0xff))
- f.write(chr((x >> 16) & 0xff))
- f.write(chr((x >> 24) & 0xff))
-
-def compile(file, cfile=None, dfile=None):
- """Byte-compile one Python source file to Python bytecode.
-
- Arguments:
-
- file: source filename
- cfile: target filename; defaults to source with 'c' or 'o' appended
- ('c' normally, 'o' in optimizing mode, giving .pyc or .pyo)
- dfile: purported filename; defaults to source (this is the filename
- that will show up in error messages)
-
- Note that it isn't necessary to byte-compile Python modules for
- execution efficiency -- Python itself byte-compiles a module when
- it is loaded, and if it can, writes out the bytecode to the
- corresponding .pyc (or .pyo) file.
-
- However, if a Python installation is shared between users, it is a
- good idea to byte-compile all modules upon installation, since
- other users may not be able to write in the source directories,
- and thus they won't be able to write the .pyc/.pyo file, and then
- they would be byte-compiling every module each time it is loaded.
- This can slow down program start-up considerably.
-
- See compileall.py for a script/module that uses this module to
- byte-compile all installed files (or all files in selected
- directories).
- """
-
- f = open(file)
- try:
- timestamp = long(os.fstat(f.fileno())[8])
- except AttributeError:
- timestamp = long(os.stat(file)[8])
- codestring = f.read()
- f.close()
- if codestring and codestring[-1] != '\n':
- codestring = codestring + '\n'
- try:
- codeobject = __builtin__.compile(codestring, dfile or file, 'exec')
- except SyntaxError, detail:
- lines = traceback.format_exception_only(SyntaxError, detail)
- sys.stderr.write("%s: Error compiling\n" % file)
- for line in lines:
- sys.stderr.write(string.replace(line, 'File "<string>"',
- 'File "%s"' % (dfile or file)))
- return -1
- if not cfile:
- cfile = file + (__debug__ and 'c' or 'o')
- fc = open(cfile, 'wb')
- fc.write('\0\0\0\0')
- wr_long(fc, timestamp)
- marshal.dump(codeobject, fc)
- fc.flush()
- fc.seek(0, 0)
- fc.write(MAGIC)
- fc.close()
- return 0
-
-if compile(infile, outfile) != 0:
- sys.exit(-1)
13 years, 7 months
2 commits - schema/spacewalk
by Jan Pazdziora
schema/spacewalk/postgres/procs/nvl.sql | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
New commits:
commit 34633222aac6a3ad8f0f613866a96e5a9dd03c0f
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Mon Oct 4 10:54:11 2010 +0200
The nvl source is PostgreSQL-specific.
diff --git a/schema/spacewalk/postgres/procs/nvl.sql b/schema/spacewalk/postgres/procs/nvl.sql
index e7430fb..8f88524 100644
--- a/schema/spacewalk/postgres/procs/nvl.sql
+++ b/schema/spacewalk/postgres/procs/nvl.sql
@@ -1,3 +1,4 @@
+-- oracle equivalent source none
--
-- Copyright (c) 2010 Red Hat, Inc.
--
commit 908cb290655c8e04ed0354e3616f8bb811b63874
Author: Colin Coe <colin.coe(a)gmail.com>
Date: Tue Aug 10 20:31:19 2010 +0800
PostgreSQL NVL stored procedure
PATCH: make NVL work in PostgreSQL
Attached is a patch that makes the NVL errors GoAway(tm).
diff --git a/schema/spacewalk/postgres/procs/nvl.sql b/schema/spacewalk/postgres/procs/nvl.sql
new file mode 100644
index 0000000..e7430fb
--- /dev/null
+++ b/schema/spacewalk/postgres/procs/nvl.sql
@@ -0,0 +1,25 @@
+--
+-- Copyright (c) 2010 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+-- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+--
+--
+--
+--
+
+
+create or replace
+function nvl(input varchar, replace_with varchar) returns varchar
+as $$
+ SELECT COALESCE(NULLIF($1,''), $2);
+$$
+LANGUAGE SQL;
13 years, 7 months
java/code
by Miroslav Suchý
java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepositoryWriter.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 6661d7d348dafbd0bc84f61b9dee1ef8bff40867
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Thu Sep 30 19:38:14 2010 +0200
Create cache directory for both rpm and deb channels.
Otherwise metadata creation for deb channel fails
with FileNotFoundException.
diff --git a/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepositoryWriter.java b/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepositoryWriter.java
index 820407c..12fcf03 100644
--- a/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepositoryWriter.java
+++ b/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepositoryWriter.java
@@ -104,15 +104,15 @@ public class RepositoryWriter {
// we closed the session, so we need to reload the object
channel = (Channel) HibernateFactory.getSession().get(channel.getClass(),
channel.getId());
+ if (!new File(prefix).mkdirs() && !new File(prefix).exists()) {
+ throw new RepomdRuntimeException("Unable to create directory: " +
+ prefix);
+ }
if (channel.getChannelArch().getArchType().getLabel().equalsIgnoreCase("deb")) {
log.info("Generating new DEB repository for channel " + channel.getLabel());
generateDebRepository(channel, prefix);
}
else {
- if (!new File(prefix).mkdirs() && !new File(prefix).exists()) {
- throw new RepomdRuntimeException("Unable to create directory: " +
- prefix);
- }
// Get compatible checksumType
this.checksumtype = channel.getChecksumTypeLabel();
if (checksumtype == null) {
13 years, 7 months
java/code
by Colin Coe
java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml | 2 +-
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
New commits:
commit 466e157cb5d0b59ce3ed605f196c6216c2dbf64c
Author: Colin Coe <coec(a)war.coesta.com>
Date: Sat Oct 2 21:32:02 2010 +0800
Use US spelling of 'organisation'
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml b/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml
index 158bbf5..3e89186 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml
@@ -8692,7 +8692,7 @@ Follow this url to see the full list of inactive systems:
<source>Migrate Systems</source>
</trans-unit>
<trans-unit id="ssm.migrate.systems.orgnone">
- <source>This organisation has no trusted organisations. Systems can only be migrated between organisations with defined trusts.</source>
+ <source>This organization has no trusted organizations. Systems can only be migrated between organizations with defined trusts.</source>
</trans-unit>
<trans-unit id="channel.manage.merge.finished">
<source>{0} Package(s) have been added and {1} Package(s) have been removed from the channel.</source>
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
index 768934e..175754f 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
@@ -5482,10 +5482,10 @@ value for this entitlement, excluding the default organization's consumption.</s
<source>Migrate Systems</source>
</trans-unit>
<trans-unit id="ssm.migrate.systems.summary">
- <source>Migrate the selected systems to the selected organisation. If the operation is successful, the systems will no longer be visible in this organisation.</source>
+ <source>Migrate the selected systems to the selected organization. If the operation is successful, the systems will no longer be visible in this organization.</source>
</trans-unit>
<trans-unit id="ssm.migrate.systems.org">
- <source>Target Organisation</source>
+ <source>Target Organization</source>
</trans-unit>
</group>
@@ -5576,10 +5576,10 @@ value for this entitlement, excluding the default organization's consumption.</s
<source>Migrate Systems</source>
</trans-unit>
<trans-unit id="ssm.misc.index.migrate.summary">
- <source>Migrate multiple systems from the current organistation to another (trusted) organisation in a single action. The migrated systems will no longer be visible in the original organisation.</source>
+ <source>Migrate multiple systems from the current organization to another (trusted) organization in a single action. The migrated systems will no longer be visible in the original organization.</source>
</trans-unit>
<trans-unit id="ssm.misc.index.migrate.migrate">
- <source>Migrate Systems to another organisation</source>
+ <source>Migrate Systems to another organization</source>
</trans-unit>
<trans-unit id="ssm.misc.index.csi.header">
13 years, 7 months
java/code web/html
by Colin Coe
java/code/src/com/redhat/rhn/frontend/action/ssm/ListSystemsAction.java | 69 ++++++++++
java/code/src/com/redhat/rhn/frontend/action/systems/SystemGroupListSetupAction.java | 8 -
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 18 ++
java/code/webapp/WEB-INF/nav/ssm.xml | 3
java/code/webapp/WEB-INF/pages/ssm/systems/list.jsp | 29 ++++
java/code/webapp/WEB-INF/struts-config.xml | 11 +
web/html/nav/ssm.xml | 2
7 files changed, 132 insertions(+), 8 deletions(-)
New commits:
commit d3a660234af5df3d3775aea60d523c25e8126858
Author: Colin Coe <coec(a)war.coesta.com>
Date: Sat Oct 2 20:59:35 2010 +0800
Port /network/systems/ssm/system_list.pxt
diff --git a/java/code/src/com/redhat/rhn/frontend/action/ssm/ListSystemsAction.java b/java/code/src/com/redhat/rhn/frontend/action/ssm/ListSystemsAction.java
new file mode 100644
index 0000000..489bebd
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/frontend/action/ssm/ListSystemsAction.java
@@ -0,0 +1,69 @@
+/**
+ * Copyright (c) 2010 Red Hat, Inc.
+ *
+ * This software is licensed to you under the GNU General Public License,
+ * version 2 (GPLv2). There is NO WARRANTY for this software, express or
+ * implied, including the implied warranties of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+ * along with this software; if not, see
+ * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+ *
+ * Red Hat trademarks are not licensed under GPLv2. No permission is
+ * granted to use or replicate Red Hat trademarks that are incorporated
+ * in this software or its documentation.
+ */
+package com.redhat.rhn.frontend.action.ssm;
+
+import com.redhat.rhn.domain.rhnset.RhnSet;
+import com.redhat.rhn.domain.user.User;
+import com.redhat.rhn.frontend.action.systems.SystemListSetupAction;
+import com.redhat.rhn.frontend.struts.RequestContext;
+import com.redhat.rhn.frontend.struts.RhnAction;
+import com.redhat.rhn.manager.rhnset.RhnSetDecl;
+
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.action.ActionForward;
+import org.apache.struts.action.ActionMapping;
+import org.apache.struts.action.DynaActionForm;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+
+/**
+ * ListSystemsAction
+ * @version $Rev$
+ */
+public class ListSystemsAction extends RhnAction {
+ /**
+ *
+ * {@inheritDoc}
+ */
+ public ActionForward execute(ActionMapping mapping,
+ ActionForm formIn,
+ HttpServletRequest request,
+ HttpServletResponse response) {
+ RequestContext context = new RequestContext(request);
+
+ RequestContext rctx = new RequestContext(request);
+ User user = rctx.getLoggedInUser();
+
+ if (context.wasDispatched("ssm.list.systems.confirmbutton")) {
+ RhnSet set = RhnSetDecl.SYSTEMS.get(context.getLoggedInUser());
+
+ DynaActionForm daForm = (DynaActionForm)formIn;
+
+ // Logic to remove hosts from SSM goes here
+
+ return mapping.findForward("confirm");
+ }
+
+ new SystemListSetupAction().execute(mapping, formIn, request, response);
+// ListHelper helper = new ListHelper(this, request);
+// helper.setListName("systemList");
+// helper.setDataSetName("pageList");
+// helper.execute();
+
+ return mapping.findForward("default");
+ }
+}
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/SystemGroupListSetupAction.java b/java/code/src/com/redhat/rhn/frontend/action/systems/SystemGroupListSetupAction.java
index ac87677..e030d38 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/SystemGroupListSetupAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/SystemGroupListSetupAction.java
@@ -165,13 +165,13 @@ public class SystemGroupListSetupAction extends RhnAction {
* TODO: make this an ActionForward
*/
try {
- response.sendRedirect("/network/systems/ssm/system_list.pxt");
+ response.sendRedirect("/rhn/systems/ssm/ListSystems.do");
}
catch (IOException exc) {
// This really shouldn't happen, but just in case, log and
// return.
LOG.error("IOException when trying to redirect to " +
- "/network/systems/ssm/system_list.pxt", exc);
+ "/rhn/systems/ssm/ListSystems.do", exc);
}
return null;
@@ -237,13 +237,13 @@ public class SystemGroupListSetupAction extends RhnAction {
* TODO: make this an ActionForward
*/
try {
- response.sendRedirect("/network/systems/ssm/system_list.pxt");
+ response.sendRedirect("/rhn/systems/ssm/ListSystems.do");
}
catch (IOException exc) {
// This really shouldn't happen, but just in case, log and
// return.
LOG.error("IOException when trying to redirect to " +
- "/network/systems/ssm/system_list.pxt", exc);
+ "/rhn/systems/ssm/ListSystems.do", exc);
}
return null;
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
index beb458f..768934e 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
@@ -5376,7 +5376,7 @@ value for this entitlement, excluding the default organization's consumption.</s
</trans-unit>
<trans-unit id="ssm.overview.systems.list">
- <source><a href="/network/systems/ssm/system_list.pxt">List the systems</a> you have selected to work with</source>
+ <source><a href="/rhn/systems/ssm/ListSystems.do">List the systems</a> you have selected to work with</source>
</trans-unit>
<trans-unit id="ssm.overview.errata">
@@ -5460,6 +5460,19 @@ value for this entitlement, excluding the default organization's consumption.</s
</trans-unit>
</group>
+<!-- SSM System List -->
+ <group>
+ <context-group name="ctx">
+ <context context-type="sourcefile">/rhn/systems/ssm/ListSystems.do</context>
+ </context-group>
+ <trans-unit id="ssm.list.systems.header">
+ <source>Selected Systems List</source>
+ </trans-unit>
+ <trans-unit id="ssm.list.systems.summary">
+ <source><p>Below are your selected systems. All actions taken within this interface will apply only to the relevant systems in this set.</p><p>To remove systems from the current set, un-check those systems to be removed.</p></source>
+ </trans-unit>
+ </group>
+
<!-- SSM System Migration -->
<group>
<context-group name="ctx">
@@ -5476,7 +5489,8 @@ value for this entitlement, excluding the default organization's consumption.</s
</trans-unit>
</group>
- <!-- SSM System list-->
+
+ <!-- SSM System Delete Confirm-->
<group>
<context-group name="ctx">
<context context-type="sourcefile">/rhn/systems/ssm/DeleteConfirm.do</context>
diff --git a/java/code/webapp/WEB-INF/nav/ssm.xml b/java/code/webapp/WEB-INF/nav/ssm.xml
index 48266d2..4c9a5c7 100644
--- a/java/code/webapp/WEB-INF/nav/ssm.xml
+++ b/java/code/webapp/WEB-INF/nav/ssm.xml
@@ -2,7 +2,8 @@
<rhn-navi-tree label="ssm" invisible="1" title-depth="1">
<rhn-tab name="Overview" url="/rhn/ssm/index.do" />
<rhn-tab name="Systems">
- <rhn-tab-url>/network/systems/ssm/system_list.pxt</rhn-tab-url>
+<!-- <rhn-tab-url>/network/systems/ssm/system_list.pxt</rhn-tab-url> -->
+ <rhn-tab-url>/rhn/systems/ssm/ListSystems.do</rhn-tab-url>
</rhn-tab>
<rhn-tab name="Errata"
diff --git a/java/code/webapp/WEB-INF/pages/ssm/systems/list.jsp b/java/code/webapp/WEB-INF/pages/ssm/systems/list.jsp
new file mode 100644
index 0000000..f3f0528
--- /dev/null
+++ b/java/code/webapp/WEB-INF/pages/ssm/systems/list.jsp
@@ -0,0 +1,29 @@
+<%@ taglib uri="http://rhn.redhat.com/rhn" prefix="rhn" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
+<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
+<%@ taglib uri="http://rhn.redhat.com/tags/list" prefix="rl" %>
+
+<html:xhtml/>
+<html>
+<body>
+<%@ include file="/WEB-INF/pages/common/fragments/ssm/header.jspf" %>
+<h2>
+ <bean:message key="ssm.list.systems.header" />
+</h2>
+<p><bean:message key="ssm.list.systems.summary" /></p>
+<%--
+<c:set var="notSelectable" value="true"/>
+<c:set var="showLastCheckin" value="true"/>
+<c:set var="noPackages" value="true"/>
+<c:set var="noErrata" value="true"/>
+--%>
+
+<rl:listset name="systemListSet" legend="system">
+ <%@ include file="/WEB-INF/pages/common/fragments/systems/system_listdisplay.jspf" %>
+</rl:listset>
+
+
+</body>
+</html>
+
diff --git a/java/code/webapp/WEB-INF/struts-config.xml b/java/code/webapp/WEB-INF/struts-config.xml
index dfd0fee..f872e86 100644
--- a/java/code/webapp/WEB-INF/struts-config.xml
+++ b/java/code/webapp/WEB-INF/struts-config.xml
@@ -3113,6 +3113,17 @@
path="/systems/ssm/misc/Index.do" redirect="true"/>
</action>
+ <action path="/systems/ssm/ListSystems"
+ scope="request"
+ input="/WEB-INF/pages/ssm/systems/list.jsp"
+ type="com.redhat.rhn.frontend.action.ssm.ListSystemsAction"
+ className="com.redhat.rhn.frontend.struts.RhnActionMapping">
+ <forward name="default"
+ path="/WEB-INF/pages/ssm/systems/list.jsp"/>
+ <forward name="confirm"
+ path="/systems/ssm/ListSystems.do" redirect="true"/>
+ </action>
+
<action path="/systems/ssm/MigrateSystems"
scope="request"
input="/WEB-INF/pages/ssm/systems/ssmdeleteconfirm.jsp"
diff --git a/web/html/nav/ssm.xml b/web/html/nav/ssm.xml
index 50ba162..12f464b 100644
--- a/web/html/nav/ssm.xml
+++ b/web/html/nav/ssm.xml
@@ -2,7 +2,7 @@
<rhn-navi-tree label="ssm" invisible="1" title-depth="1">
<rhn-tab name="Overview" url="/rhn/ssm/index.do" />
<rhn-tab name="Systems">
- <rhn-tab-url>/network/systems/ssm/system_list.pxt</rhn-tab-url>
+ <rhn-tab-url>/rhn/systems/ssm/ListSystems.do</rhn-tab-url>
</rhn-tab>
<rhn-tab name="Errata"
13 years, 7 months
2 commits - java/code
by Colin Coe
java/code/src/com/redhat/rhn/frontend/action/ssm/MigrateSystemsAction.java | 110 ++++++++++
java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml | 9
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 36 ++-
java/code/webapp/WEB-INF/pages/ssm/ssmindex.jsp | 1
java/code/webapp/WEB-INF/pages/ssm/systems/migrate.jsp | 61 +++++
java/code/webapp/WEB-INF/pages/ssm/systems/misc/index.jsp | 14 +
java/code/webapp/WEB-INF/struts-config.xml | 18 +
7 files changed, 244 insertions(+), 5 deletions(-)
New commits:
commit 17d8750a4ada5f742c748ec8ab272cb34c97db58
Author: Colin Coe <coec(a)war.coesta.com>
Date: Sat Oct 2 19:04:20 2010 +0800
Fix SSM Index regression
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
index 4b558fc..beb458f 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
@@ -5441,10 +5441,7 @@ value for this entitlement, excluding the default organization's consumption.</s
</trans-unit>
<trans-unit id="ssm.overview.misc.updateprofiles">
- <source>Update <a
- href="/network/systems/ssm/misc/index.pxt#profiles">hardware/package
- profiles</a> and <a href="/network/systems/ssm/misc/index.pxt#sysprefs">system
- preferences</a></source>
+ <source>Update <a href="/rhn/systems/ssm/misc/Index.do#profiles">hardware/package profiles</a> and <a href="/rhn/systems/ssm/misc/Index.do#sysprefs">system preferences</a></source>
</trans-unit>
<trans-unit id="ssm.overview.misc.customvalues">
@@ -5452,12 +5449,15 @@ value for this entitlement, excluding the default organization's consumption.</s
</trans-unit>
<trans-unit id="ssm.overview.misc.entitlements">
- <source><a href="/network/systems/ssm/misc/index.pxt#entitle">Add or Remove</a> Add-On Entitlements</source>
+ <source><a href="/rhn/systems/ssm/misc/Index.do#entitle">Add or Remove</a> Add-On Entitlements</source>
</trans-unit>
<trans-unit id="ssm.overview.misc.deletereboot">
<source><a href="/rhn/systems/ssm/DeleteConfirm.do">Delete</a> / <a href="/network/systems/ssm/misc/reboot_systems.pxt?pxt:trap=rhn:empty_set&set_label=target_systems">Reboot</a> systems</source>
</trans-unit>
+ <trans-unit id="ssm.overview.misc.migrate">
+ <source><a href="/rhn/systems/ssm/misc/Index.do#migrate">Migrate</a> systems to another organization</source>
+ </trans-unit>
</group>
<!-- SSM System Migration -->
diff --git a/java/code/webapp/WEB-INF/pages/ssm/ssmindex.jsp b/java/code/webapp/WEB-INF/pages/ssm/ssmindex.jsp
index d526a85..0263d57 100644
--- a/java/code/webapp/WEB-INF/pages/ssm/ssmindex.jsp
+++ b/java/code/webapp/WEB-INF/pages/ssm/ssmindex.jsp
@@ -74,6 +74,7 @@
<bean:message key="ssm.overview.misc.customvalues"/><br />
<bean:message key="ssm.overview.misc.entitlements"/><br />
<bean:message key="ssm.overview.misc.deletereboot"/><br />
+ <bean:message key="ssm.overview.misc.migrate"/><br />
</p>
</td>
</tr>
commit af85ce96038d40b429dae361df63b557a00345f2
Author: Colin Coe <coec(a)war.coesta.com>
Date: Sat Oct 2 18:40:48 2010 +0800
SSM System migration
diff --git a/java/code/src/com/redhat/rhn/frontend/action/ssm/MigrateSystemsAction.java b/java/code/src/com/redhat/rhn/frontend/action/ssm/MigrateSystemsAction.java
new file mode 100644
index 0000000..eebf713
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/frontend/action/ssm/MigrateSystemsAction.java
@@ -0,0 +1,110 @@
+/**
+ * Copyright (c) 2010 Red Hat, Inc.
+ *
+ * This software is licensed to you under the GNU General Public License,
+ * version 2 (GPLv2). There is NO WARRANTY for this software, express or
+ * implied, including the implied warranties of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+ * along with this software; if not, see
+ * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+ *
+ * Red Hat trademarks are not licensed under GPLv2. No permission is
+ * granted to use or replicate Red Hat trademarks that are incorporated
+ * in this software or its documentation.
+ */
+package com.redhat.rhn.frontend.action.ssm;
+
+import com.redhat.rhn.domain.org.Org;
+import com.redhat.rhn.domain.org.OrgFactory;
+import com.redhat.rhn.domain.rhnset.RhnSet;
+import com.redhat.rhn.domain.rhnset.RhnSetElement;
+import com.redhat.rhn.domain.server.Server;
+import com.redhat.rhn.domain.user.User;
+import com.redhat.rhn.frontend.struts.RequestContext;
+import com.redhat.rhn.frontend.struts.RhnAction;
+import com.redhat.rhn.frontend.taglibs.list.helper.ListHelper;
+import com.redhat.rhn.frontend.taglibs.list.helper.Listable;
+import com.redhat.rhn.manager.org.MigrationManager;
+import com.redhat.rhn.manager.rhnset.RhnSetDecl;
+import com.redhat.rhn.manager.system.SystemManager;
+
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.action.ActionForward;
+import org.apache.struts.action.ActionMapping;
+import org.apache.struts.action.DynaActionForm;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+
+/**
+ * MigrateSystemsAction
+ * @version $Rev$
+ */
+public class MigrateSystemsAction extends RhnAction implements Listable {
+ /**
+ *
+ * {@inheritDoc}
+ */
+ public ActionForward execute(ActionMapping mapping,
+ ActionForm formIn,
+ HttpServletRequest request,
+ HttpServletResponse response) {
+ RequestContext context = new RequestContext(request);
+
+ RequestContext rctx = new RequestContext(request);
+ User user = rctx.getLoggedInUser();
+
+ if (context.wasDispatched("ssm.migrate.systems.confirmbutton")) {
+ RhnSet set = RhnSetDecl.SYSTEMS.get(context.getLoggedInUser());
+ List<Server> serverList = new ArrayList<Server>();
+
+ Iterator it = set.iterator();
+ while (it.hasNext()) {
+ Long sid = ((RhnSetElement)it.next()).getElement();
+ Server server = SystemManager.lookupByIdAndUser(sid, user);
+ serverList.add(server);
+ }
+
+ DynaActionForm daForm = (DynaActionForm)formIn;
+
+ if (daForm.getString("org").equals("")) {
+ getStrutsDelegate().saveMessage("ssm.migrate.systems.orgnone",
+ context.getRequest());
+ }
+ else {
+ Org toOrg = OrgFactory.lookupByName(daForm.getString("org"));
+ MigrationManager.migrateServers(user, toOrg, serverList);
+
+ // Empty the set as we no longer have access to these systems
+ RhnSetDecl.SYSTEMS.clear(user);
+
+ getStrutsDelegate().saveMessage("ssm.migrate.systems.confirmmessage",
+ context.getRequest());
+ }
+ return mapping.findForward("confirm");
+ }
+
+ request.setAttribute("trustedOrgs", user.getOrg().getTrustedOrgs().size());
+ request.setAttribute("orgs", user.getOrg().getTrustedOrgs());
+ ListHelper helper = new ListHelper(this, request);
+ helper.setListName("systemList");
+ helper.setDataSetName("pageList");
+ helper.execute();
+
+ return mapping.findForward("default");
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public List getResult(RequestContext contextIn) {
+ return SystemManager.inSet(contextIn.getLoggedInUser(),
+ RhnSetDecl.SYSTEMS.getLabel());
+ }
+
+}
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml b/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml
index ed46f4d..158bbf5 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml
@@ -8685,6 +8685,15 @@ Follow this url to see the full list of inactive systems:
<trans-unit id="ssm.package.delete.operationname">
<source>Server Delete</source>
</trans-unit>
+ <trans-unit id="ssm.migrate.systems.confirmmessage">
+ <source>Systems Migrated</source>
+ </trans-unit>
+ <trans-unit id="ssm.migrate.systems.confirmbutton">
+ <source>Migrate Systems</source>
+ </trans-unit>
+ <trans-unit id="ssm.migrate.systems.orgnone">
+ <source>This organisation has no trusted organisations. Systems can only be migrated between organisations with defined trusts.</source>
+ </trans-unit>
<trans-unit id="channel.manage.merge.finished">
<source>{0} Package(s) have been added and {1} Package(s) have been removed from the channel.</source>
</trans-unit>
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
index e8f485d..4b558fc 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
@@ -5460,6 +5460,22 @@ value for this entitlement, excluding the default organization's consumption.</s
</trans-unit>
</group>
+<!-- SSM System Migration -->
+ <group>
+ <context-group name="ctx">
+ <context context-type="sourcefile">/rhn/systems/ssm/MigrateSystems.do</context>
+ </context-group>
+ <trans-unit id="ssm.migrate.systems.header">
+ <source>Migrate Systems</source>
+ </trans-unit>
+ <trans-unit id="ssm.migrate.systems.summary">
+ <source>Migrate the selected systems to the selected organisation. If the operation is successful, the systems will no longer be visible in this organisation.</source>
+ </trans-unit>
+ <trans-unit id="ssm.migrate.systems.org">
+ <source>Target Organisation</source>
+ </trans-unit>
+ </group>
+
<!-- SSM System list-->
<group>
<context-group name="ctx">
@@ -5542,6 +5558,16 @@ value for this entitlement, excluding the default organization's consumption.</s
<source>Update Software Profile</source>
</trans-unit>
+ <trans-unit id="ssm.misc.index.migrate.header">
+ <source>Migrate Systems</source>
+ </trans-unit>
+ <trans-unit id="ssm.misc.index.migrate.summary">
+ <source>Migrate multiple systems from the current organistation to another (trusted) organisation in a single action. The migrated systems will no longer be visible in the original organisation.</source>
+ </trans-unit>
+ <trans-unit id="ssm.misc.index.migrate.migrate">
+ <source>Migrate Systems to another organisation</source>
+ </trans-unit>
+
<trans-unit id="ssm.misc.index.csi.header">
<source>Custom System Information</source>
</trans-unit>
diff --git a/java/code/webapp/WEB-INF/pages/ssm/systems/migrate.jsp b/java/code/webapp/WEB-INF/pages/ssm/systems/migrate.jsp
new file mode 100644
index 0000000..75482dc
--- /dev/null
+++ b/java/code/webapp/WEB-INF/pages/ssm/systems/migrate.jsp
@@ -0,0 +1,61 @@
+<%@ taglib uri="http://rhn.redhat.com/rhn" prefix="rhn" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
+<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
+<%@ taglib uri="http://rhn.redhat.com/tags/list" prefix="rl" %>
+
+<html:xhtml/>
+<html>
+<body>
+<%@ include file="/WEB-INF/pages/common/fragments/ssm/header.jspf" %>
+<h2>
+ <bean:message key="ssm.migrate.systems.header" />
+</h2>
+<p><bean:message key="ssm.migrate.systems.summary" /></p>
+<c:set var="notSelectable" value="true"/>
+<c:set var="showLastCheckin" value="true"/>
+<c:set var="noPackages" value="true"/>
+<c:set var="noErrata" value="true"/>
+
+ <c:choose>
+ <c:when test="${trustedOrgs == 0}">
+ <strong><bean:message key="ssm.migrate.systems.notrust"/></strong>
+ </c:when>
+ <c:otherwise>
+ <html:form method="post" action="/systems/ssm/MigrateSystems.do">
+ <table class="details">
+ <tr>
+ <th>
+ <bean:message key="ssm.migrate.systems.org"/>
+ </th>
+ <td>
+ <html:select property="org">
+ <html:option value="">-- None --</html:option>
+ <c:forEach var="o" items="${orgs}">
+ <html:option value="${o.name}">${o.name}</html:option>
+ </c:forEach>
+ </html:select>
+ </td>
+ <td align="right">
+ <input type ="submit" name="dispatch" value="${rhn:localize('ssm.migrate.systems.confirmbutton')}"/>
+ </td>
+ </tr>
+ </table>
+ </html:form>
+ </c:otherwise>
+ </c:choose>
+
+<rl:listset name="systemListSet" legend="system">
+ <%@ include file="/WEB-INF/pages/common/fragments/systems/system_listdisplay.jspf" %>
+<%--
+ <div align="right">
+ <hr />
+ <input type ="submit" name="dispatch" value="${rhn:localize('ssm.migrate.systems.confirmbutton')}"/>
+ </div>
+--%>
+</rl:listset>
+
+
+</body>
+</html>
+
diff --git a/java/code/webapp/WEB-INF/pages/ssm/systems/misc/index.jsp b/java/code/webapp/WEB-INF/pages/ssm/systems/misc/index.jsp
index d4a6b12..e354f9a 100644
--- a/java/code/webapp/WEB-INF/pages/ssm/systems/misc/index.jsp
+++ b/java/code/webapp/WEB-INF/pages/ssm/systems/misc/index.jsp
@@ -20,6 +20,20 @@
</ul>
<br />
+<a id="migrate"> </a>
+<h2><bean:message key="ssm.misc.index.migrate.header"/></h2>
+
+<div class="page-summary">
+<p><bean:message key="ssm.misc.index.migrate.summary"/></p>
+
+</div>
+
+<ul>
+ <li><a href="/rhn/systems/ssm/MigrateSystems.do"><bean:message key="ssm.misc.index.migrate.migrate"/></a></li>
+</ul>
+
+<br />
+
<a id="profiles"> </a>
<h2><bean:message key="ssm.misc.index.csi.header"/></h2>
<div class="page-summary">
diff --git a/java/code/webapp/WEB-INF/struts-config.xml b/java/code/webapp/WEB-INF/struts-config.xml
index d9473eb..dfd0fee 100644
--- a/java/code/webapp/WEB-INF/struts-config.xml
+++ b/java/code/webapp/WEB-INF/struts-config.xml
@@ -1028,6 +1028,12 @@
<form-property name="submitted" type="java.lang.Boolean"/>
</form-bean>
+ <form-bean name="ssmMigrateForm"
+ type="com.redhat.rhn.frontend.struts.ScrubbingDynaActionForm" >
+ <form-property name="org" type="java.lang.String"/>
+ <form-property name="submitted" type="java.lang.Boolean"/>
+ </form-bean>
+
<form-bean name="targetSystemsForm"
type="com.redhat.rhn.frontend.struts.ScrubbingDynaActionForm" >
<form-property name="use_date" type="java.lang.Boolean"/>
@@ -3107,6 +3113,18 @@
path="/systems/ssm/misc/Index.do" redirect="true"/>
</action>
+ <action path="/systems/ssm/MigrateSystems"
+ scope="request"
+ input="/WEB-INF/pages/ssm/systems/ssmdeleteconfirm.jsp"
+ type="com.redhat.rhn.frontend.action.ssm.MigrateSystemsAction"
+ name="ssmMigrateForm"
+ className="com.redhat.rhn.frontend.struts.RhnActionMapping">
+ <forward name="default"
+ path="/WEB-INF/pages/ssm/systems/migrate.jsp"/>
+ <forward name="confirm"
+ path="/systems/Overview.do" redirect="true"/>
+ </action>
+
<!--System Details Configuration -->
<action path="/systems/details/configuration/Overview"
scope="request"
13 years, 7 months
2 commits - schema/spacewalk
by Lukas Zapletal
schema/spacewalk/oracle/views/rhnServerOverview.sql | 60 ------------------
schema/spacewalk/postgres/views/rhnServerOverview.sql | 24 ++++++-
2 files changed, 20 insertions(+), 64 deletions(-)
New commits:
commit 6c1acd8f84558af0f4121f95308366755d715c1e
Author: Lukas Zapletal <lzap+git(a)redhat.com>
Date: Fri Oct 1 14:07:59 2010 +0200
updated rhnServerOverview.sql for Postgres
diff --git a/schema/spacewalk/postgres/views/rhnServerOverview.sql b/schema/spacewalk/postgres/views/rhnServerOverview.sql
index 3eb2d0f..0afdd54 100644
--- a/schema/spacewalk/postgres/views/rhnServerOverview.sql
+++ b/schema/spacewalk/postgres/views/rhnServerOverview.sql
@@ -1,5 +1,4 @@
--- -- oracle equivalent source sha1 6582bbf3a236c11485b0d54b642b2793f49c1457
--- retrieved from ./1235117057/2510d6bed246794de798c9c9b00e8cd21d99a4dc/schema/spacewalk/rhnsat/views/rhnServerOverview.sql
+-- oracle equivalent source sha1 906e02f9fee6baee19a765099b3969238347cf8e
--
-- Copyright (c) 2008--2010 Red Hat, Inc.
--
@@ -33,6 +32,7 @@ rhnServerOverview
bug_errata,
enhancement_errata,
outdated_packages,
+ config_files_with_differences,
last_checkin_days_ago,
last_checkin,
pending_updates,
@@ -79,7 +79,24 @@ select
where
snpc.server_id = S.id
and p.id = snpc.package_id
- ),
+ ),
+ ( select count(*)
+ from rhnActionConfigRevision ACR
+ INNER JOIN rhnActionConfigRevisionResult ACRR on ACR.id = ACRR.action_config_revision_id
+ where ACR.server_id = S.id
+ and ACR.action_id = (
+ select MAX(rA.id)
+ from rhnAction rA
+ INNER JOIN rhnServerAction rSA on rSA.action_id = rA.id
+ INNER JOIN rhnActionStatus rAS on rAS.id = rSA.status
+ INNER JOIN rhnActionType rAT on rAT.id = rA.action_type
+ where rSA.server_id = S.id
+ and rAS.name in ('Completed', 'Failed')
+ and rAT.label = 'configfiles.diff'
+ )
+ and ACR.failure_id is null
+ and ACRR.result is not null
+ ),
( select current_timestamp - checkin from rhnServerInfo where server_id = S.id ),
( select TO_CHAR(checkin, 'YYYY-MM-DD HH24:MI:SS') from rhnServerInfo where server_id = S.id ),
( select count(1)
@@ -93,4 +110,3 @@ select
from
rhnServer S
;
-
commit 8bb5081c092e4fa6c963f10a17f7adbf2969a028
Author: Lukas Zapletal <lzap+git(a)redhat.com>
Date: Fri Oct 1 14:07:05 2010 +0200
oracle rhnServerOverview old revision log deletion
diff --git a/schema/spacewalk/oracle/views/rhnServerOverview.sql b/schema/spacewalk/oracle/views/rhnServerOverview.sql
index cd9d51f..f27d205 100644
--- a/schema/spacewalk/oracle/views/rhnServerOverview.sql
+++ b/schema/spacewalk/oracle/views/rhnServerOverview.sql
@@ -109,63 +109,3 @@ select
from
rhnServer S
/
-
-
---
--- Revision 1.21 2003/10/23 17:12:36 cturner
--- get locked state into rhnServerOverview
---
--- Revision 1.20 2002/11/14 20:26:31 cturner
--- I am a dumbass; it was not an id
---
--- Revision 1.19 2002/11/14 20:15:39 cturner
--- be consistent; server_arch_id not server_arch
---
--- Revision 1.18 2002/11/14 17:20:34 pjones
--- arch -> *_arch_id and archCompat changes
---
--- Revision 1.17 2002/06/03 18:35:07 cturner
--- fix for bug 58264
---
--- Revision 1.16 2001/12/03 18:35:56 cturner
--- fix view for odd case of same nvre in multiple channels for differing errata
---
--- Revision 1.15 2001/11/28 20:23:30 cturner
--- show last checkin on entitlement page, too
---
--- Revision 1.14 2001/10/28 04:28:13 cturner
--- moving towards hiding servergroups with a specific type, in favor of task-oriented lists.
---
--- Revision 1.13 2001/10/25 09:48:26 cturner
--- mods to server overview view
---
--- Revision 1.12 2001/08/09 23:47:54 cturner
--- push script changes
---
--- Revision 1.11 2001/07/31 00:17:40 cturner
--- fix for history table change
---
--- Revision 1.10 2001/07/28 23:30:55 cturner
--- outdated package column in server list... whew
---
--- Revision 1.9 2001/07/25 23:04:20 cturner
--- new column on rhnServerOverview -- whether the server is entitled
---
--- Revision 1.8 2001/07/07 13:03:39 cturner
--- better overview
---
--- Revision 1.7 2001/07/04 06:55:33 cturner
--- fixing broken server overview view. syntax errors.
---
--- Revision 1.6 2001/07/02 21:12:18 gafton
--- more formatting
---
--- Revision 1.5 2001/07/02 21:10:50 gafton
--- format so it fits on a damn page printout
---
--- Revision 1.4 2001/06/29 08:30:53 cturner
--- more underscore changes, plus switching from rhnUser to web_contact. may switch back later, but avoiding synonyms and such seems to make things cleaner
---
--- Revision 1.3 2001/06/27 02:05:25 gafton
--- add Log too
---
13 years, 7 months
10 commits - backend/common backend/rhn-conf backend/satellite_tools backend/spacewalk-backend.spec schema/spacewalk spacewalk/certs-tools
by Michael Mraka
backend/common/rhn_memusage.py | 5 -
backend/rhn-conf/rhn_server_satexport_internal.conf | 6 -
backend/satellite_tools/exporter/exportLib.py | 13 ---
backend/satellite_tools/exporter/exporter.py | 5 -
backend/spacewalk-backend.spec | 1
schema/spacewalk/common/tables/rhnSNPErrataQueue.sql | 32 --------
schema/spacewalk/common/tables/rhnSNPServerQueue.sql | 32 --------
schema/spacewalk/common/tables/tables.deps | 2
schema/spacewalk/oracle/procs/delete_server.sql | 1
schema/spacewalk/oracle/procs/procs.deps | 3
schema/spacewalk/oracle/procs/queue_errata.sql | 39 ----------
schema/spacewalk/postgres/procs/delete_server.sql | 1
schema/spacewalk/postgres/procs/procs.deps | 3
schema/spacewalk/postgres/procs/queue_errata.sql | 33 --------
schema/spacewalk/upgrade/spacewalk-schema-1.1-to-spacewalk-schema-1.2/040-queue_errata-drop.sql | 1
schema/spacewalk/upgrade/spacewalk-schema-1.1-to-spacewalk-schema-1.2/041-rhnSNPErrataQueue-drop.sql | 1
schema/spacewalk/upgrade/spacewalk-schema-1.1-to-spacewalk-schema-1.2/042-rhnSNPServerQueue-drop.sql | 1
spacewalk/certs-tools/timeLib.py | 29 -------
18 files changed, 5 insertions(+), 203 deletions(-)
New commits:
commit aae3436540db70f419e53f7f3248d8c78fca9e79
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Sep 27 13:25:17 2010 +0200
nobody knows what does _baroquenLog() mean, removing
diff --git a/spacewalk/certs-tools/timeLib.py b/spacewalk/certs-tools/timeLib.py
index 2d0ca9e..e13ae85 100644
--- a/spacewalk/certs-tools/timeLib.py
+++ b/spacewalk/certs-tools/timeLib.py
@@ -327,35 +327,6 @@ def _test():
print e
-def _baroquenLog():
- """
- >>> import time
- >>> nowtup = time.gmtime()
- >>> nowstr = time.strftime('%b %d %H:%M:%S %Y', nowtup)
- >>> nowstr
- 'Jun 19 00:09:58 2004'
- >>> nowsec = time.mktime(nowtup)-time.timezone
- >>> time.gmtime(nowsec)
- (2004, 6, 19, 0, 9, 58, 5, 171, 0)
- >>> nowsec
- 1087603798.0
- >>> nowtup, nowsec_ = time.gmtime(), time.time()
- >>> nowstr = time.strftime('%b %d %H:%M:%S %Y', nowtup)
- >>> nowstr
- 'Jun 19 00:19:05 2004'
- >>> nowsec = time.mktime(nowtup)-time.timezone
- >>> nowsec
- 1087604345.0
- >>> nowsec_
- 1087604345.4773369
- >>> oneyear = nowsec+(356*24*60*60)
- >>> tup = time.gmtime(oneyear)
- >>> time.strftime('%b %d %H:%M:%S %Y', nowtup)
- 'Jun 19 00:19:05 2004'
- >>> time.strftime('%b %d %H:%M:%S %Y', tup)
- 'Jun 10 00:19:05 2005'
- """
-
if __name__ == '__main__':
_test()
commit 393bbb2bba5d48c38d67a545ed376b6d5c7abc1d
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Sep 27 12:15:22 2010 +0200
validate_time() not used anywhere, removing dead code
diff --git a/backend/satellite_tools/exporter/exporter.py b/backend/satellite_tools/exporter/exporter.py
index 356710a..95b7083 100644
--- a/backend/satellite_tools/exporter/exporter.py
+++ b/backend/satellite_tools/exporter/exporter.py
@@ -474,10 +474,5 @@ def patch_url(url, scheme='http', path=None):
return urlparse.urlunparse((_scheme, netloc, _path, params, query,
fragment))
-def validate_time(s):
- if s is None:
- return None
- return rhnLib.timestamp(s)
-
if __name__ == '__main__':
sys.exit(main() or 0)
commit d0051f914e26114147fb71b121df1c5163c24bc8
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Sep 27 12:15:22 2010 +0200
errata_severity_cursor() not used anywhere, removing dead code
diff --git a/backend/satellite_tools/exporter/exportLib.py b/backend/satellite_tools/exporter/exportLib.py
index 6b5f7b7..88a709e 100644
--- a/backend/satellite_tools/exporter/exportLib.py
+++ b/backend/satellite_tools/exporter/exportLib.py
@@ -1605,19 +1605,6 @@ def _errata_cursor(errata_id, synopsis):
def errata_cursor(errata_id):
return _errata_cursor(errata_id, "e.synopsis,")
-def errata_severity_cursor(errata_id):
- # include severity into synopsis before
- # exporting to satellite.
- # Also ignore the first 17 characters in
- # the label(errata.sev.label.) from
- # rhnErrataSeverity table
- synopsis = """
- (select SUBSTR(label,18) || ':'
- from rhnErrataSeverity
- where id = e.severity_id) || e.synopsis synposis,
- """
- return _errata_cursor(errata_id, synopsis)
-
class ChannelProductsDumper(BaseDumper):
def set_iterator(self):
commit 992185a94681a64f96ea861ce0750e1035550619
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Sep 27 12:15:22 2010 +0200
_line_value() not used anywhere, removing dead code
diff --git a/backend/common/rhn_memusage.py b/backend/common/rhn_memusage.py
index a565186..4f4418b 100644
--- a/backend/common/rhn_memusage.py
+++ b/backend/common/rhn_memusage.py
@@ -28,8 +28,3 @@ def mem_usage():
dict[arr[0]] = arr[1]
return dict['Name'], dict['VmSize'], dict['VmRSS'], dict['VmData']
-def _line_value(line):
- arr = string.split(line, ':', 1)
- if len(arr) == 1:
- return None
- return string.strip(arr[1])
commit ee0328bab69c6d4c2eac8c4b86fc0e979dde6860
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Sep 23 14:13:39 2010 +0200
removed dead configuration file
diff --git a/backend/rhn-conf/rhn_server_satexport_internal.conf b/backend/rhn-conf/rhn_server_satexport_internal.conf
deleted file mode 100644
index 9805602..0000000
--- a/backend/rhn-conf/rhn_server_satexport_internal.conf
+++ /dev/null
@@ -1,6 +0,0 @@
-# ** DO NOT EDIT **
-# RHN config for requests traveling through the /SAT-DUMP-INTERNAL receiver
-#
-
-log_file = /var/log/rhn/rhn_sat_export_internal.log
-
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 35ca032..b22604c 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -541,7 +541,6 @@ rm -f %{rhnconf}/rhnSecret.py*
# config files
%attr(644,root,apache) %config %{httpdconf}/rhn/spacewalk-backend-sat-dump-internal.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/spacewalk-backend-iss-export
-%attr(644,root,apache) %{rhnconf}/default/rhn_server_satexport_internal.conf
%files libs
commit e2bf04dcec4a078b1f431f7c54868b992cbee5cb
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Aug 18 10:50:48 2010 +0200
added upgrade script for queue_errata, rhnSNPErrataQueue and rhnSNPServerQueue removal
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.1-to-spacewalk-schema-1.2/040-queue_errata-drop.sql b/schema/spacewalk/upgrade/spacewalk-schema-1.1-to-spacewalk-schema-1.2/040-queue_errata-drop.sql
new file mode 100644
index 0000000..52ab90c
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.1-to-spacewalk-schema-1.2/040-queue_errata-drop.sql
@@ -0,0 +1 @@
+drop procedure queue_errata;
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.1-to-spacewalk-schema-1.2/041-rhnSNPErrataQueue-drop.sql b/schema/spacewalk/upgrade/spacewalk-schema-1.1-to-spacewalk-schema-1.2/041-rhnSNPErrataQueue-drop.sql
new file mode 100644
index 0000000..52843fc
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.1-to-spacewalk-schema-1.2/041-rhnSNPErrataQueue-drop.sql
@@ -0,0 +1 @@
+drop table rhnSNPErrataQueue;
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.1-to-spacewalk-schema-1.2/042-rhnSNPServerQueue-drop.sql b/schema/spacewalk/upgrade/spacewalk-schema-1.1-to-spacewalk-schema-1.2/042-rhnSNPServerQueue-drop.sql
new file mode 100644
index 0000000..781c283
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.1-to-spacewalk-schema-1.2/042-rhnSNPServerQueue-drop.sql
@@ -0,0 +1 @@
+drop table rhnSNPServerQueue;
commit 2a3a755ed052a0c3435a00d1e6c1c6c9c3ecc470
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Aug 18 10:44:37 2010 +0200
there were only deletes from rhnSNPServerQueue, no inserts/updates; thus removing as a dead code
diff --git a/schema/spacewalk/common/tables/rhnSNPServerQueue.sql b/schema/spacewalk/common/tables/rhnSNPServerQueue.sql
deleted file mode 100644
index b5ba23f..0000000
--- a/schema/spacewalk/common/tables/rhnSNPServerQueue.sql
+++ /dev/null
@@ -1,32 +0,0 @@
---
--- Copyright (c) 2008 Red Hat, Inc.
---
--- This software is licensed to you under the GNU General Public License,
--- version 2 (GPLv2). There is NO WARRANTY for this software, express or
--- implied, including the implied warranties of MERCHANTABILITY or FITNESS
--- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
--- along with this software; if not, see
--- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
---
--- Red Hat trademarks are not licensed under GPLv2. No permission is
--- granted to use or replicate Red Hat trademarks that are incorporated
--- in this software or its documentation.
---
-
-
-CREATE TABLE rhnSNPServerQueue
-(
- server_id NUMBER NOT NULL
- CONSTRAINT rhn_sec_np_sid_fk
- REFERENCES rhnServer (id),
- processed NUMBER
- DEFAULT (0) NOT NULL
-)
-ENABLE ROW MOVEMENT
-;
-
-CREATE INDEX rhn_sec_np_sid_idx
- ON rhnSNPServerQueue (server_id)
- TABLESPACE [[8m_tbs]]
- NOLOGGING;
-
diff --git a/schema/spacewalk/common/tables/tables.deps b/schema/spacewalk/common/tables/tables.deps
index 078a10e..bdac87c 100644
--- a/schema/spacewalk/common/tables/tables.deps
+++ b/schema/spacewalk/common/tables/tables.deps
@@ -194,7 +194,6 @@ rhnSnapshotConfigRevision :: rhnSnapshot rhnConfigRevision
rhnSnapshotPackage :: rhnSnapshot
rhnSnapshotServerGroup :: rhnServerGroup rhnSnapshot
rhnSnapshotTag :: rhnSnapshot rhnTag
-rhnSNPServerQueue :: rhnServer
rhnSolarisPackage :: rhnPackage
rhnSolarisPatch :: rhnPackage rhnSolarisPatchType
rhnSolarisPatchPackages :: rhnPackage rhnPackageNEVRA
diff --git a/schema/spacewalk/oracle/procs/delete_server.sql b/schema/spacewalk/oracle/procs/delete_server.sql
index 3d75909..76ad858 100644
--- a/schema/spacewalk/oracle/procs/delete_server.sql
+++ b/schema/spacewalk/oracle/procs/delete_server.sql
@@ -158,7 +158,6 @@ begin
delete from rhnProxyInfo where server_id = server_id_in;
delete from rhnRam where server_id = server_id_in;
delete from rhnRegToken where server_id = server_id_in;
- delete from rhnSNPServerQueue where server_id = server_id_in;
delete from rhnSatelliteChannelFamily where server_id = server_id_in;
delete from rhnSatelliteInfo where server_id = server_id_in;
-- this cascades to rhnActionConfigChannel and rhnActionConfigFileName
diff --git a/schema/spacewalk/oracle/procs/procs.deps b/schema/spacewalk/oracle/procs/procs.deps
index b1d34c3..c4e44fd 100644
--- a/schema/spacewalk/oracle/procs/procs.deps
+++ b/schema/spacewalk/oracle/procs/procs.deps
@@ -35,7 +35,7 @@ delete_server :: rhn_channel.pks rhn_config.pks \
rhnActionPackageRemovalFailure rhnCpu \
rhnDevice \
rhnProxyInfo rhnRam rhnRegToken \
- rhnSNPServerQueue rhnSatelliteChannelFamily \
+ rhnSatelliteChannelFamily \
rhnSatelliteInfo rhnServerAction \
rhnServerAction rhnServerActionPackageResult \
rhnServerActionScriptResult rhnServerChannel \
diff --git a/schema/spacewalk/postgres/procs/delete_server.sql b/schema/spacewalk/postgres/procs/delete_server.sql
index c4eeda0..df0bdd8 100644
--- a/schema/spacewalk/postgres/procs/delete_server.sql
+++ b/schema/spacewalk/postgres/procs/delete_server.sql
@@ -159,7 +159,6 @@ begin
delete from rhnProxyInfo where server_id = server_id_in;
delete from rhnRam where server_id = server_id_in;
delete from rhnRegToken where server_id = server_id_in;
- delete from rhnSNPServerQueue where server_id = server_id_in;
delete from rhnSatelliteChannelFamily where server_id = server_id_in;
delete from rhnSatelliteInfo where server_id = server_id_in;
-- this cascades to rhnActionConfigChannel and rhnActionConfigFileName
diff --git a/schema/spacewalk/postgres/procs/procs.deps b/schema/spacewalk/postgres/procs/procs.deps
index fcbd6e9..9db543c 100644
--- a/schema/spacewalk/postgres/procs/procs.deps
+++ b/schema/spacewalk/postgres/procs/procs.deps
@@ -35,7 +35,7 @@ delete_server :: rhn_channel.pks rhn_config.pks \
rhnActionPackageRemovalFailure rhnCpu \
rhnDevice \
rhnProxyInfo rhnRam rhnRegToken \
- rhnSNPServerQueue rhnSatelliteChannelFamily \
+ rhnSatelliteChannelFamily \
rhnSatelliteInfo rhnServerAction \
rhnServerAction rhnServerActionPackageResult \
rhnServerActionScriptResult rhnServerChannel \
commit 21e92eef62158e04bd708797e020e8abeb8b9918
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Aug 18 10:40:11 2010 +0200
after queue_errata() removal rhnSNPErrataQueue not used anymore
diff --git a/schema/spacewalk/common/tables/rhnSNPErrataQueue.sql b/schema/spacewalk/common/tables/rhnSNPErrataQueue.sql
deleted file mode 100644
index 830f3aa..0000000
--- a/schema/spacewalk/common/tables/rhnSNPErrataQueue.sql
+++ /dev/null
@@ -1,32 +0,0 @@
---
--- Copyright (c) 2008 Red Hat, Inc.
---
--- This software is licensed to you under the GNU General Public License,
--- version 2 (GPLv2). There is NO WARRANTY for this software, express or
--- implied, including the implied warranties of MERCHANTABILITY or FITNESS
--- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
--- along with this software; if not, see
--- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
---
--- Red Hat trademarks are not licensed under GPLv2. No permission is
--- granted to use or replicate Red Hat trademarks that are incorporated
--- in this software or its documentation.
---
-
-
-CREATE TABLE rhnSNPErrataQueue
-(
- errata_id NUMBER NOT NULL
- CONSTRAINT rhn_snpErrQueue_eid_fk
- REFERENCES rhnErrata (id)
- ON DELETE CASCADE,
- processed NUMBER
- DEFAULT (0) NOT NULL
-)
-ENABLE ROW MOVEMENT
-;
-
-CREATE UNIQUE INDEX rhn_snpErrQueue_eid_uq
- ON rhnSNPErrataQueue (errata_id)
- TABLESPACE [[64k_tbs]];
-
diff --git a/schema/spacewalk/common/tables/tables.deps b/schema/spacewalk/common/tables/tables.deps
index f9e6889..078a10e 100644
--- a/schema/spacewalk/common/tables/tables.deps
+++ b/schema/spacewalk/common/tables/tables.deps
@@ -194,7 +194,6 @@ rhnSnapshotConfigRevision :: rhnSnapshot rhnConfigRevision
rhnSnapshotPackage :: rhnSnapshot
rhnSnapshotServerGroup :: rhnServerGroup rhnSnapshot
rhnSnapshotTag :: rhnSnapshot rhnTag
-rhnSNPErrataQueue :: rhnErrata
rhnSNPServerQueue :: rhnServer
rhnSolarisPackage :: rhnPackage
rhnSolarisPatch :: rhnPackage rhnSolarisPatchType
commit 72890387553635cd8726d57dda712bdb1d646eed
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Aug 18 10:37:14 2010 +0200
removing read queue_errata() from deps
diff --git a/schema/spacewalk/oracle/procs/procs.deps b/schema/spacewalk/oracle/procs/procs.deps
index f52307e..b1d34c3 100644
--- a/schema/spacewalk/oracle/procs/procs.deps
+++ b/schema/spacewalk/oracle/procs/procs.deps
@@ -105,7 +105,6 @@ name_join :: user_group_name_t
new_user_postop :: web_contact rhnUserGroupType rhnUserGroup \
rhnUserGroupMembers
pxt_session_cleanup :: PXTSessions
-queue_errata :: rhnSNPErrataQueue
queue_server :: rhnServerNeededPackageCache rhnTaskQueue \
rhnServerNeededPackageView rhnServer \
rhnServerNeededErrataCache rhnServerNeededView
diff --git a/schema/spacewalk/postgres/procs/procs.deps b/schema/spacewalk/postgres/procs/procs.deps
index cdb7d68..fcbd6e9 100644
--- a/schema/spacewalk/postgres/procs/procs.deps
+++ b/schema/spacewalk/postgres/procs/procs.deps
@@ -103,7 +103,6 @@ lookup_virt_sub_level :: rhnVirtSubLevel
new_user_postop :: web_contact rhnUserGroupType rhnUserGroup \
rhnUserGroupMembers
pxt_session_cleanup :: PXTSessions
-queue_errata :: rhnSNPErrataQueue
queue_server :: rhnServerNeededPackageCache rhnTaskQueue \
rhnServerNeededPackageView rhnServer \
rhnServerNeededErrataCache rhnServerNeededView
commit 28cd070d23f9c7f63e5dd2eda022c2856eff8528
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Aug 18 10:35:46 2010 +0200
queue_errata() not called anywhere; removing dead procedure
diff --git a/schema/spacewalk/oracle/procs/queue_errata.sql b/schema/spacewalk/oracle/procs/queue_errata.sql
deleted file mode 100644
index 88a5ad5..0000000
--- a/schema/spacewalk/oracle/procs/queue_errata.sql
+++ /dev/null
@@ -1,39 +0,0 @@
---
--- Copyright (c) 2008 Red Hat, Inc.
---
--- This software is licensed to you under the GNU General Public License,
--- version 2 (GPLv2). There is NO WARRANTY for this software, express or
--- implied, including the implied warranties of MERCHANTABILITY or FITNESS
--- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
--- along with this software; if not, see
--- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
---
--- Red Hat trademarks are not licensed under GPLv2. No permission is
--- granted to use or replicate Red Hat trademarks that are incorporated
--- in this software or its documentation.
---
---
---
---
-
--- the next two views are basically the same. the first, though, has an outer join to
--- the errata stuff, in case there are packages the server needs that haven't been
--- errata'd (ie, the fringe case)
-
-CREATE OR REPLACE PROCEDURE
-queue_errata(errata_id_in IN NUMBER)
-IS
-BEGIN
- INSERT INTO rhnSNPErrataQueue (errata_id) VALUES (errata_id_in);
-EXCEPTION
- WHEN DUP_VAL_ON_INDEX THEN
- UPDATE rhnSNPErrataQueue SET processed = 0 WHERE errata_id = errata_id_in;
-END;
-/
-SHOW ERRORS
-
---
--- Revision 1.2 2002/05/13 22:53:38 pjones
--- cvs id/log
--- some (note enough) readability fixes
---
diff --git a/schema/spacewalk/postgres/procs/queue_errata.sql b/schema/spacewalk/postgres/procs/queue_errata.sql
deleted file mode 100644
index 6834205..0000000
--- a/schema/spacewalk/postgres/procs/queue_errata.sql
+++ /dev/null
@@ -1,33 +0,0 @@
--- oracle equivalent source sha1 5dbb1860b79db25997d633002b2bfc47ef469f4e
--- retrieved from ./1235013416/07c0bfbb6902a98d09f8a41896bd55900645af6b/schema/spacewalk/rhnsat/procs/queue_errata.sql
---
--- Copyright (c) 2008--2010 Red Hat, Inc.
---
--- This software is licensed to you under the GNU General Public License,
--- version 2 (GPLv2). There is NO WARRANTY for this software, express or
--- implied, including the implied warranties of MERCHANTABILITY or FITNESS
--- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
--- along with this software; if not, see
--- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
---
--- Red Hat trademarks are not licensed under GPLv2. No permission is
--- granted to use or replicate Red Hat trademarks that are incorporated
--- in this software or its documentation.
---
---
---
---
-
-CREATE OR REPLACE function
-queue_errata(errata_id_in IN numeric)
-returns void
-AS
-$$
-BEGIN
- INSERT INTO rhnSNPErrataQueue (errata_id) VALUES (errata_id_in);
-EXCEPTION
- WHEN UNIQUE_VIOLATION THEN
- UPDATE rhnSNPErrataQueue SET processed = 0 WHERE errata_id = errata_id_in;
-END;
-$$ language plpgsql;
-
13 years, 7 months