Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1251949

Summary: spacecmd problems with "++" in package Name (ERROR: multiple repeat)
Product: [Community] Spacewalk Reporter: Klaas Demter <klaas>
Component: ServerAssignee: Ondrej Gajdusek <ogajduse>
Status: CLOSED WONTFIX QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.3CC: jdobes, ogajduse, tlestach
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-10 10:11:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1484117    

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 ~]#