3 commits - rel-eng/packages utils/cloneByDate.py utils/spacewalk-clone-by-date utils/spacewalk-clone-by-date.sgml utils/spacewalk-utils.spec
by StephenHerr
rel-eng/packages/spacewalk-utils | 2 +-
utils/cloneByDate.py | 23 +++++++++++++++--------
utils/spacewalk-clone-by-date | 4 +++-
utils/spacewalk-clone-by-date.sgml | 9 +++++++++
utils/spacewalk-utils.spec | 6 +++++-
5 files changed, 33 insertions(+), 11 deletions(-)
New commits:
commit 9d71b9ee51cf923266a70f58456b729c8b7793a9
Author: Stephen Herr <sherr(a)redhat.com>
Date: Fri Apr 5 15:50:27 2013 -0400
Automatic commit of package [spacewalk-utils] release [1.10.3-1].
diff --git a/rel-eng/packages/spacewalk-utils b/rel-eng/packages/spacewalk-utils
index b70c3fb..9f97ee7 100644
--- a/rel-eng/packages/spacewalk-utils
+++ b/rel-eng/packages/spacewalk-utils
@@ -1 +1 @@
-1.10.2-1 utils/
+1.10.3-1 utils/
diff --git a/utils/spacewalk-utils.spec b/utils/spacewalk-utils.spec
index 0e9d9b1..a03af23 100644
--- a/utils/spacewalk-utils.spec
+++ b/utils/spacewalk-utils.spec
@@ -1,7 +1,7 @@
%define rhnroot %{_prefix}/share/rhn
Name: spacewalk-utils
-Version: 1.10.2
+Version: 1.10.3
Release: 1%{?dist}
Summary: Utilities that may be run against a Spacewalk server.
@@ -88,6 +88,10 @@ spacewalk-pylint $RPM_BUILD_ROOT%{rhnroot}
%changelog
+* Fri Apr 05 2013 Stephen Herr <sherr(a)redhat.com> 1.10.3-1
+- 947942 - Updating spacewalk-clone-by-date config file parsing and man page
+- 947942 - add spacewalk-clone-by-date --use-update-date
+
* Wed Mar 27 2013 Michael Mraka <michael.mraka(a)redhat.com> 1.10.2-1
- add openSUSE 12.3 to spacewalk-common-channels config
commit 41aa3b461a33023df545664d0d259732d07f8680
Author: Stephen Herr <sherr(a)redhat.com>
Date: Fri Apr 5 15:49:09 2013 -0400
947942 - Updating spacewalk-clone-by-date config file parsing and man page
diff --git a/utils/spacewalk-clone-by-date b/utils/spacewalk-clone-by-date
index c0faa51..04776e6 100755
--- a/utils/spacewalk-clone-by-date
+++ b/utils/spacewalk-clone-by-date
@@ -42,6 +42,7 @@ SAMPLE_CONFIG = """
"to_date": "2011-10-01",
"skip_depsolve":false,
"security_only":false,
+ "use_update_date":false,
"blacklist": {
"ALL":["sendmail"],
"my-rhel5-x86_64-clone":["emacs"],
@@ -86,7 +87,7 @@ def merge_config(options):
# add it to options
overwrite = ["username", "password", "blacklist", "removelist", "channels",
"server", "assumeyes", "to_date", "skip_depsolve",
- "security_only"]
+ "security_only", "use_update_date"]
for key in overwrite:
if config.has_key(key) and not getattr(options, key):
setattr(options, key, config[key])
@@ -154,7 +155,7 @@ def parse_args():
help="Already existing channels that will be used as the "
+ "original parent and destination parent of child "
+ "channels cloned this session.")
- parser.add_option("--use-update-date", dest="use_update_date", action='store_true', help="While cloning errata by date, use Errata's update date. If omitted will use issue date of errata.")
+ parser.add_option("-z", "--use-update-date", dest="use_update_date", action='store_true', help="While cloning errata by date, clone all errata that have last been updated on or before the date provided by to_date. If omitted will use issue date of errata (default).")
(options, args) = parser.parse_args()
diff --git a/utils/spacewalk-clone-by-date.sgml b/utils/spacewalk-clone-by-date.sgml
index ae305e0..e741718 100644
--- a/utils/spacewalk-clone-by-date.sgml
+++ b/utils/spacewalk-clone-by-date.sgml
@@ -67,6 +67,9 @@ Utility for cloning errata by date.
<arg>-o</arg><arg>--security_only</arg>
</cmdsynopsis>
<cmdsynopsis>
+ <arg>-z</arg><arg>--use-update-date</arg>
+ </cmdsynopsis>
+ <cmdsynopsis>
<arg>-g</arg><arg>--background</arg>
</cmdsynopsis>
<cmdsynopsis>
@@ -156,6 +159,12 @@ Utility for cloning errata by date.
</listitem>
</varlistentry>
<varlistentry>
+ <term>-z --use-update-date</term>
+ <listitem>
+ <para>While cloning errata by date, clone all errata that have last been updated on or before the date provided by to_date. If omitted will use issue date of errata (default).</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
<term>-v --validate</term>
<listitem>
<para>Run repoclosure on all provided channels. This overrides --to_date and will not perform any cloning.</para>
commit 3f8e200c4ee6aa1fab10bdfe4bdaf27b641c4f28
Author: Paresh Mutha <pmutha(a)redhat.com>
Date: Fri Apr 5 15:22:44 2013 -0400
947942 - add spacewalk-clone-by-date --use-update-date
diff --git a/utils/cloneByDate.py b/utils/cloneByDate.py
index 3116685..22cf566 100644
--- a/utils/cloneByDate.py
+++ b/utils/cloneByDate.py
@@ -144,12 +144,13 @@ def main(options):
tree_cloner = ChannelTreeCloner(channel_list, xmlrpc, db,
options.to_date, options.blacklist,
options.removelist, options.background,
- options.security_only, options.parents)
+ options.security_only, options.use_update_date,
+ options.parents)
else:
tree_cloner = ChannelTreeCloner(channel_list, xmlrpc, db,
options.to_date, options.blacklist,
options.removelist, options.background,
- options.security_only)
+ options.security_only,options.use_update_date)
cloners.append(tree_cloner)
needed_channels += tree_cloner.needing_create().values()
@@ -202,7 +203,7 @@ class ChannelTreeCloner:
# pylint: disable=R0902
def __init__(self, channels, remote_api, db_api, to_date, blacklist,
removelist, detached,
- security_only, parents = None):
+ security_only, use_update_date, parents = None):
self.remote_api = remote_api
self.db_api = db_api
self.channel_map = channels
@@ -221,13 +222,14 @@ class ChannelTreeCloner:
self.channel_details = None
self.detached = detached
self.security_only = security_only
+ self.use_update_date = use_update_date
self.validate_source_channels()
for from_label in self.ordered_labels():
to_label = self.channel_map[from_label]
cloner = ChannelCloner(from_label, to_label, self.to_date,
self.remote_api, self.db_api, self.detached,
- self.security_only)
+ self.security_only,self.use_update_date)
self.cloners.append(cloner)
@@ -425,7 +427,7 @@ class ChannelTreeCloner:
class ChannelCloner:
# pylint: disable=R0902
def __init__(self, from_label, to_label, to_date, remote_api, db_api,
- detached, security_only):
+ detached, security_only, use_update_date):
self.remote_api = remote_api
self.db_api = db_api
self.from_label = from_label
@@ -438,6 +440,7 @@ class ChannelCloner:
self.old_pkg_hash = {}
self.detached = detached
self.security_only = security_only
+ self.use_update_date = use_update_date
def dest_label(self):
@@ -548,9 +551,13 @@ class ChannelCloner:
""" Returns tuple of all available for cloning, and what falls in the date range"""
available_errata = self.db_api.applicable_errata(self.from_label, self.to_label)
to_clone = []
-
+ if self.use_update_date:
+ date_to_use='update_date'
+ else:
+ date_to_use='issue_date'
+ print "Using ",date_to_use
for err in available_errata:
- if self.to_date and err['issue_date'].date() <= self.to_date.date():
+ if self.to_date and err[date_to_use].date() <= self.to_date.date():
if self.security_only:
if err['advisory_type'] == 'Security Advisory':
to_clone.append(err)
@@ -714,7 +721,7 @@ class DBApi:
"""list of errata that is applicable to be cloned, used db because we
need to exclude cloned errata too"""
h = rhnSQL.prepare("""
- select e.id, e.advisory_name, e.advisory_type, e.issue_date, e.synopsis
+ select e.id, e.advisory_name, e.advisory_type, e.issue_date, e.synopsis, e.update_date
from rhnErrata e inner join
rhnChannelErrata ce on e.id = ce.errata_id inner join
rhnChannel c on c.id = ce.channel_id
diff --git a/utils/spacewalk-clone-by-date b/utils/spacewalk-clone-by-date
index 0542e9d..c0faa51 100755
--- a/utils/spacewalk-clone-by-date
+++ b/utils/spacewalk-clone-by-date
@@ -154,6 +154,7 @@ def parse_args():
help="Already existing channels that will be used as the "
+ "original parent and destination parent of child "
+ "channels cloned this session.")
+ parser.add_option("--use-update-date", dest="use_update_date", action='store_true', help="While cloning errata by date, use Errata's update date. If omitted will use issue date of errata.")
(options, args) = parser.parse_args()
11 years, 1 month
Changes to 'refs/tags/spacewalk-web-1.10.17-1'
by Tomas Lestach
Tag 'spacewalk-web-1.10.17-1' created by Tomas Lestach <tlestach(a)redhat.com> at 2013-04-05 16:52 +0000
Tagging package [spacewalk-web] version [1.10.17-1] in directory [web/].
Changes since spacewalk-java-1.10.44-1:
Tomas Lestach (2):
add RHN::Form::Widget::Select to ChannelEditor
Automatic commit of package [spacewalk-web] release [1.10.17-1].
---
rel-eng/packages/spacewalk-web | 2 +-
web/modules/sniglets/Sniglets/ChannelEditor.pm | 4 +++-
web/spacewalk-web.spec | 5 ++++-
3 files changed, 8 insertions(+), 3 deletions(-)
---
11 years, 1 month
2 commits - rel-eng/packages web/modules web/spacewalk-web.spec
by Tomas Lestach
rel-eng/packages/spacewalk-web | 2 +-
web/modules/sniglets/Sniglets/ChannelEditor.pm | 4 +++-
web/spacewalk-web.spec | 5 ++++-
3 files changed, 8 insertions(+), 3 deletions(-)
New commits:
commit d61312bdd900dffcdbba8f9dc634e9f4a0a05434
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Fri Apr 5 18:52:40 2013 +0200
Automatic commit of package [spacewalk-web] release [1.10.17-1].
diff --git a/rel-eng/packages/spacewalk-web b/rel-eng/packages/spacewalk-web
index b5af448..89ec97a 100644
--- a/rel-eng/packages/spacewalk-web
+++ b/rel-eng/packages/spacewalk-web
@@ -1 +1 @@
-1.10.16-1 web/
+1.10.17-1 web/
diff --git a/web/spacewalk-web.spec b/web/spacewalk-web.spec
index 83f3eaa..8566ea0 100644
--- a/web/spacewalk-web.spec
+++ b/web/spacewalk-web.spec
@@ -4,7 +4,7 @@ Name: spacewalk-web
Summary: Spacewalk Web site - Perl modules
Group: Applications/Internet
License: GPLv2
-Version: 1.10.16
+Version: 1.10.17
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk/
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -261,6 +261,9 @@ rm -rf $RPM_BUILD_ROOT
# $Id$
%changelog
+* Fri Apr 05 2013 Tomas Lestach <tlestach(a)redhat.com> 1.10.17-1
+- add RHN::Form::Widget::Select to ChannelEditor
+
* Thu Mar 28 2013 Jan Pazdziora 1.10.16-1
- We use RHN::Form::ParsedForm so we should use it.
commit 896662ec682f240f225493f8d6dbb5f569983795
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Fri Apr 5 17:21:28 2013 +0200
add RHN::Form::Widget::Select to ChannelEditor
addressing:
Execution of /var/www/html/network/software/channels/manage/clone.pxt failed at Fri Apr 5 11:17:41 2013: Can't locate object method "new" via package "RHN::Form::Widget::Select" (perhaps you forgot to load "RHN::Form::Widget::Select"?) at /usr/share/perl5/vendor_perl/Sniglets/ChannelEditor.pm line 392.
diff --git a/web/modules/sniglets/Sniglets/ChannelEditor.pm b/web/modules/sniglets/Sniglets/ChannelEditor.pm
index f32367d..5ad8bf7 100644
--- a/web/modules/sniglets/Sniglets/ChannelEditor.pm
+++ b/web/modules/sniglets/Sniglets/ChannelEditor.pm
@@ -25,8 +25,10 @@ use Sniglets::Channel;
use RHN::DataSource::Package;
use RHN::DataSource::Channel;
-use RHN::Form::Widget::RadiobuttonGroup;
use RHN::Form::ParsedForm ();
+use RHN::Form::Widget::RadiobuttonGroup;
+use RHN::Form::Widget::Select;
+
sub register_tags {
my $class = shift;
11 years, 1 month
Changes to 'refs/tags/spacewalk-java-1.10.44-1'
by Tomas Lestach
Tag 'spacewalk-java-1.10.44-1' created by Tomas Lestach <tlestach(a)redhat.com> at 2013-04-05 16:51 +0000
Tagging package [spacewalk-java] version [1.10.44-1] in directory [java/].
Changes since spacewalk-schema-1.10.23-1:
Tomas Lestach (3):
896566 - simplify Channel.isChannelRepodataRequired method
896566 - a channel may have multiple dcms: lookupDistChannelMap -> listDistChannelMaps
Automatic commit of package [spacewalk-java] release [1.10.44-1].
---
java/code/src/com/redhat/rhn/domain/channel/Channel.java | 57 +---------
java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java | 10 -
java/code/src/com/redhat/rhn/frontend/action/channel/ssm/BaseSubscribeAction.java | 23 ++--
java/code/src/com/redhat/rhn/manager/channel/ChannelManager.java | 43 +++----
java/spacewalk-java.spec | 14 ++
rel-eng/packages/spacewalk-java | 2
6 files changed, 60 insertions(+), 89 deletions(-)
---
11 years, 1 month
3 commits - java/code java/spacewalk-java.spec rel-eng/packages
by Tomas Lestach
java/code/src/com/redhat/rhn/domain/channel/Channel.java | 57 +---------
java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java | 10 -
java/code/src/com/redhat/rhn/frontend/action/channel/ssm/BaseSubscribeAction.java | 23 ++--
java/code/src/com/redhat/rhn/manager/channel/ChannelManager.java | 43 +++----
java/spacewalk-java.spec | 14 ++
rel-eng/packages/spacewalk-java | 2
6 files changed, 60 insertions(+), 89 deletions(-)
New commits:
commit e250c586a3038c94be142ce78971f7cfa9b7702b
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Fri Apr 5 18:51:11 2013 +0200
Automatic commit of package [spacewalk-java] release [1.10.44-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index 8b6fd8b..6bd7145 100644
--- a/java/spacewalk-java.spec
+++ b/java/spacewalk-java.spec
@@ -28,7 +28,7 @@ Name: spacewalk-java
Summary: Spacewalk Java site packages
Group: Applications/Internet
License: GPLv2
-Version: 1.10.43
+Version: 1.10.44
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -678,6 +678,18 @@ fi
%{jardir}/postgresql-jdbc.jar
%changelog
+* Fri Apr 05 2013 Tomas Lestach <tlestach(a)redhat.com> 1.10.44-1
+- 896566 - a channel may have multiple dcms: lookupDistChannelMap ->
+ listDistChannelMaps
+- 896566 - simplify Channel.isChannelRepodataRequired method
+- link channel labels on /rhn/channels/manage/DistChannelMap.do page
+- 948185 - fixing checkstyle
+- 948185 - fix system.listSystemEvents on PG
+- removing unnecessary cast
+- removing unnecessarily nested else statement
+- enhance /rhn/errata/AllErrata.do
+- enhance /rhn/errata/RelevantErrata.do
+
* Thu Apr 04 2013 Grant Gainey 1.10.43-1
- 948605: checkstyle whitespace fixes. Sigh.
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index 8f06ddb..9637d96 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-1.10.43-1 java/
+1.10.44-1 java/
commit 09371cc6fbaed01f57428c0b1845a96824c55e60
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Fri Apr 5 16:34:20 2013 +0200
896566 - a channel may have multiple dcms: lookupDistChannelMap -> listDistChannelMaps
diff --git a/java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java b/java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java
index b37c19a..84c5164 100644
--- a/java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java
@@ -904,17 +904,17 @@ public class ChannelFactory extends HibernateFactory {
}
/**
- * Lookup the dist channel map for the given channel.
- * Returns null if none is found.
+ * Lookup dist channel mappings for the given channel.
+ * Returns empty list if none is found.
*
* @param c Channel to lookup mapping for
- * @return DistChannelMap, null if none is found
+ * @return list of dist channel mappings, empty list if none is found
*/
- public static DistChannelMap lookupDistChannelMap(Channel c) {
+ public static List<DistChannelMap> listDistChannelMaps(Channel c) {
Map params = new HashMap();
params.put("channel", c);
- return (DistChannelMap)singleton.lookupObjectByNamedQuery(
+ return singleton.listObjectsByNamedQuery(
"DistChannelMap.findByChannel", params);
}
diff --git a/java/code/src/com/redhat/rhn/frontend/action/channel/ssm/BaseSubscribeAction.java b/java/code/src/com/redhat/rhn/frontend/action/channel/ssm/BaseSubscribeAction.java
index 346ad4a..4b3de84 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/channel/ssm/BaseSubscribeAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/channel/ssm/BaseSubscribeAction.java
@@ -164,16 +164,19 @@ public class BaseSubscribeAction extends RhnLookupDispatchAction {
// First add an entry for the default base channel:
if (newBaseChannelId.intValue() == -1) {
log.debug("Default system base channel was selected.");
- DistChannelMap dcm = ChannelFactory.lookupDistChannelMap(oldBase);
- if (dcm != null && oldBase != null) {
- String version = dcm.getRelease();
- DistChannelMap defaultDcm =
- ChannelManager.lookupDistChannelMapByPnReleaseArch(
- ChannelManager.RHEL_PRODUCT_NAME, version,
- oldBase.getChannelArch());
- newBase = defaultDcm.getChannel();
- log.debug("Determined default base channel will be: " +
- newBase.getLabel());
+ List<DistChannelMap> dcms = ChannelFactory.listDistChannelMaps(oldBase);
+ if (!dcms.isEmpty() && oldBase != null) {
+ for (DistChannelMap dcm : dcms) {
+ String version = dcm.getRelease();
+ DistChannelMap defaultDcm =
+ ChannelManager.lookupDistChannelMapByPnReleaseArch(
+ ChannelManager.RHEL_PRODUCT_NAME, version,
+ oldBase.getChannelArch());
+ newBase = defaultDcm.getChannel();
+ log.debug("Determined default base channel will be: " +
+ newBase.getLabel());
+ break;
+ }
}
else {
// Looks like an EUS or custom channel, need to get a little crazy :(
diff --git a/java/code/src/com/redhat/rhn/manager/channel/ChannelManager.java b/java/code/src/com/redhat/rhn/manager/channel/ChannelManager.java
index ec20878..d82b30a 100644
--- a/java/code/src/com/redhat/rhn/manager/channel/ChannelManager.java
+++ b/java/code/src/com/redhat/rhn/manager/channel/ChannelManager.java
@@ -2076,30 +2076,31 @@ public class ChannelManager extends BaseManager {
List<EssentialChannelDto> eusBaseChans = new LinkedList<EssentialChannelDto>();
- DistChannelMap dcm = ChannelFactory.lookupDistChannelMap(inChan);
+ List<DistChannelMap> dcms = ChannelFactory.listDistChannelMaps(inChan);
ReleaseChannelMap rcm = lookupDefaultReleaseChannelMapForChannel(inChan);
- if (dcm != null) {
- log.debug("Found dist channel map");
- String version = dcm.getRelease(); // bad naming in rhnDistChannelMap
-
- // If the inChan is the default base channel, that channel will not have
- // compatibility entries in rhnReleaseChannelMap, and we are to assume
- // that ALL entries in that table for the product/version/channel arch
- // are valid replacement base channels:
- if (isDefaultBaseChannel(inChan, version)) {
- log.debug("inChan is default base channel");
- EssentialChannelDto latestEus = lookupLatestEusChannelForRhelVersion(u,
- version, inChan.getChannelArch().getId());
- if (latestEus != null) {
- log.debug("Including latest EUS channel: " +
- latestEus.getLabel());
- eusBaseChans.add(latestEus);
- }
- else {
- log.warn("Unable to lookup the latest EUS channel!");
+ if (!dcms.isEmpty()) {
+ for (DistChannelMap dcm : dcms) {
+ log.debug("Found dist channel map");
+ String version = dcm.getRelease(); // bad naming in rhnDistChannelMap
+
+ // If the inChan is the default base channel, that channel will not have
+ // compatibility entries in rhnReleaseChannelMap, and we are to assume
+ // that ALL entries in that table for the product/version/channel arch
+ // are valid replacement base channels:
+ if (isDefaultBaseChannel(inChan, version)) {
+ log.debug("inChan is default base channel");
+ EssentialChannelDto latestEus = lookupLatestEusChannelForRhelVersion(u,
+ version, inChan.getChannelArch().getId());
+ if (latestEus != null) {
+ log.debug("Including latest EUS channel: " +
+ latestEus.getLabel());
+ eusBaseChans.add(latestEus);
+ }
+ else {
+ log.warn("Unable to lookup the latest EUS channel!");
+ }
}
}
-
}
else if (rcm != null) {
log.debug("Found release channel map");
commit 525eb9b116a99815bf1437e50584500f660bdf85
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Fri Apr 5 16:12:49 2013 +0200
896566 - simplify Channel.isChannelRepodataRequired method
diff --git a/java/code/src/com/redhat/rhn/domain/channel/Channel.java b/java/code/src/com/redhat/rhn/domain/channel/Channel.java
index 49b1a62..f091476 100644
--- a/java/code/src/com/redhat/rhn/domain/channel/Channel.java
+++ b/java/code/src/com/redhat/rhn/domain/channel/Channel.java
@@ -52,9 +52,6 @@ public class Channel extends BaseDomainHelper implements Comparable {
public static final String PROTECTED = "protected";
public static final String PRIVATE = "private";
- private static List<String> releaseToSkipRepodata = new ArrayList<String>(Arrays
- .asList("2.1AS", "2.1ES", "2.1WS", "3AS", "3ES", "3WS", "3Desktop", "4AS",
- "4ES", "4WS", "4Desktop"));
private static List<String> archesToSkipRepodata = new ArrayList<String>(Arrays
.asList("channel-sparc-sun-solaris", "channel-i386-sun-solaris",
"channel-sparc"));
@@ -804,58 +801,16 @@ public class Channel extends BaseDomainHelper implements Comparable {
}
/**
- * does this Channel need repodata generated for it Criteria: 1. All custom
- * channels need repodata 2. RH channels need it if: They are made by RH The
- * top-most channel in their hierarchy (yes we currently only have 1 level
- * deep, but you know what assumptions make...) has a 'minor' version of 5
- * or higher Note: This makes an assumption that taxonomy will work the way
- * that it continues to work, or at least that version.compareTo will remain
- * valid and function only on minor version
- * @return Returns a boolena if repodata generation Required
+ * Does this channel need repodata generated
+ * @return Returns a boolean if repodata generation Required
*/
public boolean isChannelRepodataRequired() {
- boolean repodataRequired = false;
- // generate repodata for all custom channels except solaris
- if (this.isCustom() &&
- !archesToSkipRepodata.contains(this.channelArch.getLabel())) {
- repodataRequired = true;
- log.debug("isChannelRepodataRequired for channel(" + this.id +
- ") set to true because it is a custom Channel");
- }
-
- // Walk to the top of the tree
- Channel toConsider = this;
- while (toConsider.getParentChannel() != null) {
- toConsider = toConsider.getParentChannel();
- }
-
- String release = null;
- DistChannelMap channelDist = ChannelFactory.lookupDistChannelMap(toConsider);
- if (channelDist != null) {
- release = channelDist.getRelease();
- }
- else { // and now again for zstreams
- ReleaseChannelMap channelRelease =
- ChannelFactory.lookupDefaultReleaseChannelMapForChannel(toConsider);
- if (channelRelease != null) {
- release = channelRelease.getRelease();
- }
- }
- if (release != null) {
- if (!releaseToSkipRepodata.contains(release)) {
- repodataRequired = true;
- log.debug("isChannelRepodataRequired for channel(" + this.id + ") " +
- "set to true because top level parent has a release of " + release);
- }
- else {
- log.debug("isChannelRepodataRequired for channel(" + this.id + ") " +
- "set to false because we have'nt met the minimum release");
- }
+ // generate repodata for all channels having channel checksum set except solaris
+ if (archesToSkipRepodata.contains(this.channelArch.getLabel())) {
+ return true;
}
- log.debug("isChannelRepodataRequired for channel(" + this.id + ") = " +
- repodataRequired);
- return repodataRequired;
+ return checksumType != null;
}
/**
11 years, 1 month
Changes to 'refs/tags/spacewalk-schema-1.10.23-1'
by Milan Zazrivec
Tag 'spacewalk-schema-1.10.23-1' created by Milan Zazrivec <mzazrivec(a)redhat.com> at 2013-04-05 15:43 +0000
Tagging package [spacewalk-schema] version [1.10.23-1] in directory [schema/spacewalk/].
Changes since spacewalk-backend-1.10.16-1:
Milan Zazrivec (4):
Don't extend length of rhnPackageCapability.version if already extended
Insert new timezones only if they don't exist
sha1 sum fix
Automatic commit of package [spacewalk-schema] release [1.10.23-1].
---
rel-eng/packages/spacewalk-schema | 2
schema/spacewalk/spacewalk-schema.spec | 6 ++
schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/127-rhnPackageCapability-version.sql.oracle | 23 ++++++----
schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/127-rhnPackageCapability-version.sql.postgresql | 2
schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/144-rhnTimezone-data.sql | 15 +++++-
schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/004-rhnTimezone.sql | 17 +++++--
6 files changed, 46 insertions(+), 19 deletions(-)
---
11 years, 1 month
rel-eng/packages schema/spacewalk
by Milan Zazrivec
rel-eng/packages/spacewalk-schema | 2 +-
schema/spacewalk/spacewalk-schema.spec | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
New commits:
commit f7965f537fdd5d6891c51f6f58af260301dee1a5
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Fri Apr 5 17:43:51 2013 +0200
Automatic commit of package [spacewalk-schema] release [1.10.23-1].
diff --git a/rel-eng/packages/spacewalk-schema b/rel-eng/packages/spacewalk-schema
index c63c34e..5542264 100644
--- a/rel-eng/packages/spacewalk-schema
+++ b/rel-eng/packages/spacewalk-schema
@@ -1 +1 @@
-1.10.22-1 schema/spacewalk/
+1.10.23-1 schema/spacewalk/
diff --git a/schema/spacewalk/spacewalk-schema.spec b/schema/spacewalk/spacewalk-schema.spec
index 3dd41f7..13354d4 100644
--- a/schema/spacewalk/spacewalk-schema.spec
+++ b/schema/spacewalk/spacewalk-schema.spec
@@ -4,7 +4,7 @@ Name: spacewalk-schema
Group: Applications/Internet
Summary: Oracle SQL schema for Spacewalk server
-Version: 1.10.22
+Version: 1.10.23
Release: 1%{?dist}
Source0: %{name}-%{version}.tar.gz
@@ -71,6 +71,10 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/spacewalk-sql*
%changelog
+* Fri Apr 05 2013 Milan Zazrivec <mzazrivec(a)redhat.com> 1.10.23-1
+- Insert new timezones only if they don't exist
+- Don't extend length of rhnPackageCapability.version if already extended
+
* Thu Apr 04 2013 Milan Zazrivec <mzazrivec(a)redhat.com> 1.10.22-1
- add port to dblink_connect connect string
11 years, 1 month
schema/spacewalk
by Milan Zazrivec
schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/127-rhnPackageCapability-version.sql.postgresql | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 5bb27fe62567a9ca5d75049868cec308b02a270b
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Fri Apr 5 17:42:17 2013 +0200
sha1 sum fix
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/127-rhnPackageCapability-version.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/127-rhnPackageCapability-version.sql.postgresql
index 1a8473a..859169e 100644
--- a/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/127-rhnPackageCapability-version.sql.postgresql
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/127-rhnPackageCapability-version.sql.postgresql
@@ -1,4 +1,4 @@
--- oracle equivalent source sha1 45038e4725945641a777666cdae258c004b36599
+-- oracle equivalent source sha1 bab6fec2544f3c7473cfb642ff48db627ccee062
alter table rhnPackageCapability alter version type varchar(512) ;
11 years, 1 month
schema/spacewalk
by Milan Zazrivec
schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/144-rhnTimezone-data.sql | 15 +++++++-
schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/004-rhnTimezone.sql | 17 +++++++---
2 files changed, 24 insertions(+), 8 deletions(-)
New commits:
commit bb5e69275754b2aa8e92deec829be664f8b0bfe9
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Fri Apr 5 16:31:34 2013 +0200
Insert new timezones only if they don't exist
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/144-rhnTimezone-data.sql b/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/144-rhnTimezone-data.sql
index d747c69..635ddb3 100644
--- a/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/144-rhnTimezone-data.sql
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/144-rhnTimezone-data.sql
@@ -1,3 +1,12 @@
-INSERT INTO rhnTimezone (id, olson_name, display_name)
-VALUES (sequence_nextval('rhn_timezone_id_seq'),
- 'Africa/Johannesburg', 'South Africa (Johannesburg)');
+insert into rhnTimezone (id, olson_name, display_name) (
+ select sequence_nextval('rhn_timezone_id_seq'),
+ 'Africa/Johannesburg',
+ 'South Africa (Johannesburg)'
+ from dual
+ where not exists (
+ select 1
+ from rhnTimezone
+ where olson_name = 'Africa/Johannesburg'
+ and display_name = 'South Africa (Johannesburg)'
+ )
+);
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/004-rhnTimezone.sql b/schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/004-rhnTimezone.sql
index e40f9e7..6e9208e 100644
--- a/schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/004-rhnTimezone.sql
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.8-to-spacewalk-schema-1.9/004-rhnTimezone.sql
@@ -2,8 +2,15 @@ update rhnTimezone
set display_name = 'Australia (Eastern Daylight)'
where olson_name = 'Australia/Sydney';
-insert into rhnTimezone
- (id, olson_name, display_name)
-values
- (sequence_nextval('rhn_timezone_id_seq'),
- 'Australia/Brisbane', 'Australia (Eastern Standard)');
+insert into rhnTimezone (id, olson_name, display_name) (
+ select sequence_nextval('rhn_timezone_id_seq'),
+ 'Australia/Brisbane',
+ 'Australia (Eastern Standard)'
+ from dual
+ where not exists (
+ select 1
+ from rhnTimezone
+ where olson_name = 'Australia/Brisbane'
+ and display_name = 'Australia (Eastern Standard)'
+ )
+);
11 years, 1 month
schema/spacewalk
by Milan Zazrivec
schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/127-rhnPackageCapability-version.sql.oracle | 23 ++++++----
1 file changed, 15 insertions(+), 8 deletions(-)
New commits:
commit a198cc6757bdc9c1ccbb7cdc877e9554c83dda89
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Fri Apr 5 16:22:07 2013 +0200
Don't extend length of rhnPackageCapability.version if already extended
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/127-rhnPackageCapability-version.sql.oracle b/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/127-rhnPackageCapability-version.sql.oracle
index 1fabe97..47447e6 100644
--- a/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/127-rhnPackageCapability-version.sql.oracle
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/127-rhnPackageCapability-version.sql.oracle
@@ -1,8 +1,15 @@
-
-drop index rhn_pkg_cap_name_version_uq;
-
-alter table rhnPackageCapability modify version varchar2(512) ;
-
-CREATE UNIQUE INDEX rhn_pkg_cap_name_version_uq
- ON rhnPackageCapability (name, version);
-
+declare
+ len number;
+begin
+ select data_length into len
+ from user_tab_columns
+ where table_name = 'RHNPACKAGECAPABILITY'
+ and column_name = 'VERSION';
+
+ if len <> 512 then
+ execute immediate 'drop index rhn_pkg_cap_name_version_uq';
+ execute immediate 'alter table rhnPackageCapability modify version varchar2(512)';
+ execute immediate 'create unique index rhn_pkg_cap_name_version_uq on rhnPackageCapability (name, version)';
+ end
+end;
+/
11 years, 1 month