Bug 1251949 - spacecmd problems with "++" in package Name (ERROR: multiple repeat)
Summary: spacecmd problems with "++" in package Name (ERROR: multiple repeat)
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 2.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ondrej Gajdusek
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space27
TreeView+ depends on / blocked
 
Reported: 2015-08-10 11:56 UTC by Klaas Demter
Modified: 2019-03-13 11:38 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-11-10 10:11:03 UTC
Embargoed:


Attachments (Terms of Use)

Description Klaas Demter 2015-08-10 11:56:03 UTC
Description of problem:
I'm trying to remove a package using spacecmd and its not working


Version-Release number of selected component (if applicable):
root@spacewalk [0] rhn # rpm -qa|grep spacecmd
spacecmd-2.3.20-1.el6.noarch


How reproducible:
# spacecmd softwarechannel_removepackages channel gcc-c++-4.4.7-4.el6.x86_64
INFO: Connected to https://localhost/rpc/api as admin
ERROR: multiple repeat

to make sure its no bash issue I also tried from within spacecmd
# spacecmd -u admin
Welcome to spacecmd, a command-line interface to Spacewalk.

Type: 'help' for a list of commands
      'help <cmd>' for command-specific help
      'quit' to quit

INFO: Connected to https://localhost/rpc/api as admin
spacecmd {SSM:0}> 
spacecmd {SSM:0}> softwarechannel_removepackages channel gcc-c++-4.4.7-4.el6.x86_64
ERROR: multiple repeat

I also tried various ways I could think of to escape the package name but without success

Steps to Reproduce:
1. run spacecmd softwarechannel_removepackages channel gcc-c++-4.4.7-4.el6.x86_64


Actual results:
ERROR: multiple repeat

Expected results:
delete Package

Additional info:

Comment 1 Jan Dobes 2015-09-09 15:32:50 UTC
There is probably some double escaping in code.

# spacecmd softwarechannel_removepackages channel gcc-c\\+\\+-4.4.7-4.el6.x86_64

This should work.

Comment 2 Ondrej Gajdusek 2016-09-06 12:20:41 UTC
repaired in commit f1d48f0702c010eca967d727eda3887d11270745 in spacewalk/master

Comment 3 Ondrej Gajdusek 2016-11-10 10:11:03 UTC
This MULTILPE REPEAT error has been raised in due to that the function expects regexes as input. Actually here is no way to fix it by logical way. User must escape the regexp himself as in many tools which are using regexps.

Comment 4 Ondrej Gajdusek 2016-11-10 10:12:41 UTC
Reverted in spacewalk.git 71aff902e6464d94dc7775c634a2139c156c945b.

Comment 5 Eric Herget 2017-09-28 18:11:47 UTC
This BZ closed some time during 2.5, 2.6 or 2.7.  Adding to 2.7 tracking bug.

Comment 6 Tomas Lestach 2019-03-12 11:57:03 UTC
[root@sputnik ~]# spacecmd softwarechannel_removepackages tml-channel 'gcc-c\\+\\+-4.8.2-16.el7.x86_64'
INFO: Connected to https://sputnik.brq.redhat.com/rpc/api as tlestach
Packages
--------
gcc-c++-4.8.2-16.el7.x86_64

Remove these packages [y/N]: y
[root@sputnik ~]#


Note You need to log in before you can comment on or make changes to this bug.