[Spacewalk-list] Exclude packages from installing via client configuration

Michal Bruncko michal.bruncko at zssos.sk
Mon Oct 7 10:26:53 UTC 2013


Thank you Michael!

One more thing: filtering is working great now, I can filter what I dont 
use except one example:

I am applying filters to 
"http://centos.alt.ru/repository/centos/6/x86_64/" repository. Filtering 
is working great except one package set - mysql-*

here is my filter definition:
spacecmd {SSM:0}> repo_listfilters "External yum repo - CentOS 6 Alt.RU 
x86_64"
-bind-*
-httpd-*
-lighttpd-*
-mod_ssl-*
-memcached-*
-nagios-*
-openssh-*
-php-*
-postfix-*
-squid-*
-libssh2-devel-*
-libssh2-*
-postfix-*
-pam_mysql-*
-mysql-*


but after using spacewalk-repo-sync the mysql-* packages are still synced:

# spacewalk-repo-sync --type=yum --channel="clone-centos6-x86_64-alt-ru-mod"
Repo URL: http://centos.alt.ru/repository/centos/6/x86_64/
Packages in repo:               269
Packages passed filter rules:   145
Packages already synced:          0
Packages to sync:               145


those packages are still included:
mysql-libs-5.5.34-1.el6.x86_64      The shared libraries required for 
MySQL clients      Unknown
mysql-plugin-pinba-5.5.34-1.el6.x86_64      Pinba storage engine  Unknown
mysql-server-5.5.34-1.el6.x86_64      The MySQL server and related files 
      Unknown
mysql-test-5.5.34-1.el6.x86_64      The test suite distributed with 
MySQL      Unknown

question: is this caused by dependency problem with some other - synced 
- package from same repo? or something else is causing this problem?

thank you

michal

On 7. 10. 2013 10:37, Michael Mraka wrote:
> 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
>
> _______________________________________________
> Spacewalk-list mailing list
> Spacewalk-list at redhat.com
> https://www.redhat.com/mailman/listinfo/spacewalk-list

-- 
Ing. Michal Bruncko, PhD., CCNP, RHCSA™
IT systems and network administrator
Coupled school of business and services Ruzomberok
Slovak Republic




More information about the Spacewalk-list mailing list