java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartPartitionCommandTest.java |
1
scripts/channel-to-update-level/README |
4 +
scripts/channel-to-update-level/create-channel-update |
22 +++++++---
3 files changed, 20 insertions(+), 7 deletions(-)
New commits:
commit 25e1e400a2108010ab494b23b9e3942d28e54f1f
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Thu Nov 19 14:02:10 2009 -0500
checkstyle fix
diff --git
a/java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartPartitionCommandTest.java
b/java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartPartitionCommandTest.java
index b024e13..5d3f335 100644
---
a/java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartPartitionCommandTest.java
+++
b/java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartPartitionCommandTest.java
@@ -14,7 +14,6 @@
*/
package com.redhat.rhn.manager.kickstart.test;
-import com.redhat.rhn.common.validator.ValidatorError;
import com.redhat.rhn.domain.kickstart.KickstartData;
import com.redhat.rhn.domain.kickstart.KickstartFactory;
import com.redhat.rhn.domain.kickstart.test.KickstartDataTest;
commit c38637017fe785a4acc9d5161a889b2c92120a78
Merge: d8419da... 5996584...
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Thu Nov 19 13:55:34 2009 -0500
Merge branch 'master' of ssh://jlsherrill@git.fedorahosted.org/git/spacewalk
commit d8419dada301b3c59e928d217c1267c651bb22ed
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Wed Nov 18 09:57:46 2009 -0500
adding small fix to script to support satellite 5.0
diff --git a/scripts/channel-to-update-level/README
b/scripts/channel-to-update-level/README
index 3a2ee28..4f632b0 100644
--- a/scripts/channel-to-update-level/README
+++ b/scripts/channel-to-update-level/README
@@ -43,6 +43,10 @@ README - This file
Changelog:
-----------
+11/18/2009 - 2.2
+- Fix broken Satellite 5.0 compatibility
+- Adding --name option to specify channel name
+
10/14/2009 - 2.1.3
- Adding 5u4 data files
diff --git a/scripts/channel-to-update-level/create-channel-update
b/scripts/channel-to-update-level/create-channel-update
index f39d16e..9c16ca1 100755
--- a/scripts/channel-to-update-level/create-channel-update
+++ b/scripts/channel-to-update-level/create-channel-update
@@ -235,7 +235,10 @@ def populate(client, auth, srcChannel, newChannel, newChannelName,
filename, par
nvre_to_push = splitFilename(rpm)
for src_pack in existing_packs:
if (nvre_to_push == splitPackage(src_pack)):
- if src_pack['name'] in skiplist:
+ key = 'name'
+ if not key in src_pack:
+ key = 'package_name'
+ if src_pack[key] in skiplist:
skip_num = skip_num + 1
continue
pack_num = pack_num + 1
commit 71a4cc6f993af17f296cff068631613d79a869ff
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Wed Nov 18 09:41:41 2009 -0500
This patch adds the [--name|-N] option to the options parser, which allows the end
user to specify
a channel name. The default behaviour is to set the channel name to the same as the
channel label.
Written by: Jon Fautley
diff --git a/scripts/channel-to-update-level/create-channel-update
b/scripts/channel-to-update-level/create-channel-update
index 2b7683e..f39d16e 100755
--- a/scripts/channel-to-update-level/create-channel-update
+++ b/scripts/channel-to-update-level/create-channel-update
@@ -44,7 +44,7 @@ client = None
def get_args():
global parser
parser = OptionParser(usage="""./create-channel-update -l USER -s
SERVER [-p PASSWORD] -v VERSION -r RELEASE
- -u UPDATE -a ARCH -e EXTRA [ -D DATAFILE] [-c SRCCHAN] -d DESTCHAN [-P
PARENT]
+ -u UPDATE -a ARCH -e EXTRA [ -D DATAFILE] [-c SRCCHAN] -d DESTCHAN [-N
DESTNAME] [-P PARENT]
[-C | --clear] [-n | --nossl]""")
parser.add_option("-n", "--nossl", action="store_false",
dest="ssl", default=True, help="disables the use of SSL when connecting to
the server")
parser.add_option("-C", "--clear", action="store_true",
dest="clear_channel", help="remove all channel packages from the channel
before adding")
@@ -64,6 +64,7 @@ def get_args():
parser.add_option("-K", "--skiplist", action="store",
dest="skiplist", help="a filename with a list of package names to ignore
when adding to the destination channel")
parser.add_option("-g", "--gather", action="store_true",
dest="gather", default=False , help='used to gather data files, generally
not useful to most people')
parser.add_option("-b", "--bundle", action="store",
dest="bundle", type='int', default='50', help='if you are
getting "502 proxy" errors, try using a smaller value (default 50)')
+ parser.add_option("-N", "--name", action="store",
dest="dest_name", help='if specified, set the descriptive name of the
destination channel, else use channel label')
return parser.parse_args()
@@ -150,6 +151,12 @@ def main():
newChannelLabel = options.dest_channel
newChannelLabel = newChannelLabel.lower()
srcChanLabel = options.source_channel
+
+ if not options.dest_name:
+ newChannelName = options.dest_channel
+ else:
+ newChannelName = options.dest_name
+
if (srcChanLabel == None):
print "You have not specified a source channel, we will try to determine it
from inputs"
srcChanLabel = findSrcChan(version, release, arch, extra)
@@ -170,10 +177,10 @@ def main():
if options.skiplist:
skiplist = read_skip_list(options.skiplist)
- populate(client, auth, srcChanLabel, newChannelLabel, filename, parent, clear,
skiplist=skiplist)
+ populate(client, auth, srcChanLabel, newChannelLabel, newChannelName, filename,
parent, clear, skiplist=skiplist)
-def populate(client, auth, srcChannel, newChannel, filename, parent, clear,
skiplist=[]):
+def populate(client, auth, srcChannel, newChannel, newChannelName, filename, parent,
clear, skiplist=[]):
chanList = client.channel.listSoftwareChannels(auth)
@@ -196,10 +203,10 @@ def populate(client, auth, srcChannel, newChannel, filename, parent,
clear, skip
if new_label == None:
if not clone:
print("Creating channel, " + newChannel + ", with arch " +
arch_label),
- client.channel.software.create(auth, newChannel, newChannel, newChannel,
getArchLabel(arch_label, client, auth), parent)
+ client.channel.software.create(auth, newChannel, newChannelName, newChannel,
getArchLabel(arch_label, client, auth), parent)
if clone:
print("Cloning channel " + srcChannel + " to " +
newChannel),
- details_map = { 'name':newChannel, 'label':newChannel,
'summary':newChannel }
+ details_map = { 'name':newChannelName, 'label':newChannel,
'summary':newChannel }
if parent:
details_map['parent_label'] = parent
client.channel.software.clone(auth, srcChannel, details_map, True)