[Spacewalk-list] Exclude packages from installing via client configuration
Michael Mraka
michael.mraka at redhat.com
Mon Oct 7 08:37:04 UTC 2013
Michal Bruncko wrote:
...
% And now I wanted to add filter:
%
% spacecmd {SSM:0}> repo_addfilters
% repo_addfilters: Add filters for a user repo
% usage: repo_addfilters repo <filter ...>
%
% The problem is that I don't know the exact syntax for <filter>. If I
% can use include filter or exclude filter as well. With googling I
% have just found corresponding commit of filter implementation for
% spacecmd, but no documentation.
%
% Please can you point me to that documentation or a bit explain how
% filter can be used?
Hi Michal,
Well, I have to agree it isn't very well documented. There's a small hint in API doc
https://your_spacewalk_fqdn/rhn/apidoc/handlers/ChannelSoftwareHandler.jsp#addRepoFilter
which says
string sessionKey
string label - repository label
struct - filter_map
string "filter" - string to filter on
string "flag" - + for include, - for exclude
In spacecmd you do this by prepending the flag to filter, e.g.
spacecmd {SSM:0}> repo_addfilters 'My CentOS 5 (i386)' '+libreoffice*'
spacecmd {SSM:0}> repo_addfilters 'My CentOS 5 (i386)' '-libreoffice-langpack-*'
spacecmd {SSM:0}> repo_addfilters 'My CentOS 5 (i386)' '+libreoffice-langpack-en'
spacecmd {SSM:0}> repo_addfilters 'My CentOS 5 (i386)' '+libreoffice-langpack-sk'
spacecmd {SSM:0}> repo_listfilters 'My CentOS 5 (i386)'
+libreoffice*
-libreoffice-langpack-*
+libreoffice-langpack-en
+libreoffice-langpack-sk
which will include only libreoffice packages with en and sk langpacks and no other langpacks.
% In principle I wanted to exclude some packages from specifed repo,
% because they are in conflict (modifed versions of existing packages)
% with packages in existing CentOS base/updates/epel repos.
So just couple of '-conflicting_package1', '-conflicting_package2', ... should
do the job.
% thank you!
%
% michal
Regards,
--
Michael Mráka
Satellite Engineering, Red Hat
More information about the Spacewalk-list
mailing list