client/rhel rel-eng/packages
by Šimon Lukašík
client/rhel/spacewalk-oscap/spacewalk-oscap.spec | 5 ++++-
rel-eng/packages/spacewalk-oscap | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit dd1e84d8063c6c6816c033b13242095767ce98fd
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Wed Feb 29 15:47:18 2012 +0100
Automatic commit of package [spacewalk-oscap] release [0.0.4-1].
diff --git a/client/rhel/spacewalk-oscap/spacewalk-oscap.spec b/client/rhel/spacewalk-oscap/spacewalk-oscap.spec
index df7c204..3e3e75f 100644
--- a/client/rhel/spacewalk-oscap/spacewalk-oscap.spec
+++ b/client/rhel/spacewalk-oscap/spacewalk-oscap.spec
@@ -1,5 +1,5 @@
Name: spacewalk-oscap
-Version: 0.0.3
+Version: 0.0.4
Release: 1%{?dist}
Summary: OpenSCAP plug-in for rhn-check
@@ -43,6 +43,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Wed Feb 29 2012 Simon Lukasik <slukasik(a)redhat.com> 0.0.4-1
+- Send capabilities to server. (slukasik(a)redhat.com)
+
* Tue Feb 28 2012 Simon Lukasik <slukasik(a)redhat.com> 0.0.3-1
- Do not unlink file, tempfile will do that automatically.
(slukasik(a)redhat.com)
diff --git a/rel-eng/packages/spacewalk-oscap b/rel-eng/packages/spacewalk-oscap
index 86a1b61..a8582ba 100644
--- a/rel-eng/packages/spacewalk-oscap
+++ b/rel-eng/packages/spacewalk-oscap
@@ -1 +1 @@
-0.0.3-1 client/rhel/spacewalk-oscap/
+0.0.4-1 client/rhel/spacewalk-oscap/
12 years, 2 months
client/rhel
by Šimon Lukašík
client/rhel/spacewalk-oscap/Makefile.spacewalk-oscap | 5 ++++-
client/rhel/spacewalk-oscap/scap | 1 +
client/rhel/spacewalk-oscap/spacewalk-oscap.spec | 1 +
3 files changed, 6 insertions(+), 1 deletion(-)
New commits:
commit 3b5e0137817249a99f60d9ddd15b3ab4602b8a45
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Wed Feb 29 15:40:15 2012 +0100
Send capabilities to server.
diff --git a/client/rhel/spacewalk-oscap/Makefile.spacewalk-oscap b/client/rhel/spacewalk-oscap/Makefile.spacewalk-oscap
index cbb8d72..0aa0897 100644
--- a/client/rhel/spacewalk-oscap/Makefile.spacewalk-oscap
+++ b/client/rhel/spacewalk-oscap/Makefile.spacewalk-oscap
@@ -4,11 +4,13 @@
ACTIONS = scap
PYFILES = $(addsuffix .py, $(ACTIONS)) $(addsuffix .pyc, $(ACTIONS))
XSLT = xccdf-resume.xslt
+CAPABILITY = scap
OBJECTS = $(PYFILES) $(XSLT)
PREFIX ?=
ACTIONDIR = $(PREFIX)/usr/share/rhn/actions
XSLTDIR = $(PREFIX)/usr/share/openscap/xsl
+CAPSDIR = $(PREFIX)/etc/sysconfig/rhn/clientCaps.d
INSTALL = /usr/bin/install -c
FILE = -m 644
DIR = -m 755 --verbose -d
@@ -20,9 +22,10 @@ all: $(OBJECTS)
python -c "import py_compile; py_compile.compile('$<')"
install: all
- $(INSTALL) $(DIR) $(ACTIONDIR) $(XSLTDIR)
+ $(INSTALL) $(DIR) $(ACTIONDIR) $(XSLTDIR) $(CAPSDIR)
$(INSTALL) $(FILE) $(PYFILES) $(ACTIONDIR)
$(INSTALL) $(FILE) $(XSLT) $(XSLTDIR)
+ $(INSTALL) $(FILE) $(CAPABILITY) $(CAPSDIR)
clean:
@rm -rf *.pyc *~ .*~
diff --git a/client/rhel/spacewalk-oscap/scap b/client/rhel/spacewalk-oscap/scap
new file mode 100644
index 0000000..7a2f96c
--- /dev/null
+++ b/client/rhel/spacewalk-oscap/scap
@@ -0,0 +1 @@
+scap.xccdf_eval(1)=1
diff --git a/client/rhel/spacewalk-oscap/spacewalk-oscap.spec b/client/rhel/spacewalk-oscap/spacewalk-oscap.spec
index a65b9dc..df7c204 100644
--- a/client/rhel/spacewalk-oscap/spacewalk-oscap.spec
+++ b/client/rhel/spacewalk-oscap/spacewalk-oscap.spec
@@ -37,6 +37,7 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
+%config /etc/sysconfig/rhn/clientCaps.d/scap
%{_datadir}/rhn/actions/scap.*
%{_datadir}/openscap/xsl/xccdf-resume.xslt
12 years, 2 months
3 commits - schema/spacewalk
by Milan Zazrivec
schema/spacewalk/oracle/procs/insert_transaction_package.sql | 30 ++
schema/spacewalk/oracle/procs/lookup_transaction_package.sql | 122 ++++------
schema/spacewalk/oracle/procs/procs.deps | 4
schema/spacewalk/postgres/procs/insert_transaction_package.sql | 2
schema/spacewalk/postgres/procs/lookup_transaction_package.sql | 111 ++++-----
schema/spacewalk/postgres/procs/procs.deps | 3
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/105-lookup_transaction_package.sql.oracle | 76 ++++++
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/105-lookup_transaction_package.sql.postgresql | 67 +++++
8 files changed, 294 insertions(+), 121 deletions(-)
New commits:
commit 264dd7c1cd60e51e508db74fcbeb2dce797976e5
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Feb 29 15:40:44 2012 +0100
lookup_transaction_package: schema upgrade
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/105-lookup_transaction_package.sql.oracle b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/105-lookup_transaction_package.sql.oracle
new file mode 100644
index 0000000..8baed87
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/105-lookup_transaction_package.sql.oracle
@@ -0,0 +1,76 @@
+create or replace function insert_transaction_package(
+ o_id in number,
+ n_id in number,
+ e_id in number,
+ p_arch_id in number)
+return number
+is
+ pragma autonomous_transaction;
+ tp_id number;
+begin
+ insert into rhnTransactionPackage (id, operation, name_id, evr_id, package_arch_id)
+ values (rhn_transpack_id_seq.nextval, o_id, n_id, e_id, p_arch_id) returning id into tp_id;
+ commit;
+ return tp_id;
+end;
+/
+show errors
+
+create or replace function
+lookup_transaction_package(
+ o_in in varchar2,
+ n_in in varchar2,
+ e_in in varchar2,
+ v_in in varchar2,
+ r_in in varchar2,
+ a_in in varchar2)
+return number
+is
+ pragma autonomous_transaction;
+ o_id number;
+ n_id number;
+ e_id number;
+ p_arch_id number;
+ tp_id number;
+begin
+ begin
+ select id
+ into o_id
+ from rhnTransactionOperation
+ where label = o_in;
+ exception when no_data_found then
+ rhn_exception.raise_exception('invalid_transaction_operation');
+ end;
+
+ n_id := lookup_package_name(n_in);
+ e_id := lookup_evr(e_in, v_in, r_in);
+ p_arch_id := null;
+
+ if a_in is not null then
+ p_arch_id := lookup_package_arch(a_in);
+ end if;
+
+ select id
+ into tp_id
+ from rhnTransactionPackage
+ where operation = o_id and
+ name_id = n_id and
+ evr_id = e_id and
+ (package_arch_id = p_arch_id or (p_arch_id is null and package_arch_id is null));
+ return tp_id;
+exception when no_data_found then
+ begin
+ tp_id := insert_transaction_package(o_id, n_id, e_id, p_arch_id);
+ exception when dup_val_on_index then
+ select id
+ into tp_id
+ from rhnTransactionPackage
+ where operation = o_id and
+ name_id = n_id and
+ evr_id = e_id and
+ (package_arch_id = p_arch_id or (p_arch_id is null and package_arch_id is null));
+ end;
+ return tp_id;
+end;
+/
+show errors
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/105-lookup_transaction_package.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/105-lookup_transaction_package.sql.postgresql
new file mode 100644
index 0000000..de8acfb
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/105-lookup_transaction_package.sql.postgresql
@@ -0,0 +1,67 @@
+-- oracle equivalent source sha1 95bcebe5c82f6192aff713976e6b77cffbba54c3
+
+create or replace function
+lookup_transaction_package(
+ o_in in varchar,
+ n_in in varchar,
+ e_in in varchar,
+ v_in in varchar,
+ r_in in varchar,
+ a_in in varchar)
+returns numeric
+as
+$$
+declare
+ o_id numeric;
+ n_id numeric;
+ e_id numeric;
+ p_arch_id numeric;
+ tp_id numeric;
+begin
+ select id
+ into o_id
+ from rhnTransactionOperation
+ where label = o_in;
+
+ if not found then
+ perform rhn_exception.raise_exception('invalid_transaction_operation');
+ end if;
+
+ n_id := lookup_package_name(n_in);
+ e_id := lookup_evr(e_in, v_in, r_in);
+ p_arch_id := null;
+
+ if a_in is not null then
+ p_arch_id := lookup_package_arch(a_in);
+ end if;
+
+ select id
+ into tp_id
+ from rhnTransactionPackage
+ where operation = o_id and
+ name_id = n_id and
+ evr_id = e_id and
+ (package_arch_id = p_arch_id or (p_arch_id is null and package_arch_id is null));
+
+ if not found then
+ tp_id := nextval('rhn_transpack_id_seq');
+ begin
+ perform pg_dblink_exec(
+ 'insert into rhnTransactionPackage (id, operation, name_id, evr_id, package_arch_id)' ||
+ ' values (' || tp_id || ', ' || o_id || ', ' || n_id || ', ' || e_id ||
+ ', ' || ', ' || p_arch_id || ')');
+ exception when unique_violation then
+ select id
+ into strict tp_id
+ from rhnTransactionPackage
+ where operation = o_id and
+ name_id = n_id and
+ evr_id = e_id and
+ (package_arch_id = p_arch_id or (p_arch_id is null and package_arch_id is null));
+ end;
+ end if;
+
+ return tp_id;
+end;
+$$
+language plpgsql immutable;
commit c918551e94513edbbc95aba67f349fd589a522fa
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Feb 29 15:36:21 2012 +0100
use pg_dblink_exec to exec insert inside lookup_transaction_package
diff --git a/schema/spacewalk/postgres/procs/lookup_transaction_package.sql b/schema/spacewalk/postgres/procs/lookup_transaction_package.sql
index 1cbcfee..599d209 100644
--- a/schema/spacewalk/postgres/procs/lookup_transaction_package.sql
+++ b/schema/spacewalk/postgres/procs/lookup_transaction_package.sql
@@ -1,7 +1,6 @@
-- oracle equivalent source sha1 5507c4bf3760c813f3f8ffb461a73f5e2903473e
--- retrieved from ./1241042199/53fa26df463811901487b608eecc3f77ca7783a1/schema/spacewalk/oracle/procs/lookup_transaction_package.sql
--
--- Copyright (c) 2008--2010 Red Hat, Inc.
+-- Copyright (c) 2008--2012 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
@@ -13,61 +12,69 @@
-- 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
-LOOKUP_TRANSACTION_PACKAGE(o_in IN VARCHAR, n_in IN VARCHAR,
- e_in IN VARCHAR, v_in IN VARCHAR, r_in IN VARCHAR, a_in IN VARCHAR)
-RETURNS NUMERIC
-AS
+create or replace function
+lookup_transaction_package(
+ o_in in varchar,
+ n_in in varchar,
+ e_in in varchar,
+ v_in in varchar,
+ r_in in varchar,
+ a_in in varchar)
+returns numeric
+as
$$
-DECLARE
- o_id NUMERIC;
- n_id NUMERIC;
- e_id NUMERIC;
- p_arch_id NUMERIC;
- tp_id NUMERIC;
-BEGIN
- SELECT id
- INTO o_id
- FROM rhnTransactionOperation
- WHERE label = o_in;
-
- IF NOT FOUND THEN
- PERFORM rhn_exception.raise_exception('invalid_transaction_operation');
- END IF;
+declare
+ o_id numeric;
+ n_id numeric;
+ e_id numeric;
+ p_arch_id numeric;
+ tp_id numeric;
+begin
+ select id
+ into o_id
+ from rhnTransactionOperation
+ where label = o_in;
- SELECT LOOKUP_PACKAGE_NAME(n_in)
- INTO n_id;
+ if not found then
+ perform rhn_exception.raise_exception('invalid_transaction_operation');
+ end if;
- SELECT LOOKUP_EVR(e_in, v_in, r_in)
- INTO e_id;
+ n_id := lookup_package_name(n_in);
+ e_id := lookup_evr(e_in, v_in, r_in);
+ p_arch_id := null;
- p_arch_id := NULL;
- IF a_in IS NOT NULL
- THEN
- SELECT LOOKUP_PACKAGE_ARCH(a_in)
- INTO p_arch_id;
- END IF;
+ if a_in is not null then
+ p_arch_id := lookup_package_arch(a_in);
+ end if;
- SELECT id
- INTO tp_id
- FROM rhnTransactionPackage
- WHERE operation = o_id
- AND name_id = n_id
- AND evr_id = e_id
- AND (package_arch_id = p_arch_id OR (p_arch_id IS NULL AND package_arch_id IS NULL));
+ select id
+ into tp_id
+ from rhnTransactionPackage
+ where operation = o_id and
+ name_id = n_id and
+ evr_id = e_id and
+ (package_arch_id = p_arch_id or (p_arch_id is null and package_arch_id is null));
- IF NOT FOUND THEN
- INSERT INTO rhnTransactionPackage
- (id, operation, name_id, evr_id, package_arch_id) VALUES (nextval('rhn_transpack_id_seq'), o_id, n_id, e_id, p_arch_id);
- tp_id := currval('rhn_transpack_id_seq');
- END IF;
+ if not found then
+ tp_id := nextval('rhn_transpack_id_seq');
+ begin
+ perform pg_dblink_exec(
+ 'insert into rhnTransactionPackage (id, operation, name_id, evr_id, package_arch_id)' ||
+ ' values (' || tp_id || ', ' || o_id || ', ' || n_id || ', ' || e_id ||
+ ', ' || ', ' || p_arch_id || ')');
+ exception when unique_violation then
+ select id
+ into strict tp_id
+ from rhnTransactionPackage
+ where operation = o_id and
+ name_id = n_id and
+ evr_id = e_id and
+ (package_arch_id = p_arch_id or (p_arch_id is null and package_arch_id is null));
+ end;
+ end if;
- RETURN tp_id;
-END;
+ return tp_id;
+end;
$$
-LANGUAGE PLPGSQL;
+language plpgsql immutable;
diff --git a/schema/spacewalk/postgres/procs/procs.deps b/schema/spacewalk/postgres/procs/procs.deps
index aa0c1a3..5fa70c3 100644
--- a/schema/spacewalk/postgres/procs/procs.deps
+++ b/schema/spacewalk/postgres/procs/procs.deps
@@ -101,7 +101,8 @@ lookup_tag :: rhnTag lookup_tag_name pg_dblink_exec
lookup_tag_name :: rhnTagName pg_dblink_exec
lookup_transaction_package :: rhnTransactionOperation lookup_package_name \
lookup_evr lookup_package_arch \
- rhnTransactionPackage rhn_exception.pks
+ rhnTransactionPackage rhn_exception.pks \
+ pg_dblink_exec
lookup_virt_sub_level :: rhnVirtSubLevel
pxt_session_cleanup :: PXTSessions
queue_server :: rhnServerNeededPackageCache rhnTaskQueue \
commit 9f37a6295f0fc98f6acd50c9a63c2266bbdf940d
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Feb 29 14:14:16 2012 +0100
use autonomous_transaction for insert only
diff --git a/schema/spacewalk/oracle/procs/insert_transaction_package.sql b/schema/spacewalk/oracle/procs/insert_transaction_package.sql
new file mode 100644
index 0000000..ca4510e
--- /dev/null
+++ b/schema/spacewalk/oracle/procs/insert_transaction_package.sql
@@ -0,0 +1,30 @@
+-- Copyright (c) 2012 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 insert_transaction_package(
+ o_id in number,
+ n_id in number,
+ e_id in number,
+ p_arch_id in number)
+return number
+is
+ pragma autonomous_transaction;
+ tp_id number;
+begin
+ insert into rhnTransactionPackage (id, operation, name_id, evr_id, package_arch_id)
+ values (rhn_transpack_id_seq.nextval, o_id, n_id, e_id, p_arch_id) returning id into tp_id;
+ commit;
+ return tp_id;
+end;
+/
+show errors
diff --git a/schema/spacewalk/oracle/procs/lookup_transaction_package.sql b/schema/spacewalk/oracle/procs/lookup_transaction_package.sql
index 2e0b4d2..2312b68 100644
--- a/schema/spacewalk/oracle/procs/lookup_transaction_package.sql
+++ b/schema/spacewalk/oracle/procs/lookup_transaction_package.sql
@@ -1,5 +1,4 @@
---
--- Copyright (c) 2008 Red Hat, Inc.
+-- Copyright (c) 2008-2012 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
@@ -11,73 +10,62 @@
-- 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
-LOOKUP_TRANSACTION_PACKAGE(o_in IN VARCHAR2, n_in IN VARCHAR2,
- e_in IN VARCHAR2, v_in IN VARCHAR2, r_in IN VARCHAR2, a_in IN VARCHAR2)
-RETURN NUMBER
-IS
- PRAGMA AUTONOMOUS_TRANSACTION;
- o_id NUMBER;
- n_id NUMBER;
- e_id NUMBER;
- p_arch_id NUMBER;
- tp_id NUMBER;
-BEGIN
- BEGIN
- SELECT id
- INTO o_id
- FROM rhnTransactionOperation
- WHERE label = o_in;
- EXCEPTION
- WHEN NO_DATA_FOUND THEN
- rhn_exception.raise_exception('invalid_transaction_operation');
- END;
+create or replace function
+lookup_transaction_package(
+ o_in in varchar2,
+ n_in in varchar2,
+ e_in in varchar2,
+ v_in in varchar2,
+ r_in in varchar2,
+ a_in in varchar2)
+return number
+is
+ pragma autonomous_transaction;
+ o_id number;
+ n_id number;
+ e_id number;
+ p_arch_id number;
+ tp_id number;
+begin
+ begin
+ select id
+ into o_id
+ from rhnTransactionOperation
+ where label = o_in;
+ exception when no_data_found then
+ rhn_exception.raise_exception('invalid_transaction_operation');
+ end;
- SELECT LOOKUP_PACKAGE_NAME(n_in)
- INTO n_id
- FROM dual;
+ n_id := lookup_package_name(n_in);
+ e_id := lookup_evr(e_in, v_in, r_in);
+ p_arch_id := null;
- SELECT LOOKUP_EVR(e_in, v_in, r_in)
- INTO e_id
- FROM dual;
+ if a_in is not null then
+ p_arch_id := lookup_package_arch(a_in);
+ end if;
- p_arch_id := NULL;
- IF a_in IS NOT NULL
- THEN
- SELECT LOOKUP_PACKAGE_ARCH(a_in)
- INTO p_arch_id
- FROM dual;
- END IF;
-
- SELECT id
- INTO tp_id
- FROM rhnTransactionPackage
- WHERE operation = o_id
- AND name_id = n_id
- AND evr_id = e_id
- AND (package_arch_id = p_arch_id OR (p_arch_id IS NULL AND package_arch_id IS NULL));
- RETURN tp_id;
-EXCEPTION
- WHEN NO_DATA_FOUND THEN
- INSERT INTO rhnTransactionPackage
- (id, operation, name_id, evr_id, package_arch_id)
- VALUES (rhn_transpack_id_seq.nextval, o_id, n_id, e_id, p_arch_id)
- RETURNING id INTO tp_id;
- COMMIT;
- RETURN tp_id;
-END;
+ select id
+ into tp_id
+ from rhnTransactionPackage
+ where operation = o_id and
+ name_id = n_id and
+ evr_id = e_id and
+ (package_arch_id = p_arch_id or (p_arch_id is null and package_arch_id is null));
+ return tp_id;
+exception when no_data_found then
+ begin
+ tp_id := insert_transaction_package(o_id, n_id, e_id, p_arch_id);
+ exception when dup_val_on_index then
+ select id
+ into tp_id
+ from rhnTransactionPackage
+ where operation = o_id and
+ name_id = n_id and
+ evr_id = e_id and
+ (package_arch_id = p_arch_id or (p_arch_id is null and package_arch_id is null));
+ end;
+ return tp_id;
+end;
/
-SHOW ERRORS
-
---
--- Revision 1.2 2003/07/09 16:29:33 cturner
--- update some strings and change lookup_transaction_package to throw an exception instead of SILENTLY RETURNING NULL
---
--- Revision 1.1 2003/07/01 14:52:35 misa
--- bugzilla: 90376 Need function to add transactions in the DB
---
+show errors
diff --git a/schema/spacewalk/oracle/procs/procs.deps b/schema/spacewalk/oracle/procs/procs.deps
index 3d38bc9..26c1676 100644
--- a/schema/spacewalk/oracle/procs/procs.deps
+++ b/schema/spacewalk/oracle/procs/procs.deps
@@ -67,6 +67,7 @@ insert_package_nevra :: rhnPackageNEVRA
insert_source_name :: rhnSourceRPM
insert_tag :: rhnTag
insert_tag_name :: rhnTagName
+insert_transaction_package :: rhnTransactionPackage
is_user_applicant :: rhnUserGroupType web_contact rhnUserGroup \
rhnUserGroupMembers
lookup_arch_type :: data/rhnArchType rhn_exception.pks
@@ -109,7 +110,8 @@ lookup_tag :: rhnTag lookup_tag_name insert_tag
lookup_tag_name :: rhnTagName insert_tag_name
lookup_transaction_package :: rhnTransactionOperation lookup_package_name \
lookup_evr lookup_package_arch \
- rhnTransactionPackage rhn_exception.pks
+ rhnTransactionPackage rhn_exception.pks \
+ insert_transaction_package
lookup_virt_sub_level :: rhnVirtSubLevel
pxt_session_cleanup :: PXTSessions
queue_server :: rhnServerNeededPackageCache rhnTaskQueue \
diff --git a/schema/spacewalk/postgres/procs/insert_transaction_package.sql b/schema/spacewalk/postgres/procs/insert_transaction_package.sql
new file mode 100644
index 0000000..6142bba
--- /dev/null
+++ b/schema/spacewalk/postgres/procs/insert_transaction_package.sql
@@ -0,0 +1,2 @@
+-- oracle equivalent source sha1 c6072b2270204eee9312f4f43bfc3c0c7eb4dc4e
+-- This file is intentionally left empty.
diff --git a/schema/spacewalk/postgres/procs/lookup_transaction_package.sql b/schema/spacewalk/postgres/procs/lookup_transaction_package.sql
index 8eade8b..1cbcfee 100644
--- a/schema/spacewalk/postgres/procs/lookup_transaction_package.sql
+++ b/schema/spacewalk/postgres/procs/lookup_transaction_package.sql
@@ -1,4 +1,4 @@
--- oracle equivalent source sha1 ab85631a39989d1c81a089955d8a10f3b266bc98
+-- oracle equivalent source sha1 5507c4bf3760c813f3f8ffb461a73f5e2903473e
-- retrieved from ./1241042199/53fa26df463811901487b608eecc3f77ca7783a1/schema/spacewalk/oracle/procs/lookup_transaction_package.sql
--
-- Copyright (c) 2008--2010 Red Hat, Inc.
12 years, 2 months
5 commits - schema/spacewalk
by Milan Zazrivec
schema/spacewalk/oracle/procs/insert_tag_name.sql | 26 ++++
schema/spacewalk/oracle/procs/lookup_tag_name.sql | 54 ++++------
schema/spacewalk/oracle/procs/procs.deps | 3
schema/spacewalk/postgres/procs/insert_tag_name.sql | 2
schema/spacewalk/postgres/procs/lookup_tag_name.sql | 54 +++++-----
schema/spacewalk/postgres/procs/procs.deps | 4
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/104-lookup_tag_name.sql.oracle | 40 +++++++
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/104-lookup_tag_name.sql.postgresql | 32 +++++
8 files changed, 156 insertions(+), 59 deletions(-)
New commits:
commit b0980a2847a0abe93178fdac3d9de1450a32d785
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Feb 29 13:56:13 2012 +0100
lookup_tag_name: schema upgrade
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/104-lookup_tag_name.sql.oracle b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/104-lookup_tag_name.sql.oracle
new file mode 100644
index 0000000..67e5e8a
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/104-lookup_tag_name.sql.oracle
@@ -0,0 +1,40 @@
+create or replace function insert_tag_name(name_in in varchar2)
+return number
+is
+ pragma autonomous_transaction;
+ name_id number;
+begin
+ insert into rhnTagName(id, name)
+ values (rhn_tagname_id_seq.nextval, name_in) returning id into name_id;
+ commit;
+ return name_id;
+end;
+/
+show errors
+
+create or replace function
+lookup_tag_name(name_in in varchar2)
+return number
+is
+ pragma autonomous_transaction;
+ name_id number;
+begin
+ select id
+ into name_id
+ from rhnTagName
+ where name = name_in;
+
+ return name_id;
+exception when no_data_found then
+ begin
+ name_id := insert_tag_name(name_in);
+ exception when dup_val_on_index then
+ select id
+ into name_id
+ from rhnTagName
+ where name = name_in;
+ end;
+ return name_id;
+end;
+/
+show errors
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/104-lookup_tag_name.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/104-lookup_tag_name.sql.postgresql
new file mode 100644
index 0000000..220e582
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/104-lookup_tag_name.sql.postgresql
@@ -0,0 +1,32 @@
+-- oracle equivalent source sha1 7ee8c6969cbd24fb3e30636737486f2e470d02ab
+
+create or replace function
+lookup_tag_name(name_in in varchar)
+returns numeric
+as
+$$
+declare
+ name_id numeric;
+begin
+ select id
+ into name_id
+ from rhnTagName
+ where name = name_in;
+
+ if not found then
+ name_id := nextval('rhn_tagname_id_seq');
+ begin
+ perform pg_dblink_exec(
+ 'insert into rhnTagName(id, name) values (' ||
+ name_id || ', ' || coalesce(quote_literal(name_in), 'NULL') || ')');
+ exception when unique_violation then
+ select id
+ into strict name_id
+ from rhnTagName
+ where name = name_in;
+ end;
+ end if;
+
+ return name_id;
+end;
+$$ language plpgsql immutable;
commit 6a972d6a26490e6fa90370028ed03c677a855ac4
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Feb 29 13:54:29 2012 +0100
fix proc dependencies
diff --git a/schema/spacewalk/postgres/procs/procs.deps b/schema/spacewalk/postgres/procs/procs.deps
index 4fe0f88..aa0c1a3 100644
--- a/schema/spacewalk/postgres/procs/procs.deps
+++ b/schema/spacewalk/postgres/procs/procs.deps
@@ -97,8 +97,8 @@ lookup_server_arch :: rhn_exception.pks data/rhnException rhnServer
lookup_sg_type :: rhnServerGroupType
lookup_snapshot_invalid_reason :: rhnSnapshotInvalidReason
lookup_source_name :: rhnSourceRPM pg_dblink_exec
-lookup_tag :: rhnTag lookup_tag_name
-lookup_tag_name :: rhnTagName
+lookup_tag :: rhnTag lookup_tag_name pg_dblink_exec
+lookup_tag_name :: rhnTagName pg_dblink_exec
lookup_transaction_package :: rhnTransactionOperation lookup_package_name \
lookup_evr lookup_package_arch \
rhnTransactionPackage rhn_exception.pks
commit f548793093512efeb92e0596be21b5942eeab3f4
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Feb 29 13:53:26 2012 +0100
use pg_dblink_exec to execute insert inside lookup_tag_name
diff --git a/schema/spacewalk/postgres/procs/lookup_tag_name.sql b/schema/spacewalk/postgres/procs/lookup_tag_name.sql
index 1d524a6..9a9e02b 100644
--- a/schema/spacewalk/postgres/procs/lookup_tag_name.sql
+++ b/schema/spacewalk/postgres/procs/lookup_tag_name.sql
@@ -1,7 +1,6 @@
-- oracle equivalent source sha1 a0ac36c5fc0ed1f1a7a62a4799b4170612d78614
--- retrieved from ./1241042199/53fa26df463811901487b608eecc3f77ca7783a1/schema/spacewalk/oracle/procs/lookup_tag_name.sql
--
--- Copyright (c) 2008--2010 Red Hat, Inc.
+-- Copyright (c) 2008--2012 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
@@ -13,29 +12,34 @@
-- 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
-LOOKUP_TAG_NAME(name_in IN VARCHAR)
-RETURNS NUMERIC
-AS
+create or replace function
+lookup_tag_name(name_in in varchar)
+returns numeric
+as
$$
-DECLARE
- name_id NUMERIC;
-BEGIN
- select id into name_id
- from rhnTagName
- where name = name_in;
+declare
+ name_id numeric;
+begin
+ select id
+ into name_id
+ from rhnTagName
+ where name = name_in;
- IF NOT FOUND THEN
- insert into rhnTagName(id, name) values (nextval('rhn_tagname_id_seq'), name_in);
- name_id := currval('rhn_tagname_id_seq');
- END IF;
+ if not found then
+ name_id := nextval('rhn_tagname_id_seq');
+ begin
+ perform pg_dblink_exec(
+ 'insert into rhnTagName(id, name) values (' ||
+ name_id || ', ' || coalesce(quote_literal(name_in), 'NULL') || ')');
+ exception when unique_violation then
+ select id
+ into strict name_id
+ from rhnTagName
+ where name = name_in;
+ end;
+ end if;
- RETURN name_id;
-END;
-$$ LANGUAGE PLPGSQL;
+ return name_id;
+end;
+$$ language plpgsql immutable;
commit 9456215e3d467631d6683f1b1f61314178a0d891
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Feb 29 13:53:17 2012 +0100
fix proc dependencies
diff --git a/schema/spacewalk/oracle/procs/procs.deps b/schema/spacewalk/oracle/procs/procs.deps
index 7de2aab..3d38bc9 100644
--- a/schema/spacewalk/oracle/procs/procs.deps
+++ b/schema/spacewalk/oracle/procs/procs.deps
@@ -66,6 +66,7 @@ insert_evr :: rhnPackageEVR
insert_package_nevra :: rhnPackageNEVRA
insert_source_name :: rhnSourceRPM
insert_tag :: rhnTag
+insert_tag_name :: rhnTagName
is_user_applicant :: rhnUserGroupType web_contact rhnUserGroup \
rhnUserGroupMembers
lookup_arch_type :: data/rhnArchType rhn_exception.pks
@@ -105,7 +106,7 @@ lookup_sg_type :: rhnServerGroupType
lookup_snapshot_invalid_reason :: rhnSnapshotInvalidReason
lookup_source_name :: insert_source_name rhnSourceRPM
lookup_tag :: rhnTag lookup_tag_name insert_tag
-lookup_tag_name :: rhnTagName
+lookup_tag_name :: rhnTagName insert_tag_name
lookup_transaction_package :: rhnTransactionOperation lookup_package_name \
lookup_evr lookup_package_arch \
rhnTransactionPackage rhn_exception.pks
commit 637f7fce5669ed18f585fc44fe593a3ef3b8500c
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Feb 29 13:48:26 2012 +0100
use autonomous_transaction for insert only
diff --git a/schema/spacewalk/oracle/procs/insert_tag_name.sql b/schema/spacewalk/oracle/procs/insert_tag_name.sql
new file mode 100644
index 0000000..44ebfd1
--- /dev/null
+++ b/schema/spacewalk/oracle/procs/insert_tag_name.sql
@@ -0,0 +1,26 @@
+-- Copyright (c) 2012 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 insert_tag_name(name_in in varchar2)
+return number
+is
+ pragma autonomous_transaction;
+ name_id number;
+begin
+ insert into rhnTagName(id, name)
+ values (rhn_tagname_id_seq.nextval, name_in) returning id into name_id;
+ commit;
+ return name_id;
+end;
+/
+show errors
diff --git a/schema/spacewalk/oracle/procs/lookup_tag_name.sql b/schema/spacewalk/oracle/procs/lookup_tag_name.sql
index bbf48b0..38b46e1 100644
--- a/schema/spacewalk/oracle/procs/lookup_tag_name.sql
+++ b/schema/spacewalk/oracle/procs/lookup_tag_name.sql
@@ -1,5 +1,4 @@
---
--- Copyright (c) 2008 Red Hat, Inc.
+-- Copyright (c) 2008-2012 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
@@ -11,37 +10,30 @@
-- 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
-LOOKUP_TAG_NAME(name_in IN VARCHAR2)
-RETURN NUMBER
-IS
- PRAGMA AUTONOMOUS_TRANSACTION;
- name_id NUMBER;
-BEGIN
- select id into name_id
+create or replace function
+lookup_tag_name(name_in in varchar2)
+return number
+is
+ pragma autonomous_transaction;
+ name_id number;
+begin
+ select id
+ into name_id
from rhnTagName
where name = name_in;
- RETURN name_id;
-EXCEPTION
- WHEN NO_DATA_FOUND THEN
- insert into rhnTagName(id, name)
- values (rhn_tagname_id_seq.nextval, name_in)
- returning id into name_id;
- COMMIT;
- RETURN name_id;
-END;
+ return name_id;
+exception when no_data_found then
+ begin
+ name_id := insert_tag_name(name_in);
+ exception when dup_val_on_index then
+ select id
+ into name_id
+ from rhnTagName
+ where name = name_in;
+ end;
+ return name_id;
+end;
/
-SHOW ERRORS
-
---
--- Revision 1.1 2003/10/15 20:29:53 bretm
--- bugzilla: 107189
---
--- 1st pass at snapshot tagging schema
---
+show errors
diff --git a/schema/spacewalk/postgres/procs/insert_tag_name.sql b/schema/spacewalk/postgres/procs/insert_tag_name.sql
new file mode 100644
index 0000000..d9a45de
--- /dev/null
+++ b/schema/spacewalk/postgres/procs/insert_tag_name.sql
@@ -0,0 +1,2 @@
+-- oracle equivalent source sha1 3a243557dc0c065deb58725a0deb2014574b748a
+-- This file is intentionaly left empty.
diff --git a/schema/spacewalk/postgres/procs/lookup_tag_name.sql b/schema/spacewalk/postgres/procs/lookup_tag_name.sql
index 2b9c782..1d524a6 100644
--- a/schema/spacewalk/postgres/procs/lookup_tag_name.sql
+++ b/schema/spacewalk/postgres/procs/lookup_tag_name.sql
@@ -1,4 +1,4 @@
--- oracle equivalent source sha1 6f988ed5edeb906dd639beeb2321eed9208864b3
+-- oracle equivalent source sha1 a0ac36c5fc0ed1f1a7a62a4799b4170612d78614
-- retrieved from ./1241042199/53fa26df463811901487b608eecc3f77ca7783a1/schema/spacewalk/oracle/procs/lookup_tag_name.sql
--
-- Copyright (c) 2008--2010 Red Hat, Inc.
12 years, 2 months
5 commits - schema/spacewalk
by Milan Zazrivec
schema/spacewalk/oracle/procs/insert_tag.sql | 26 ++++
schema/spacewalk/oracle/procs/lookup_tag.sql | 62 ++++------
schema/spacewalk/oracle/procs/procs.deps | 3
schema/spacewalk/postgres/procs/insert_source_name.sql | 2
schema/spacewalk/postgres/procs/insert_tag.sql | 2
schema/spacewalk/postgres/procs/lookup_source_name.sql | 2
schema/spacewalk/postgres/procs/lookup_tag.sql | 56 +++++----
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/102-lookup_source_name.sql.postgresql | 2
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/103-lookup_tag.sql.oracle | 42 ++++++
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/103-lookup_tag.sql.postgresql | 47 +++++++
10 files changed, 180 insertions(+), 64 deletions(-)
New commits:
commit 1eda0a8d3d096dd0a5500b9ae7a1dd21f9cdcba6
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Feb 29 13:41:40 2012 +0100
lookup_tag: schema upgrade
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/103-lookup_tag.sql.oracle b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/103-lookup_tag.sql.oracle
new file mode 100644
index 0000000..d9a7e2e
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/103-lookup_tag.sql.oracle
@@ -0,0 +1,42 @@
+create or replace function insert_tag(org_id_in in number, name_in in varchar2)
+return number
+is
+ pragma autonomous_transaction;
+ tag_id number;
+begin
+ insert into rhnTag(id, org_id, name_id)
+ values (rhn_tag_id_seq.nextval, org_id_in, lookup_tag_name(name_in)) returning id into tag_id;
+ commit;
+ return tag_id;
+end;
+/
+show errors
+
+create or replace function
+lookup_tag(org_id_in in number, name_in in varchar2)
+return number
+is
+ pragma autonomous_transaction;
+ tag_id number;
+begin
+ select id
+ into tag_id
+ from rhnTag
+ where org_id = org_id_in and
+ name_id = lookup_tag_name(name_in);
+
+ return tag_id;
+exception when no_data_found then
+ begin
+ tag_id := insert_tag(org_id_in, name_in);
+ exception when dup_val_on_index then
+ select id
+ into tag_id
+ from rhnTag
+ where org_id = org_id_in and
+ name_id = lookup_tag_name(name_in);
+ end;
+ return tag_id;
+end;
+/
+show errors
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/103-lookup_tag.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/103-lookup_tag.sql.postgresql
new file mode 100644
index 0000000..0b76cb0
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/103-lookup_tag.sql.postgresql
@@ -0,0 +1,47 @@
+-- oracle equivalent source sha1 9e86081eb6bf62471b147e5caf621f79d9753ef6
+--
+-- Copyright (c) 2008--2012 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
+lookup_tag(org_id_in in numeric, name_in in varchar)
+returns numeric
+as $$
+declare
+ tag_id numeric;
+begin
+ select id
+ into tag_id
+ from rhnTag
+ where org_id = org_id_in and
+ name_id = lookup_tag_name(name_in);
+
+ if not found then
+ tag_id := nextval('rhn_tag_id_seq');
+ begin
+ perform pg_dblink_exec(
+ 'insert into rhnTag(id, org_id, name_id) values (' ||
+ tag_id || ', ' || org_id_in || ', ' ||
+ coalesce(quote_literal(lookup_tag_name(name_in), 'NULL')) || ')');
+ exception when unique_violation then
+ select id
+ into strict tag_id
+ from rhnTag
+ where org_id = org_id_in and
+ name_id = lookup_tag_name(name_in);
+ end;
+ end if;
+
+ return tag_id;
+end; $$
+language plpgsql immutable;
commit 92af3ff1dd7981a036ce01b8a1cda8be2260eb32
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Feb 29 13:40:01 2012 +0100
use pg_dblink_exec to execute insert inside lookup_tag
diff --git a/schema/spacewalk/postgres/procs/lookup_tag.sql b/schema/spacewalk/postgres/procs/lookup_tag.sql
index d252994..c653402 100644
--- a/schema/spacewalk/postgres/procs/lookup_tag.sql
+++ b/schema/spacewalk/postgres/procs/lookup_tag.sql
@@ -1,7 +1,6 @@
-- oracle equivalent source sha1 65eff98afb7636fef45db31369ce6c5dd5ae1a37
--- retrieved from ./1241042199/53fa26df463811901487b608eecc3f77ca7783a1/schema/spacewalk/oracle/procs/lookup_tag.sql
--
--- Copyright (c) 2008--2010 Red Hat, Inc.
+-- Copyright (c) 2008--2012 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
@@ -13,29 +12,36 @@
-- 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
-LOOKUP_TAG(org_id_in IN NUMERIC, name_in IN VARCHAR)
-RETURNS NUMERIC
+create or replace function
+lookup_tag(org_id_in in numeric, name_in in varchar)
+returns numeric
as $$
-DECLARE
- tag_id NUMERIC;
-BEGIN
- select id into tag_id
- from rhnTag
- where org_id = org_id_in
- and name_id = lookup_tag_name(name_in);
+declare
+ tag_id numeric;
+begin
+ select id
+ into tag_id
+ from rhnTag
+ where org_id = org_id_in and
+ name_id = lookup_tag_name(name_in);
- IF NOT FOUND THEN
- insert into rhnTag(id, org_id, name_id) values (nextval('rhn_tag_id_seq'), org_id_in, lookup_tag_name(name_in));
- tag_id := currval('rhn_tag_id_seq');
- END IF;
+ if not found then
+ tag_id := nextval('rhn_tag_id_seq');
+ begin
+ perform pg_dblink_exec(
+ 'insert into rhnTag(id, org_id, name_id) values (' ||
+ tag_id || ', ' || org_id_in || ', ' ||
+ coalesce(quote_literal(lookup_tag_name(name_in), 'NULL')) || ')');
+ exception when unique_violation then
+ select id
+ into strict tag_id
+ from rhnTag
+ where org_id = org_id_in and
+ name_id = lookup_tag_name(name_in);
+ end;
+ end if;
- RETURN tag_id;
-END; $$
-LANGUAGE PLPGSQL;
+ return tag_id;
+end; $$
+language plpgsql immutable;
commit 87c7c2b2473a0be1797d92e48240836ff5a3573c
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Feb 29 13:35:18 2012 +0100
fix proc dependencies
diff --git a/schema/spacewalk/oracle/procs/procs.deps b/schema/spacewalk/oracle/procs/procs.deps
index 2ff33ed..7de2aab 100644
--- a/schema/spacewalk/oracle/procs/procs.deps
+++ b/schema/spacewalk/oracle/procs/procs.deps
@@ -65,6 +65,7 @@ insert_config_info :: rhnConfigInfo
insert_evr :: rhnPackageEVR
insert_package_nevra :: rhnPackageNEVRA
insert_source_name :: rhnSourceRPM
+insert_tag :: rhnTag
is_user_applicant :: rhnUserGroupType web_contact rhnUserGroup \
rhnUserGroupMembers
lookup_arch_type :: data/rhnArchType rhn_exception.pks
@@ -103,7 +104,7 @@ lookup_server_arch :: rhn_exception.pks data/rhnException rhnServer
lookup_sg_type :: rhnServerGroupType
lookup_snapshot_invalid_reason :: rhnSnapshotInvalidReason
lookup_source_name :: insert_source_name rhnSourceRPM
-lookup_tag :: rhnTag lookup_tag_name
+lookup_tag :: rhnTag lookup_tag_name insert_tag
lookup_tag_name :: rhnTagName
lookup_transaction_package :: rhnTransactionOperation lookup_package_name \
lookup_evr lookup_package_arch \
commit 0d0e4cd20af886044c49a42a46e1d33785ec999c
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Feb 29 13:32:48 2012 +0100
use autonomous_transaction for insert only
diff --git a/schema/spacewalk/oracle/procs/insert_tag.sql b/schema/spacewalk/oracle/procs/insert_tag.sql
new file mode 100644
index 0000000..6e5b415
--- /dev/null
+++ b/schema/spacewalk/oracle/procs/insert_tag.sql
@@ -0,0 +1,26 @@
+-- Copyright (c) 2012 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 insert_tag(org_id_in in number, name_in in varchar2)
+return number
+is
+ pragma autonomous_transaction;
+ tag_id number;
+begin
+ insert into rhnTag(id, org_id, name_id)
+ values (rhn_tag_id_seq.nextval, org_id_in, lookup_tag_name(name_in)) returning id into tag_id;
+ commit;
+ return tag_id;
+end;
+/
+show errors
diff --git a/schema/spacewalk/oracle/procs/lookup_tag.sql b/schema/spacewalk/oracle/procs/lookup_tag.sql
index ac8a1b1..fbb7f2c 100644
--- a/schema/spacewalk/oracle/procs/lookup_tag.sql
+++ b/schema/spacewalk/oracle/procs/lookup_tag.sql
@@ -1,5 +1,4 @@
---
--- Copyright (c) 2008 Red Hat, Inc.
+-- Copyright (c) 2008-2012 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
@@ -11,39 +10,32 @@
-- 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
-LOOKUP_TAG(org_id_in IN NUMBER, name_in IN VARCHAR2)
-RETURN NUMBER
-IS
- PRAGMA AUTONOMOUS_TRANSACTION;
- tag_id NUMBER;
-BEGIN
- select id into tag_id
- from rhnTag
- where org_id = org_id_in
- and name_id = lookup_tag_name(name_in);
+create or replace function
+lookup_tag(org_id_in in number, name_in in varchar2)
+return number
+is
+ pragma autonomous_transaction;
+ tag_id number;
+begin
+ select id
+ into tag_id
+ from rhnTag
+ where org_id = org_id_in and
+ name_id = lookup_tag_name(name_in);
- RETURN tag_id;
-EXCEPTION
- WHEN NO_DATA_FOUND THEN
- insert into rhnTag(id, org_id, name_id)
- values (rhn_tag_id_seq.nextval, org_id_in, lookup_tag_name(name_in))
- returning id into tag_id;
- COMMIT;
- RETURN tag_id;
-END;
+ return tag_id;
+exception when no_data_found then
+ begin
+ tag_id := insert_tag(org_id_in, name_in);
+ exception when dup_val_on_index then
+ select id
+ into tag_id
+ from rhnTag
+ where org_id = org_id_in and
+ name_id = lookup_tag_name(name_in);
+ end;
+ return tag_id;
+end;
/
-SHOW ERRORS
-
---
--- Revision 1.1 2003/10/16 14:23:33 bretm
--- bugzilla: 107189
---
--- o added server_id to rhnSnapshotTag
--- o added lookup_tag(org_id, tagname)
---
+show errors
diff --git a/schema/spacewalk/postgres/procs/insert_tag.sql b/schema/spacewalk/postgres/procs/insert_tag.sql
new file mode 100644
index 0000000..35d1d9e
--- /dev/null
+++ b/schema/spacewalk/postgres/procs/insert_tag.sql
@@ -0,0 +1,2 @@
+-- oracle equivalent source sha1 0747be17bb344bff3073e00930025cdd503f6ee2
+-- This file is intentionally left empty.
diff --git a/schema/spacewalk/postgres/procs/lookup_tag.sql b/schema/spacewalk/postgres/procs/lookup_tag.sql
index 8645384..d252994 100644
--- a/schema/spacewalk/postgres/procs/lookup_tag.sql
+++ b/schema/spacewalk/postgres/procs/lookup_tag.sql
@@ -1,4 +1,4 @@
--- oracle equivalent source sha1 de7b3b92b5697a52663a3df142c716ea0953960c
+-- oracle equivalent source sha1 65eff98afb7636fef45db31369ce6c5dd5ae1a37
-- retrieved from ./1241042199/53fa26df463811901487b608eecc3f77ca7783a1/schema/spacewalk/oracle/procs/lookup_tag.sql
--
-- Copyright (c) 2008--2010 Red Hat, Inc.
commit b45108b6a81d063fc0df88218d806bbca1a52634
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Feb 29 13:32:21 2012 +0100
fix sha1 sums
diff --git a/schema/spacewalk/postgres/procs/insert_source_name.sql b/schema/spacewalk/postgres/procs/insert_source_name.sql
index a383f56..f7c6969 100644
--- a/schema/spacewalk/postgres/procs/insert_source_name.sql
+++ b/schema/spacewalk/postgres/procs/insert_source_name.sql
@@ -1,2 +1,2 @@
--- oracle equivalent source sha1 70bd3a54227c44ef37d184e3595793b4c93a14e1
+-- oracle equivalent source sha1 961eb765a11aacb9649ca6546c7d71ff06221eab
-- This file is intentionally left empty.
diff --git a/schema/spacewalk/postgres/procs/lookup_source_name.sql b/schema/spacewalk/postgres/procs/lookup_source_name.sql
index 4ce876b..0427b8a 100644
--- a/schema/spacewalk/postgres/procs/lookup_source_name.sql
+++ b/schema/spacewalk/postgres/procs/lookup_source_name.sql
@@ -1,4 +1,4 @@
--- oracle equivalent source sha1 007c497a31ad8fe3716d393fd154ad753dcdb41a
+-- oracle equivalent source sha1 f948e9b5eb7803acc73679b6a09203892468961a
--
-- Copyright (c) 2008--2012 Red Hat, Inc.
--
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/102-lookup_source_name.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/102-lookup_source_name.sql.postgresql
index e339e8b..23f214d 100644
--- a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/102-lookup_source_name.sql.postgresql
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/102-lookup_source_name.sql.postgresql
@@ -1,4 +1,4 @@
--- oracle equivalent source sha1 96b3445ea3839e32ec9c3963845f4931a5d278e0
+-- oracle equivalent source sha1 6750c771494ff37bb3d153ccd8ef433020c075d8
create or replace function
lookup_source_name(name_in in varchar)
12 years, 2 months
4 commits - schema/spacewalk
by Milan Zazrivec
schema/spacewalk/oracle/procs/insert_source_name.sql | 26 ++++
schema/spacewalk/oracle/procs/lookup_source_name.sql | 56 ++++------
schema/spacewalk/oracle/procs/procs.deps | 3
schema/spacewalk/postgres/procs/insert_source_name.sql | 2
schema/spacewalk/postgres/procs/lookup_source_name.sql | 55 +++++----
schema/spacewalk/postgres/procs/procs.deps | 2
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/102-lookup_source_name.sql.oracle | 51 +++++++++
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/102-lookup_source_name.sql.postgresql | 33 +++++
8 files changed, 169 insertions(+), 59 deletions(-)
New commits:
commit d166bba10a727f5951d1e32d0d1c9674398a1bcc
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Feb 29 11:44:29 2012 +0100
lookup_source_name: schema upgrade
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/102-lookup_source_name.sql.oracle b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/102-lookup_source_name.sql.oracle
new file mode 100644
index 0000000..18e28ff
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/102-lookup_source_name.sql.oracle
@@ -0,0 +1,51 @@
+create or replace function insert_source_name(name_in in varchar2)
+return number
+is
+ pragma autonomous_transaction;
+ source_id number;
+begin
+ insert into rhnSourceRPM(id, name)
+ values (rhn_sourcerpm_id_seq.nextval, name_in) returning id into source_id;
+ commit;
+ return source_id;
+end;
+/
+show errors
+-- Copyright (c) 2008-2012 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
+lookup_source_name(name_in in varchar2)
+return number
+is
+ source_id number;
+begin
+ select id
+ into source_id
+ from rhnSourceRPM
+ where name = name_in;
+
+ return source_id;
+exception when no_data_found then
+ begin
+ source_id := insert_source_name(name_in);
+ exception when dup_val_on_index then
+ select id
+ into source_id
+ from rhnSourceRPM
+ where name = name_in;
+ end;
+ return source_id;
+end;
+/
+show errors
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/102-lookup_source_name.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/102-lookup_source_name.sql.postgresql
new file mode 100644
index 0000000..e339e8b
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/102-lookup_source_name.sql.postgresql
@@ -0,0 +1,33 @@
+-- oracle equivalent source sha1 96b3445ea3839e32ec9c3963845f4931a5d278e0
+
+create or replace function
+lookup_source_name(name_in in varchar)
+returns numeric
+as
+$$
+declare
+ source_id numeric;
+begin
+ select id
+ into source_id
+ from rhnSourceRPM
+ where name = name_in;
+
+ if not found then
+ source_id := nextval('rhn_sourcerpm_id_seq');
+ begin
+ perform pg_dblink_exec(
+ 'insert into rhnSourceRPM(id, name) values (' ||
+ source_id || ', ' || coalesce(quote_literal(name_in), 'NULL') || ')');
+ exception when unique_violation then
+ select id
+ into strict source_id
+ from rhnSourceRPM
+ where name = name_in;
+ end;
+ end if;
+
+ return source_id;
+end;
+$$
+language plpgsql immutable;
commit c63d7509172ba344e9cc5b7acdd646e2a895b1ff
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Feb 29 11:40:50 2012 +0100
use pg_dblink_exec to execute insert inside lookup_source_name
diff --git a/schema/spacewalk/postgres/procs/lookup_source_name.sql b/schema/spacewalk/postgres/procs/lookup_source_name.sql
index f643c18..4ce876b 100644
--- a/schema/spacewalk/postgres/procs/lookup_source_name.sql
+++ b/schema/spacewalk/postgres/procs/lookup_source_name.sql
@@ -1,7 +1,6 @@
-- oracle equivalent source sha1 007c497a31ad8fe3716d393fd154ad753dcdb41a
--- retrieved from ./1241057068/d2f16725f65bddae85cd4782cd82e0c84c0a776d/schema/spacewalk/oracle/procs/lookup_source_name.sql
--
--- Copyright (c) 2008--2010 Red Hat, Inc.
+-- Copyright (c) 2008--2012 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
@@ -13,29 +12,35 @@
-- 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
-LOOKUP_SOURCE_NAME(name_in IN VARCHAR)
-RETURNS NUMERIC
-AS
+create or replace function
+lookup_source_name(name_in in varchar)
+returns numeric
+as
$$
-DECLARE
- source_id NUMERIC;
-BEGIN
- select id into source_id
- from rhnSourceRPM
- where name = name_in;
+declare
+ source_id numeric;
+begin
+ select id
+ into source_id
+ from rhnSourceRPM
+ where name = name_in;
+
+ if not found then
+ source_id := nextval('rhn_sourcerpm_id_seq');
+ begin
+ perform pg_dblink_exec(
+ 'insert into rhnSourceRPM(id, name) values (' ||
+ source_id || ', ' || coalesce(quote_literal(name_in), 'NULL') || ')');
+ exception when unique_violation then
+ select id
+ into strict source_id
+ from rhnSourceRPM
+ where name = name_in;
+ end;
+ end if;
- IF NOT FOUND THEN
- insert into rhnSourceRPM(id, name) values (nextval('rhn_sourcerpm_id_seq'), name_in);
- source_id := currval('rhn_sourcerpm_id_seq');
- END IF;
-
- RETURN source_id;
-END;
+ return source_id;
+end;
$$
-LANGUAGE PLPGSQL;
+language plpgsql immutable;
diff --git a/schema/spacewalk/postgres/procs/procs.deps b/schema/spacewalk/postgres/procs/procs.deps
index c96776f..4fe0f88 100644
--- a/schema/spacewalk/postgres/procs/procs.deps
+++ b/schema/spacewalk/postgres/procs/procs.deps
@@ -96,7 +96,7 @@ lookup_server_arch :: rhn_exception.pks data/rhnException rhnServer
data/rhnServerArch
lookup_sg_type :: rhnServerGroupType
lookup_snapshot_invalid_reason :: rhnSnapshotInvalidReason
-lookup_source_name :: rhnSourceRPM
+lookup_source_name :: rhnSourceRPM pg_dblink_exec
lookup_tag :: rhnTag lookup_tag_name
lookup_tag_name :: rhnTagName
lookup_transaction_package :: rhnTransactionOperation lookup_package_name \
commit 0eaca794cba262cf7ad2cd8993871763274799cd
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Feb 29 10:58:17 2012 +0100
fix proc dependencies
diff --git a/schema/spacewalk/oracle/procs/procs.deps b/schema/spacewalk/oracle/procs/procs.deps
index 835c59c..2ff33ed 100644
--- a/schema/spacewalk/oracle/procs/procs.deps
+++ b/schema/spacewalk/oracle/procs/procs.deps
@@ -64,6 +64,7 @@ insert_config_filename :: rhnConfigFileName
insert_config_info :: rhnConfigInfo
insert_evr :: rhnPackageEVR
insert_package_nevra :: rhnPackageNEVRA
+insert_source_name :: rhnSourceRPM
is_user_applicant :: rhnUserGroupType web_contact rhnUserGroup \
rhnUserGroupMembers
lookup_arch_type :: data/rhnArchType rhn_exception.pks
@@ -101,7 +102,7 @@ lookup_server_arch :: rhn_exception.pks data/rhnException rhnServer
data/rhnServerArch
lookup_sg_type :: rhnServerGroupType
lookup_snapshot_invalid_reason :: rhnSnapshotInvalidReason
-lookup_source_name :: rhnSourceRPM
+lookup_source_name :: insert_source_name rhnSourceRPM
lookup_tag :: rhnTag lookup_tag_name
lookup_tag_name :: rhnTagName
lookup_transaction_package :: rhnTransactionOperation lookup_package_name \
commit 8532b86897154d7bfcc37e642dfc16b559692dd1
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Feb 29 10:57:14 2012 +0100
use autonomous_transaction in insert only
diff --git a/schema/spacewalk/oracle/procs/insert_source_name.sql b/schema/spacewalk/oracle/procs/insert_source_name.sql
new file mode 100644
index 0000000..10e0c06
--- /dev/null
+++ b/schema/spacewalk/oracle/procs/insert_source_name.sql
@@ -0,0 +1,26 @@
+-- Copyright (c) 2012 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 insert_source_name(name_in in varchar2)
+return number
+is
+ pragma autonomous_transaction;
+ source_id number;
+begin
+ insert into rhnSourceRPM(id, name)
+ values (rhn_sourcerpm_id_seq.nextval, name_in) returning id into source_id;
+ commit;
+ return source_id;
+end;
+/
+show errors
diff --git a/schema/spacewalk/oracle/procs/lookup_source_name.sql b/schema/spacewalk/oracle/procs/lookup_source_name.sql
index 110fa6a..2dc80a7 100644
--- a/schema/spacewalk/oracle/procs/lookup_source_name.sql
+++ b/schema/spacewalk/oracle/procs/lookup_source_name.sql
@@ -1,5 +1,4 @@
---
--- Copyright (c) 2008 Red Hat, Inc.
+-- Copyright (c) 2008-2012 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
@@ -11,36 +10,29 @@
-- 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
-LOOKUP_SOURCE_NAME(name_in IN VARCHAR2)
-RETURN NUMBER
-IS
- PRAGMA AUTONOMOUS_TRANSACTION;
- source_id NUMBER;
-BEGIN
- select id into source_id
- from rhnSourceRPM
- where name = name_in;
+create or replace function
+lookup_source_name(name_in in varchar2)
+return number
+is
+ source_id number;
+begin
+ select id
+ into source_id
+ from rhnSourceRPM
+ where name = name_in;
- RETURN source_id;
-EXCEPTION
- WHEN NO_DATA_FOUND THEN
- insert into rhnSourceRPM(id, name)
- values (rhn_sourcerpm_id_seq.nextval, name_in)
- returning id into source_id;
- COMMIT;
- RETURN source_id;
-END;
+ return source_id;
+exception when no_data_found then
+ begin
+ source_id := insert_source_name(name_in);
+ exception when dup_val_on_index then
+ select id
+ into source_id
+ from rhnSourceRPM
+ where name = name_in;
+ end;
+ return source_id;
+end;
/
-SHOW ERRORS
-
---
--- Revision 1.5 2002/05/13 22:53:38 pjones
--- cvs id/log
--- some (note enough) readability fixes
---
+show errors
diff --git a/schema/spacewalk/postgres/procs/insert_source_name.sql b/schema/spacewalk/postgres/procs/insert_source_name.sql
new file mode 100644
index 0000000..a383f56
--- /dev/null
+++ b/schema/spacewalk/postgres/procs/insert_source_name.sql
@@ -0,0 +1,2 @@
+-- oracle equivalent source sha1 70bd3a54227c44ef37d184e3595793b4c93a14e1
+-- This file is intentionally left empty.
diff --git a/schema/spacewalk/postgres/procs/lookup_source_name.sql b/schema/spacewalk/postgres/procs/lookup_source_name.sql
index 71f805d..f643c18 100644
--- a/schema/spacewalk/postgres/procs/lookup_source_name.sql
+++ b/schema/spacewalk/postgres/procs/lookup_source_name.sql
@@ -1,4 +1,4 @@
--- oracle equivalent source sha1 df5951ee3fa3819c099453015dadcef459d90d5e
+-- oracle equivalent source sha1 007c497a31ad8fe3716d393fd154ad753dcdb41a
-- retrieved from ./1241057068/d2f16725f65bddae85cd4782cd82e0c84c0a776d/schema/spacewalk/oracle/procs/lookup_source_name.sql
--
-- Copyright (c) 2008--2010 Red Hat, Inc.
12 years, 2 months
proxy/installer
by Miroslav Suchý
proxy/installer/answers.txt | 1 -
1 file changed, 1 deletion(-)
New commits:
commit 0371e1e2494abd7840dc183b7dbcc78c35484dfd
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Feb 29 11:26:57 2012 +0100
remove duplicate entry
diff --git a/proxy/installer/answers.txt b/proxy/installer/answers.txt
index 0b7da3e..519455f 100644
--- a/proxy/installer/answers.txt
+++ b/proxy/installer/answers.txt
@@ -19,7 +19,6 @@ SSL_PASSWORD=spacewalk-ssl-cert-password
INSTALL_MONITORING=N
ENABLE_SCOUT=N
CA_CHAIN=/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT
-POPULATE_CONFIG_CHANNEL=Y
HTTP_PROXY=
HTTP_USERNAME=
HTTP_PASSWORD=
12 years, 2 months
Changes to 'refs/tags/spacewalk-schema-1.7.47-1'
by Jan Pazdziora
Tag 'spacewalk-schema-1.7.47-1' created by Jan Pazdziora <jpazdziora(a)redhat.com> at 2012-02-29 09:29 +0000
Tagging package [spacewalk-schema] version [1.7.47-1] in directory [schema/spacewalk/].
Changes since spacewalk-java-1.7.48-1:
Jan Pazdziora (1):
Automatic commit of package [spacewalk-schema] release [1.7.47-1].
Milan Zazrivec (3):
correct indentation
no need for autonomous_transaction in lookup_snapshot_invalid_reason
fix lookup_config_info return
---
projects/python-hwdata/hwdata.py | 2
rel-eng/packages/spacewalk-schema | 2
schema/spacewalk/oracle/procs/lookup_config_info.sql | 2
schema/spacewalk/oracle/procs/lookup_snapshot_invalid_reason.sql | 45 +++-------
schema/spacewalk/postgres/procs/lookup_config_info.sql | 2
schema/spacewalk/postgres/procs/lookup_snapshot_invalid_reason.sql | 2
schema/spacewalk/spacewalk-schema.spec | 26 +++++
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/093-lookup_config_info.sql.oracle | 2
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/093-lookup_config_info.sql.postgresql | 2
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/101-lookup_snapshot_invalid_reason.sql.oracle | 17 +++
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/101-lookup_snapshot_invalid_reason.sql.postgresql | 2
11 files changed, 66 insertions(+), 38 deletions(-)
---
12 years, 2 months
rel-eng/packages schema/spacewalk
by Jan Pazdziora
rel-eng/packages/spacewalk-schema | 2 +-
schema/spacewalk/spacewalk-schema.spec | 26 +++++++++++++++++++++++++-
2 files changed, 26 insertions(+), 2 deletions(-)
New commits:
commit 212c063dfe91061af0f2ed4160b34d8ae2a302e0
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Feb 29 10:29:46 2012 +0100
Automatic commit of package [spacewalk-schema] release [1.7.47-1].
diff --git a/rel-eng/packages/spacewalk-schema b/rel-eng/packages/spacewalk-schema
index 86a84c7..bddce37 100644
--- a/rel-eng/packages/spacewalk-schema
+++ b/rel-eng/packages/spacewalk-schema
@@ -1 +1 @@
-1.7.46-1 schema/spacewalk/
+1.7.47-1 schema/spacewalk/
diff --git a/schema/spacewalk/spacewalk-schema.spec b/schema/spacewalk/spacewalk-schema.spec
index 023c2ae..58fd7cf 100644
--- a/schema/spacewalk/spacewalk-schema.spec
+++ b/schema/spacewalk/spacewalk-schema.spec
@@ -2,7 +2,7 @@ Name: spacewalk-schema
Group: Applications/Internet
Summary: Oracle SQL schema for Spacewalk server
-Version: 1.7.46
+Version: 1.7.47
Release: 1%{?dist}
Source0: %{name}-%{version}.tar.gz
@@ -66,6 +66,30 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/spacewalk-sql*
%changelog
+* Wed Feb 29 2012 Jan Pazdziora 1.7.47-1
+- fix lookup_config_info return (mzazrivec(a)redhat.com)
+- no need for autonomous_transaction in lookup_snapshot_invalid_reason
+ (mzazrivec(a)redhat.com)
+- fix sha1 sum (mzazrivec(a)redhat.com)
+- lookup_package_nevra: schema upgrade (mzazrivec(a)redhat.com)
+- use pg_dblink_exec to execute insert inside lookup_package_nevra
+ (mzazrivec(a)redhat.com)
+- use autonomous_transaction for insert only (mzazrivec(a)redhat.com)
+- lookup_package_name: schema upgrade (mzazrivec(a)redhat.com)
+- use pg_dblink_exec to exec insert inside lookup_package_name
+ (mzazrivec(a)redhat.com)
+- use autonomous_transaction for insert only (mzazrivec(a)redhat.com)
+- fix sha1 sums (mzazrivec(a)redhat.com)
+- lookup_package_delta: schema upgrade (mzazrivec(a)redhat.com)
+- use pg_dblink_exec to execute insert inside lookup_package_delta
+ (mzazrivec(a)redhat.com)
+- fix sha1 sums (mzazrivec(a)redhat.com)
+- use autonomous_transaction for insert_only (mzazrivec(a)redhat.com)
+- lookup_package_capability: schema upgrade (mzazrivec(a)redhat.com)
+- use pg_dblink_exec to exec insert inside lookup_package_capability
+ (mzazrivec(a)redhat.com)
+- use autonomous_transaction for insert only (mzazrivec(a)redhat.com)
+
* Tue Feb 28 2012 Jan Pazdziora 1.7.46-1
- fix insert_evr's return (mzazrivec(a)redhat.com)
- lookup_evr: schema upgrade (mzazrivec(a)redhat.com)
12 years, 2 months
schema/spacewalk
by Milan Zazrivec
schema/spacewalk/oracle/procs/lookup_config_info.sql | 2 +-
schema/spacewalk/postgres/procs/lookup_config_info.sql | 2 +-
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/093-lookup_config_info.sql.oracle | 2 +-
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/093-lookup_config_info.sql.postgresql | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
New commits:
commit d547faafaceaf5be7fb698d0e683547b9286981d
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Feb 29 10:25:23 2012 +0100
fix lookup_config_info return
diff --git a/schema/spacewalk/oracle/procs/lookup_config_info.sql b/schema/spacewalk/oracle/procs/lookup_config_info.sql
index 2525507..2731dc0 100644
--- a/schema/spacewalk/oracle/procs/lookup_config_info.sql
+++ b/schema/spacewalk/oracle/procs/lookup_config_info.sql
@@ -43,11 +43,11 @@ begin
filemode_in,
selinux_ctx_in,
symlink_target_id);
+ return v_id;
exception when dup_val_on_index then
for r in lookup_cursor loop
return r.id;
end loop;
- return v_id;
end lookup_config_info;
/
show errors
diff --git a/schema/spacewalk/postgres/procs/lookup_config_info.sql b/schema/spacewalk/postgres/procs/lookup_config_info.sql
index 7e729bd..642db04 100644
--- a/schema/spacewalk/postgres/procs/lookup_config_info.sql
+++ b/schema/spacewalk/postgres/procs/lookup_config_info.sql
@@ -1,4 +1,4 @@
--- oracle equivalent source sha1 3f919d54835de5605f895ca1c76f90e6deb80bfb
+-- oracle equivalent source sha1 bd36e5005935406b069060be7b3bef8422f1df0e
--
-- Copyright (c) 2008--2010 Red Hat, Inc.
--
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/093-lookup_config_info.sql.oracle b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/093-lookup_config_info.sql.oracle
index 3218dfa..f0e0f52 100644
--- a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/093-lookup_config_info.sql.oracle
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/093-lookup_config_info.sql.oracle
@@ -51,11 +51,11 @@ begin
filemode_in,
selinux_ctx_in,
symlink_target_id);
+ return v_id;
exception when dup_val_on_index then
for r in lookup_cursor loop
return r.id;
end loop;
- return v_id;
end lookup_config_info;
/
show errors
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/093-lookup_config_info.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/093-lookup_config_info.sql.postgresql
index 5929d14..e338921 100644
--- a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/093-lookup_config_info.sql.postgresql
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/093-lookup_config_info.sql.postgresql
@@ -1,4 +1,4 @@
--- oracle equivalent source sha1 c342d6d7cd96eb4c99b64d8d8449aea4c89ad10a
+-- oracle equivalent source sha1 f118d31767f85c590d0b1278b91a65b317c8a895
--
-- Copyright (c) 2008--2010 Red Hat, Inc.
--
12 years, 2 months