Andy Speagle wrote:
On Tue, 2009-08-11 at 14:59 -0500, Pradeep Kilambi wrote:
If you ran the upgrade scripts, there should a update table to
default to sha1 for existing channels.

spacewalk-schema-0.5-to-spacewalk-schema-0.6/191-rhnChannel.sql is
the one I believe.

~ Prad

I ran all of the upgrade scripts per the upgrade documentation.  This
was the output in the logs.

SQL> select
'spacewalk-schema-0.5-to-spacewalk-schema-0.6/191-rhnChannel.sql' from
dual;

'SPACEWALK-SCHEMA-0.5-TO-SPACEWALK-SCHEMA-0.6/191-RHNCHANNEL.SQ --------------------------------------------------------------- spacewalk-schema-0.5-to-spacewalk-schema-0.6/191-rhnChannel.sql
SQL> -- Add a checksum_type_id column, and fk to rhnChecksumType
SQL> ALTER TABLE rhnChannel
  2    ADD checksum_type_id number
  3  CONSTRAINT rhn_channel_checksum_fk
  4      REFERENCES rhnChecksumType(id);

Table altered.

SQL> SQL> -- Update any existing channels that are not set
SQL> UPDATE rhnChannel SET
  2    checksum_type_id = (select id
  3                          from rhnChecksumType
  4                         where LABEL = 'sha1')
  5  WHERE checksum_type_id is null;

23 rows updated.

SQL> SQL> show errors
No errors.
SQL> commit;

Commit complete.

Thoughts?

Andy

So lookong through the code, I think I know what I problem is. The perl code when settup up the channel cloning process does'nt not account for checksum value. So what ends up happening is, after the perl pxt setup page it navigates to edit.do which makes assumptions based on channel creation and edits and ends up trying to set the value thats not in the form to being with. A workaround fix to get the cloning working for now is to do something like,

--- a/java/code/src/com/redhat/rhn/frontend/action/channel/manage/EditChannelAct +++ b/java/code/src/com/redhat/rhn/frontend/action/channel/manage/EditChannelAct @@ -568,7 +568,9 @@ public class EditChannelAction extends RhnAction implements
            form.set("maintainer_phone", c.getMaintainerPhone());
            form.set("maintainer_email", c.getMaintainerEmail());
            form.set("support_policy", c.getSupportPolicy());
-            form.set("checksum", c.getChecksum().getLabel());
+            if (!c.isCloned()) {
+                form.set("checksum", c.getChecksum().getLabel());
+            }
            if (c.isGloballySubscribable(ctx.getLoggedInUser().getOrg())) {
                form.set("per_user_subscriptions", "all");
            }

eventually once the cloning logic in perl supports the checksum stuff, we can remove this additional check.

I'll looking into adding this ability for the cloned channels. Please open a bug on this and I'll knock it out asap.

Thanks,
~ Prad

------------------------------------------------------------------------

_______________________________________________
Spacewalk-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/spacewalk-devel

_______________________________________________
Spacewalk-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to