backend/spacewalk-backend.spec
by Miroslav Suchý
backend/spacewalk-backend.spec | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit 3a2f8e0e05fba2504c47ae986a8642bb6cc256d1
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Mar 31 10:57:23 2010 +0200
175155 - require specific version of rhnlib
This is due BZs 567989 and 564299
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index c72d8a0..5debe9a 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -220,7 +220,11 @@ Requires: PyXML
Requires: mod_ssl
Requires: %{name}-xml-export-libs
Requires: cobbler >= 1.4.3
-Requires: rhnlib >= 2.5.20
+%if 0%{?rhel} && 0%{?rhel} < 5
+Requires: rhnlib >= 2.1.4-14
+%else
+Requires: rhnlib >= 2.5.22
+%endif
Obsoletes: rhns-satellite-tools < 5.3.0
Obsoletes: spacewalk-backend-satellite-tools <= 0.2.7
Provides: rhns-satellite-tools = %{version}-%{release}
14 years
Changes to 'refs/tags/rhn-client-tools-0.9.10-1'
by Jan Pazdziora
Tag 'rhn-client-tools-0.9.10-1' created by Jan Pazdziora <jpazdziora(a)redhat.com> at 2010-03-31 08:03 +0000
Tagging package [rhn-client-tools] version [0.9.10-1] in directory [client/rhel/rhn-client-tools/].
Changes since spacewalk-backend-0.9.17-1:
Jan Pazdziora (9):
Make the "System software updates already set up" window part of the normal workflow.
There are only 4 elements in InfoWindow.
There are only 7 elements in OSReleaseWindow.
There are only 7 elements in HardwareWindow.
There are only 5 elements in PackagesWindow.
Make the sending progress bar into its own class.
Make the ReviewWindow part of the normal workflow.
The loop will be terminated upon the next while test.
Automatic commit of package [rhn-client-tools] release [0.9.10-1].
Justin Sherrill (1):
making exits better and fixing wrongly named extra channel
Partha Aji (1):
522497 - Fixed a ks system details bug
---
client/rhel/rhn-client-tools/rhn-client-tools.spec | 6
client/rhel/rhn-client-tools/src/up2date_client/tui.py | 205 ++++++----
java/code/src/com/redhat/rhn/frontend/action/kickstart/SystemDetailsEditAction.java | 12
java/code/webapp/WEB-INF/pages/kickstart/systemdetails.jsp | 10
java/code/webapp/WEB-INF/struts-config.xml | 1
rel-eng/packages/rhn-client-tools | 2
scripts/channel-to-update-level/create-channel-update | 10
7 files changed, 139 insertions(+), 107 deletions(-)
---
14 years
client/rhel rel-eng/packages
by Jan Pazdziora
client/rhel/rhn-client-tools/rhn-client-tools.spec | 6 +++++-
rel-eng/packages/rhn-client-tools | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 781e0c82bf9a93a42eee18c340f051304925b1fe
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Mar 31 10:03:26 2010 +0200
Automatic commit of package [rhn-client-tools] release [0.9.10-1].
diff --git a/client/rhel/rhn-client-tools/rhn-client-tools.spec b/client/rhel/rhn-client-tools/rhn-client-tools.spec
index 8a43f44..866ec80 100644
--- a/client/rhel/rhn-client-tools/rhn-client-tools.spec
+++ b/client/rhel/rhn-client-tools/rhn-client-tools.spec
@@ -4,7 +4,7 @@ Group: System Environment/Base
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
URL: https://fedorahosted.org/spacewalk
Name: rhn-client-tools
-Version: 0.9.9
+Version: 0.9.10
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -239,6 +239,10 @@ make -f Makefile.rhn-client-tools test
%{_datadir}/applications/rhn_register.desktop
%changelog
+* Wed Mar 31 2010 Jan Pazdziora 0.9.10-1
+- Code cleanup.
+- Remove installation number activation.
+
* Mon Mar 29 2010 Jan Pazdziora 0.9.9-1
- Code cleanup.
- Add back invocation of _activate_hardware, for hosted.
diff --git a/rel-eng/packages/rhn-client-tools b/rel-eng/packages/rhn-client-tools
index adf2e9f..d097d9a 100644
--- a/rel-eng/packages/rhn-client-tools
+++ b/rel-eng/packages/rhn-client-tools
@@ -1 +1 @@
-0.9.9-1 client/rhel/rhn-client-tools/
+0.9.10-1 client/rhel/rhn-client-tools/
14 years
java/code
by Partha Aji
java/code/src/com/redhat/rhn/frontend/action/kickstart/SystemDetailsEditAction.java | 12 ++--------
java/code/webapp/WEB-INF/pages/kickstart/systemdetails.jsp | 10 +-------
java/code/webapp/WEB-INF/struts-config.xml | 1
3 files changed, 5 insertions(+), 18 deletions(-)
New commits:
commit b7fc787a7db0c9443c778b446fb14eb0aaaf5c2f
Author: Partha Aji <paji(a)redhat.com>
Date: Tue Mar 30 15:54:49 2010 -0400
522497 - Fixed a ks system details bug
The root passwords and passwords were being confirmed with wrong logic .
diff --git a/java/code/src/com/redhat/rhn/frontend/action/kickstart/SystemDetailsEditAction.java b/java/code/src/com/redhat/rhn/frontend/action/kickstart/SystemDetailsEditAction.java
index ea30696..0c343b9 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/kickstart/SystemDetailsEditAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/kickstart/SystemDetailsEditAction.java
@@ -50,7 +50,6 @@ import javax.servlet.http.HttpServletResponse;
public class SystemDetailsEditAction extends RhnAction {
public static final String SE_LINUX_PARAM = "selinuxMode";
- private static final String PWD_CHANGED_PARAM = "pwdChanged";
/**
* {@inheritDoc}
@@ -121,11 +120,6 @@ public class SystemDetailsEditAction extends RhnAction {
RequestContext ctx = new RequestContext(request);
KickstartData ksdata = lookupKickstart(ctx, dynaForm);
request.setAttribute("ksdata", ksdata);
-
- if (StringUtils.isBlank(dynaForm.getString(PWD_CHANGED_PARAM))) {
- dynaForm.set("rootPassword", null);
- dynaForm.set("rootPasswordConfirm", null);
- }
try {
transferEdits(dynaForm, ksdata, ctx);
@@ -199,9 +193,9 @@ public class SystemDetailsEditAction extends RhnAction {
private void transferRootPasswordEdits(DynaActionForm form,
SystemDetailsCommand command) {
- if (!StringUtils.isBlank(form.getString(PWD_CHANGED_PARAM))) {
- String rootPw = form.getString("rootPassword");
- String rootPwConfirm = form.getString("rootPasswordConfirm");
+ String rootPw = form.getString("rootPassword");
+ String rootPwConfirm = form.getString("rootPasswordConfirm");
+ if (!StringUtils.isBlank(rootPw) || !StringUtils.isBlank(rootPwConfirm)) {
command.updateRootPassword(rootPw, rootPwConfirm);
}
}
diff --git a/java/code/webapp/WEB-INF/pages/kickstart/systemdetails.jsp b/java/code/webapp/WEB-INF/pages/kickstart/systemdetails.jsp
index d9e34f1..d7ffd92 100644
--- a/java/code/webapp/WEB-INF/pages/kickstart/systemdetails.jsp
+++ b/java/code/webapp/WEB-INF/pages/kickstart/systemdetails.jsp
@@ -23,11 +23,6 @@
toEnable.value = toDisable.value;
toDisable.value = "";
}
-
- function flagPassword() {
- var pwdChanged = document.getElementById("pwdChanged");
- pwdChanged.value = "true";
- }
// Workaround for apparent Firefox bug. See Red Hat Bugzilla #459411.
function init() {
@@ -61,7 +56,6 @@ boolean staticIfDisabled = Boolean.valueOf(
<html:form method="post" action="/kickstart/SystemDetailsEdit.do">
<html:hidden property="ksid" />
<html:hidden property="submitted" />
- <html:hidden property="pwdChanged" styleId="pwdChanged" />
<h2><bean:message key="kickstart.systemdetails.jsp.header1"/></h2>
<c:if test="${not ksdata.legacyKickstart}">
<h2><bean:message key="kickstart.systemdetails.jsp.header2"/></h2>
@@ -95,11 +89,11 @@ boolean staticIfDisabled = Boolean.valueOf(
<table class="details">
<tr>
<th><bean:message key="kickstart.root.password.jsp.label" />:</th>
- <td><html:password property="rootPassword" maxlength="32" size="32" onchange="flagPassword(); return true;"/></td>
+ <td><html:password property="rootPassword" maxlength="32" size="32" redisplay="false"/></td>
</tr>
<tr>
<th><bean:message key="kickstart.root.password.verify.jsp.label" />:</th>
- <td><html:password property="rootPasswordConfirm" maxlength="32" size="32" onchange="flagPassword(); return true;"/></td>
+ <td><html:password property="rootPasswordConfirm" maxlength="32" size="32" redisplay="false"/></td>
</tr>
<tr>
<td align="right" colspan="2">
diff --git a/java/code/webapp/WEB-INF/struts-config.xml b/java/code/webapp/WEB-INF/struts-config.xml
index b627bf4..6c919f8 100644
--- a/java/code/webapp/WEB-INF/struts-config.xml
+++ b/java/code/webapp/WEB-INF/struts-config.xml
@@ -638,7 +638,6 @@
<form-property name="rootPassword" type="java.lang.String" />
<form-property name="rootPasswordConfirm" type="java.lang.String" />
<form-property name="submitted" type="java.lang.Boolean" />
- <form-property name="pwdChanged" type="java.lang.String" />
</form-bean>
<form-bean name="kickstartScriptForm"
14 years
3 commits - client/rhel
by Jan Pazdziora
client/rhel/rhn-client-tools/src/up2date_client/tui.py | 84 +++++++++--------
1 file changed, 49 insertions(+), 35 deletions(-)
New commits:
commit 70358db3dcc8edbc07c3f14ca5fb71872653a5d7
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Mar 30 16:15:03 2010 +0200
The loop will be terminated upon the next while test.
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/tui.py b/client/rhel/rhn-client-tools/src/up2date_client/tui.py
index 5dcb181..54aaee8 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/tui.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/tui.py
@@ -392,11 +392,8 @@ class InfoWindow:
button = "next"
if button == "next":
-
valid = self.validateFields()
- if valid == 0:
- continue
-
+
else:
break
commit 28cb0edb937da1f96f7ee3c63c3fa0ce1517cbd2
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Mar 30 16:13:26 2010 +0200
Make the ReviewWindow part of the normal workflow.
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/tui.py b/client/rhel/rhn-client-tools/src/up2date_client/tui.py
index 6871c31..5dcb181 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/tui.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/tui.py
@@ -953,10 +953,6 @@ class FinishWindow:
self.g = toplevel
- # Review Window
- rw = ReviewWindow(self.screen, self.tui, self.tui.reg_info)
- rw_results = rw.run()
-
def saveResults(self):
pass
@@ -972,11 +968,11 @@ class FinishWindow:
class ReviewWindow:
- def __init__(self, screen, tui, reg_info):
+ def __init__(self, screen, tui):
self.name = "ReviewWindow"
self.screen = screen
self.tui = tui
- self.reg_info = reg_info
+ self.reg_info = tui.reg_info
size = snack._snack.size()
toplevel = snack.GridForm(screen, REVIEW_WINDOW, 1, 2)
@@ -1035,7 +1031,7 @@ class ReviewWindow:
toplevel.add(self.review_window, 0, 0, padding = (0, 1, 0, 0))
# BUTTON BAR
- self.bb = snack.ButtonBar(screen, [(OK, "ok")])
+ self.bb = snack.ButtonBar(screen, [(OK, "next")])
toplevel.add(self.bb, 0, 1, padding = (0, 1, 0, 0),
growx = 1)
@@ -1050,7 +1046,7 @@ class ReviewWindow:
button = self.bb.buttonPressed(result)
if result == "F12":
- return "ok"
+ return "next"
return button
@@ -1078,6 +1074,7 @@ class Tui:
PackagesWindow,
SendWindow,
SendingWindow,
+ ReviewWindow,
FinishWindow
]
commit 4662857be73774884ec1f0706c76d2197e75528a
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Mar 30 16:57:45 2010 +0200
Make the sending progress bar into its own class.
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/tui.py b/client/rhel/rhn-client-tools/src/up2date_client/tui.py
index 7eca4b2..6871c31 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/tui.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/tui.py
@@ -788,33 +788,23 @@ class SendWindow:
return "next"
return button
-class FinishWindow:
+class SendingWindow:
def __init__(self, screen, tui):
- self.name = "FinishWindow"
self.screen = screen
self.tui = tui
+ self.name = "SendingWindow"
size = snack._snack.size()
-
- toplevel = snack.GridForm(screen, FINISH_WINDOW,
- 1, 2)
-
- text = snack.TextboxReflowed(size[0]-11, FINISH_WINDOW_TEXT_TUI)
- toplevel.add(text, 0, 0)
-
- # BUTTON BAR
- self.bb = snack.ButtonBar(screen,
- [(_("Finish"), "next")])
- toplevel.add(self.bb, 0, 1, padding = (0, 1, 0, 0),
- growx = 1)
-
- self.g = toplevel
self.pwin = snack.GridForm(screen, _("Sending Profile to Red Hat Network"),
1, 1)
self.scale = snack.Scale(40, 100)
self.pwin.add(self.scale, 0, 0)
+
+ def run(self):
+ log.log_debug("Running %s" % self.__class__.__name__)
+
self.pwin.draw()
self.screen.refresh()
@@ -827,8 +817,8 @@ class FinishWindow:
# 'failed_channels', 'slots', 'failed_slots'
log.log_debug('other is %s' % str(self.tui.other))
- reg_info = rhnreg.registerSystem2(tui.userName, tui.password,
- tui.profileName,
+ reg_info = rhnreg.registerSystem2(self.tui.userName, self.tui.password,
+ self.tui.profileName,
other = self.tui.other)
reg_info = reg_info.rawDict
@@ -868,7 +858,7 @@ class FinishWindow:
# send product registration information
if rhnreg.cfg['supportsUpdateContactInfo']:
try:
- rhnreg.updateContactInfo(tui.userName, tui.password, self.tui.productInfo)
+ rhnreg.updateContactInfo(self.tui.userName, self.tui.password, self.tui.productInfo)
except up2dateErrors.CommunicationError, e:
FatalErrorWindow(self.screen, _("Problem registering personal information:\n") + e.errmsg)
except:
@@ -893,9 +883,9 @@ class FinishWindow:
self.setScale(2, 4)
# maybe upload hardware profile
- if tui.includeHardware:
+ if self.tui.includeHardware:
try:
- rhnreg.sendHardware(systemId, tui.hardware)
+ rhnreg.sendHardware(systemId, self.tui.hardware)
except up2dateErrors.CommunicationError, e:
FatalErrorWindow(self.screen,
_("Problem sending hardware profile:\n") + e.errmsg)
@@ -907,9 +897,9 @@ class FinishWindow:
self.setScale(3, 4)
# build up package list if necessary
- if tui.includePackages:
+ if self.tui.includePackages:
try:
- rhnreg.sendPackages(systemId, tui.selectedPackages)
+ rhnreg.sendPackages(systemId, self.tui.selectedPackages)
except up2dateErrors.CommunicationError, e:
FatalErrorWindow(self.screen, _("Problem sending package list:\n") + e.errmsg)
except:
@@ -924,20 +914,49 @@ class FinishWindow:
rhnreg.spawnRhnCheckForUI()
self.setScale(4, 4)
-
- # Review Window
- rw = ReviewWindow(self.screen, self.tui, reg_info)
- rw_results = rw.run()
# Pop the pwin (Progress bar window)
self.screen.popWindow()
+ self.tui.reg_info = reg_info
+
+ return "next"
+
+ def saveResults(self):
+ pass
+
def setScale(self, amount, total):
self.scale.set(int(((amount * 1.0)/ total) * 100))
self.pwin.draw()
self.screen.refresh()
+class FinishWindow:
+
+ def __init__(self, screen, tui):
+ self.name = "FinishWindow"
+ self.screen = screen
+ self.tui = tui
+ size = snack._snack.size()
+
+ toplevel = snack.GridForm(screen, FINISH_WINDOW,
+ 1, 2)
+
+ text = snack.TextboxReflowed(size[0]-11, FINISH_WINDOW_TEXT_TUI)
+ toplevel.add(text, 0, 0)
+
+ # BUTTON BAR
+ self.bb = snack.ButtonBar(screen,
+ [(_("Finish"), "next")])
+ toplevel.add(self.bb, 0, 1, padding = (0, 1, 0, 0),
+ growx = 1)
+
+ self.g = toplevel
+
+ # Review Window
+ rw = ReviewWindow(self.screen, self.tui, self.tui.reg_info)
+ rw_results = rw.run()
+
def saveResults(self):
pass
@@ -1058,6 +1077,7 @@ class Tui:
HardwareWindow,
PackagesWindow,
SendWindow,
+ SendingWindow,
FinishWindow
]
14 years
scripts/channel-to-update-level
by Justin Sherrill
scripts/channel-to-update-level/create-channel-update | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
New commits:
commit 88ca04a81d3e1a3f4aacbf421a0e44667833d749
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Tue Mar 30 10:40:02 2010 -0400
making exits better and fixing wrongly named extra channel
diff --git a/scripts/channel-to-update-level/create-channel-update b/scripts/channel-to-update-level/create-channel-update
index a64c1ca..950e7db 100755
--- a/scripts/channel-to-update-level/create-channel-update
+++ b/scripts/channel-to-update-level/create-channel-update
@@ -111,7 +111,7 @@ def main():
if options.gather:
gather(False)
- exit(0)
+ sys.exit(0)
validate_options(options)
@@ -143,7 +143,7 @@ def main():
if not os.path.exists(fullpath):
print "Error: data file '" + filename + "' does not exist"
- exit(1)
+ sys.exit(1)
parent = options.parent_channel
clone = options.clone
@@ -199,7 +199,7 @@ def populate(client, auth, srcChannel, newChannel, newChannelName, filename, par
if src_label == None:
print("Error: Source Channel '" + srcChannel + "' could not be found.")
- exit(1)
+ sys.exit(1)
if new_label == None:
if not clone:
print("Creating channel, " + newChannel + ", with arch " + arch_label),
@@ -345,7 +345,7 @@ def findSrcChan(version, release, arch, extra = None):
low_extra = extra.lower()
if low_extra == "clusterstorage":
low_extra = "cluster-storage"
- if low_extra == "extra":
+ if low_extra == "extras":
return "rhel-%s-%s-%s-%s" % (arch, low_release, version, low_extra)
else:
return "rhel-%s-%s-%s-%s" % (arch, low_release, low_extra, version )
@@ -416,7 +416,7 @@ Add the extra's channel as a child channel of 'my-stable-channel':
def error(msg):
print msg
- exit(-1)
+ sys.exit(-1)
if __name__ == "__main__":
14 years
5 commits - client/rhel
by Jan Pazdziora
client/rhel/rhn-client-tools/src/up2date_client/tui.py | 121 ++++++++++-------
1 file changed, 74 insertions(+), 47 deletions(-)
New commits:
commit 47058a3a33bff071edca322639d240f282c41321
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Mar 30 15:51:28 2010 +0200
There are only 5 elements in PackagesWindow.
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/tui.py b/client/rhel/rhn-client-tools/src/up2date_client/tui.py
index 3229ec8..7eca4b2 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/tui.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/tui.py
@@ -677,24 +677,24 @@ class PackagesWindow:
self.tui = tui
size = snack._snack.size()
toplevel = snack.GridForm(screen, _("Register a System Profile - Packages"),
- 1, 7)
+ 1, 5)
self.g = toplevel
text = snack.TextboxReflowed(size[0]-10, _("RPM information is important to determine what updated software packages are relevant to this system."))
- toplevel.add(text, 0, 1, anchorLeft = 1)
+ toplevel.add(text, 0, 0, anchorLeft = 1)
self.packagesButton = snack.Checkbox(_("Include RPM packages installed on this system in my System Profile"), 1)
- toplevel.add(self.packagesButton, 0, 2, padding = (0, 1, 0, 1),
+ toplevel.add(self.packagesButton, 0, 1, padding = (0, 1, 0, 1),
anchorLeft = 1)
label = snack.Label(_("You may deselect individual packages by unchecking them below."))
- toplevel.add(label, 0, 3, anchorLeft = 1)
+ toplevel.add(label, 0, 2, anchorLeft = 1)
#self.packageList = snack.Listbox(size[1]-18, 1, width = size[0]-10)
self.packageList = snack.CheckboxTree(size[1]-18, 1)
- toplevel.add(self.packageList, 0, 4)
+ toplevel.add(self.packageList, 0, 3)
# do we need to read the packages from disk?
if tui.packageList == []:
@@ -723,7 +723,7 @@ class PackagesWindow:
[(NEXT, "next"),
(BACK, "back"),
(CANCEL, "cancel")])
- toplevel.add(self.bb, 0, 5, padding = (0, 1, 0, 0),
+ toplevel.add(self.bb, 0, 4, padding = (0, 1, 0, 0),
growx = 1)
commit 549d1530d7a1ed42a587e8601772c4d9c0f8ac38
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Mar 30 15:47:26 2010 +0200
There are only 7 elements in HardwareWindow.
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/tui.py b/client/rhel/rhn-client-tools/src/up2date_client/tui.py
index c05294a..3229ec8 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/tui.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/tui.py
@@ -564,7 +564,7 @@ class HardwareWindow:
tui.hardware = hardware.Hardware()
toplevel = snack.GridForm(screen, _("Register a System Profile - Hardware"),
- 1, 8)
+ 1, 7)
text = snack.TextboxReflowed(70, _("A Profile Name is a descriptive name that you choose to identify this System Profile on the Red Hat Network web pages. Optionally, include a computer serial or identification number."))
commit fd48a81be27571322b30436a93f98feec9c1bd4f
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Mar 30 15:46:23 2010 +0200
There are only 7 elements in OSReleaseWindow.
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/tui.py b/client/rhel/rhn-client-tools/src/up2date_client/tui.py
index 50d0f74..c05294a 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/tui.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/tui.py
@@ -425,12 +425,12 @@ class OSReleaseWindow:
self.selectChannel = False
toplevel = snack.GridForm(self.screen,
- _("Select Operating System Release"), 1, 10)
+ _("Select Operating System Release"), 1, 7)
self.g = toplevel
self.ostext = snack.TextboxReflowed(self.size[0]-10,
_("Operating System version:"))
- toplevel.add(self.ostext, 0, 1, anchorLeft = 1)
+ toplevel.add(self.ostext, 0, 0, anchorLeft = 1)
optiontext1 = _("Limited Updates Only")
if self.tui.limited_updates_button:
@@ -440,15 +440,15 @@ class OSReleaseWindow:
self.limited_updates_button = snack.SingleRadioButton(optiontext1,
None)
- toplevel.add(self.limited_updates_button, 0, 2, padding = (0, 1, 0, 1),
+ toplevel.add(self.limited_updates_button, 0, 1, padding = (0, 1, 0, 1),
anchorLeft = 1)
self.sublabel = snack.Label(_(" Minor Release: "))
- toplevel.add(self.sublabel, 0, 4, anchorLeft = 1)
+ toplevel.add(self.sublabel, 0, 2, anchorLeft = 1)
self.channelList = snack.Listbox(self.size[1]-22, 1,
width = self.size[0]-10)
- toplevel.add(self.channelList, 0, 5)
+ toplevel.add(self.channelList, 0, 3)
for key, value in self.available_channels['channels'].items():
if key in self.available_channels['receiving_updates']:
@@ -456,7 +456,7 @@ class OSReleaseWindow:
self.channelList.append(" " + value, key)
self.tip = snack.TextboxReflowed(self.size[0]-10, CHANNEL_PAGE_TIP)
- toplevel.add(self.tip, 0, 6, anchorLeft = 1)
+ toplevel.add(self.tip, 0, 4, anchorLeft = 1)
optiontext2 = _("All available updates")
@@ -467,7 +467,7 @@ class OSReleaseWindow:
self.all_updates_button = snack.SingleRadioButton(optiontext2,
self.limited_updates_button)
- toplevel.add(self.all_updates_button, 0, 7, padding = (0, 0, 0, 1),
+ toplevel.add(self.all_updates_button, 0, 5, padding = (0, 0, 0, 1),
anchorLeft = 1)
#self.warning = snack.TextboxReflowed(self.size[0]-10,
@@ -479,7 +479,7 @@ class OSReleaseWindow:
[(NEXT, "next"),
(BACK, "back"),
(CANCEL, "cancel")])
- toplevel.add(self.bb, 0, 9, growx = 1)
+ toplevel.add(self.bb, 0, 6, growx = 1)
self.screen.refresh()
commit 0eccd5fc9496dab7c1cc85a0df261f405c7b9579
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Mar 30 15:10:16 2010 +0200
There are only 4 elements in InfoWindow.
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/tui.py b/client/rhel/rhn-client-tools/src/up2date_client/tui.py
index 3751d57..50d0f74 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/tui.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/tui.py
@@ -290,7 +290,7 @@ class InfoWindow:
size = snack._snack.size()
- toplevel = snack.GridForm(screen, REGISTER_WINDOW, 1, 12)
+ toplevel = snack.GridForm(screen, REGISTER_WINDOW, 1, 4)
# Satellite
if self.tui.serverType == 'satellite':
@@ -332,10 +332,10 @@ class InfoWindow:
self.passwordEntry.set(tui.password)
grid.setField(self.passwordEntry, 1, 1, anchorLeft = 1)
- toplevel.add(grid, 0, 3)
+ toplevel.add(grid, 0, 1)
label = snack.TextboxReflowed(size[0]-10, login_tip)
- toplevel.add(label, 0, 4, anchorLeft=1)
+ toplevel.add(label, 0, 2, anchorLeft=1)
# BUTTON BAR
self.bb = snack.ButtonBar(screen,
@@ -343,7 +343,7 @@ class InfoWindow:
(BACK, "back"),
(CANCEL, "cancel")])
- toplevel.add(self.bb, 0, 8, padding = (0, 1, 0, 0),
+ toplevel.add(self.bb, 0, 3, padding = (0, 1, 0, 0),
growx = 1)
commit 7bf3676889ad1f048ae4919975a8510d3af2a0fb
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Mar 30 14:04:57 2010 +0200
Make the "System software updates already set up" window part of the normal workflow.
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/tui.py b/client/rhel/rhn-client-tools/src/up2date_client/tui.py
index ba9282f..3751d57 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/tui.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/tui.py
@@ -93,6 +93,53 @@ class WindowSkipException:
def __init__(self):
pass
+class AlreadyRegisteredWindow:
+
+ def __init__(self, screen, tui):
+
+ if not rhnreg.registered() or tui.test:
+ raise WindowSkipException()
+
+ self.name = "AlreadyRegisteredWindow"
+ self.screen = screen
+ self.tui = tui
+ size = snack._snack.size()
+
+ systemIdXml = rpclib.xmlrpclib.loads(up2dateAuth.getSystemId())
+ oldUsername = systemIdXml[0][0]['username']
+ oldsystemId = systemIdXml[0][0]['system_id']
+
+ toplevel = snack.GridForm(self.screen, _("System software updates already set up"), 1, 2)
+ tb = snack.Textbox(size[0]-30, size[1]-20,
+ SYSTEM_ALREADY_REGISTERED + "\n\n"
+ + _("Red Hat Network Location:") + " " + self.tui.serverURL + "\n"
+ + _("Login:") + " " + oldUsername + "\n"
+ + _("System ID:") + " " + oldsystemId + "\n\n"
+ + SYSTEM_ALREADY_REGISTERED_CONT + "\n",
+ 1, 1)
+ toplevel.add(tb, 0, 0, padding = (0, 0, 0, 1))
+
+ self.bb = snack.ButtonBar(self.screen,
+ [(YES_CONT, "next"),
+ (NO_CANCEL, "exit")])
+ toplevel.add(self.bb, 0, 1, growx = 1)
+
+ self.g = toplevel
+
+ def saveResults(self):
+ pass
+
+ def run(self):
+ log.log_debug("Running %s" % self.__class__.__name__)
+
+ result = self.g.runOnce()
+ button = self.bb.buttonPressed(result)
+
+ if result == "F12":
+ return "next"
+
+ return button
+
class ConnectWindow:
def __init__(self, screen, tui):
@@ -990,8 +1037,9 @@ class ReviewWindow:
class Tui:
- def __init__(self, screen):
+ def __init__(self, screen, test):
self.screen = screen
+ self.test = test
self.size = snack._snack.size()
self.drawFrame()
self.alreadyRegistered = 0
@@ -1002,6 +1050,7 @@ class Tui:
"Only https and http are allowed."))
self.windows = [
+ AlreadyRegisteredWindow,
ConnectWindow,
StartWindow,
InfoWindow,
@@ -1118,6 +1167,7 @@ class Tui:
log.log_debug("index is %s" % index)
result = win.run()
+ log.log_debug("Result %s" % result)
if result == "back":
if index > 0:
@@ -1125,6 +1175,9 @@ class Tui:
direction = "backward"
+ elif result == "exit":
+ return
+
elif result == "cancel":
log.log_debug("Caught a cancel request")
@@ -1154,33 +1207,7 @@ def main():
if geteuid() != 0 and not test:
FatalErrorWindow(screen, _("You must run the RHN registration program as root."))
-
- if rhnreg.registered() and not test:
-
-
- systemIdXml = rpclib.xmlrpclib.loads(up2dateAuth.getSystemId())
- oldUsername = systemIdXml[0][0]['username']
- oldsystemId = systemIdXml[0][0]['system_id']
- if type(cfg['serverURL']) == type([]):
- oldserver = cfg['serverURL'][0]
- else:
- oldserver = cfg['serverURL']
-
- if snack.ButtonChoiceWindow(screen,
- _("System software updates already set up"),
- SYSTEM_ALREADY_REGISTERED + "\n\n"
- + _("Red Hat Network Location:") + " " + oldserver + "\n"
- + _("Login:") + " " + oldUsername + "\n"
- + _("System ID:") + " " + oldsystemId + "\n\n"
- + SYSTEM_ALREADY_REGISTERED_CONT + "\n",
- buttons = [YES_CONT, NO_CANCEL],
- width = 75,
- ) == string.lower(NO_CANCEL):
-
- screen.finish()
- sys.exit(1)
-
- tui = Tui(screen)
+ tui = Tui(screen, test)
tui.run()
14 years
Changes to 'refs/tags/spacewalk-backend-0.9.17-1'
by Michael Mraka
Tag 'spacewalk-backend-0.9.17-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2010-03-30 11:08 +0000
Tagging package [spacewalk-backend] version [0.9.17-1] in directory [backend/].
Changes since spacewalk-proxy-0.9.3-1:
Jan Pazdziora (4):
No installation number activation, remove.
Remove attributes of Tui that are no longer used.
RecoverableErrorWindow no longer used in TUI, removing.
Remove no longer used constants.
Michael Mraka (3):
Revert "added heuristic to recognize whether url is mirrorlist or plain repo"
url can be mirrorlist or single repo
Automatic commit of package [spacewalk-backend] release [0.9.17-1].
---
backend/satellite_tools/repo_plugins/yum_src.py | 37 ++---
backend/spacewalk-backend.spec | 5
client/rhel/rhn-client-tools/src/up2date_client/rhnreg_constants.py | 28 ----
client/rhel/rhn-client-tools/src/up2date_client/tui.py | 68 ----------
rel-eng/packages/spacewalk-backend | 2
5 files changed, 22 insertions(+), 118 deletions(-)
---
14 years
backend/spacewalk-backend.spec rel-eng/packages
by Michael Mraka
backend/spacewalk-backend.spec | 5 ++++-
rel-eng/packages/spacewalk-backend | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit b87dccf77020def6b2636b69419097e7300508b8
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Mar 30 13:08:19 2010 +0200
Automatic commit of package [spacewalk-backend] release [0.9.17-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 4ab8af8..c72d8a0 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -8,7 +8,7 @@ Name: spacewalk-backend
Summary: Common programs needed to be installed on the Spacewalk servers/proxies
Group: Applications/Internet
License: GPLv2
-Version: 0.9.16
+Version: 0.9.17
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -626,6 +626,9 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Tue Mar 30 2010 Michael Mraka <michael.mraka(a)redhat.com> 0.9.17-1
+- 577668 - fixed spacewalk-repo-sync behaviour for ftp and file
+
* Mon Mar 29 2010 Michael Mraka <michael.mraka(a)redhat.com> 0.9.16-1
- more modification to support mod_wsgi in proxy
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index 88e1b03..d305c10 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-0.9.16-1 backend/
+0.9.17-1 backend/
14 years
2 commits - backend/satellite_tools
by Michael Mraka
backend/satellite_tools/repo_plugins/yum_src.py | 37 ++++++++++--------------
1 file changed, 16 insertions(+), 21 deletions(-)
New commits:
commit 27e0b1c315c16ca0aad4da051292f3306fa0b400
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Mar 30 12:34:03 2010 +0200
url can be mirrorlist or single repo
diff --git a/backend/satellite_tools/repo_plugins/yum_src.py b/backend/satellite_tools/repo_plugins/yum_src.py
index 69c4981..c9ed24c 100644
--- a/backend/satellite_tools/repo_plugins/yum_src.py
+++ b/backend/satellite_tools/repo_plugins/yum_src.py
@@ -15,9 +15,19 @@
#
import yum
import shutil
+import sys
from yum import config
from satellite_tools.reposync import ContentPackage
+class YumWarnings:
+ def write(self, s):
+ pass
+ def disable(self):
+ self.saved_stdout = sys.stdout
+ sys.stdout = self
+ def restore(self):
+ sys.stdout = self.saved_stdout
+
class ContentSource:
url = None
name = None
@@ -34,12 +44,15 @@ class ContentSource:
self.repo = repo
repo.cache = 0
repo.metadata_expire = 0
- if self.mirrorlist:
- repo.mirrorlist = self.url
- else:
- repo.baseurl = [self.url]
+ repo.mirrorlist = self.url
+ repo.baseurl = [self.url]
repo.basecachedir = self.cache_dir
+
+ warnings = YumWarnings()
+ warnings.disable()
repo.baseurlSetup()
+ warnings.restore()
+
repo.setup(False)
sack = repo.getPackageSack()
sack.populate(repo, 'metadata', None, 0)
commit c50b6582778a98126c8ea02686da1f9a758f9693
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Mar 30 11:51:49 2010 +0200
Revert "added heuristic to recognize whether url is mirrorlist or plain repo"
Need better implementation which works also for ftp: and file:
This reverts commit 6bc72ee3923f7eab68376dc62c030901d4db8675.
diff --git a/backend/satellite_tools/repo_plugins/yum_src.py b/backend/satellite_tools/repo_plugins/yum_src.py
index 3e9db13..69c4981 100644
--- a/backend/satellite_tools/repo_plugins/yum_src.py
+++ b/backend/satellite_tools/repo_plugins/yum_src.py
@@ -18,18 +18,6 @@ import shutil
from yum import config
from satellite_tools.reposync import ContentPackage
-class UrlIsNotMirror(Exception):
- pass
-
-class SpacewalkYumRepository(yum.yumRepo.YumRepository):
- def _readMirrorList(self, fo, url=None):
- retval = yum.yumRepo.YumRepository._readMirrorList(self, fo, url)
- # passed repo url as mirrorlist
- if (len(retval[0]) == len(retval[1])
- and retval[1][0][0:2] == '<!'):
- raise UrlIsNotMirror
- return retval
-
class ContentSource:
url = None
name = None
@@ -42,21 +30,15 @@ class ContentSource:
def list_packages(self):
""" list packages"""
- repo = SpacewalkYumRepository(self.name)
+ repo = yum.yumRepo.YumRepository(self.name)
self.repo = repo
repo.cache = 0
repo.metadata_expire = 0
- repo.basecachedir = self.cache_dir
-
- try: # try if url is mirrorlist
+ if self.mirrorlist:
repo.mirrorlist = self.url
- repo.baseurlSetup()
- except UrlIsNotMirror, e:
- # well, not a mirrorlist, just plain repo
- repo.mirrorlist = None
+ else:
repo.baseurl = [self.url]
- repo.baseurlSetup()
-
+ repo.basecachedir = self.cache_dir
repo.baseurlSetup()
repo.setup(False)
sack = repo.getPackageSack()
14 years