Patch: pattern based lookup for rpms module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I was just playing with func trying to understanding how it worked and just wrote this simple little method that looks up the installed packages on a remote system by pattern. Which I quite frequently happen to run with rpm -qa|grep blah. If you feel its useful, feel free to review and include it. Attached is the patch.

Here are couple of use cases:

$ func "*" call rpms glob rhn*

on https://<server>:51234 running rpms glob ( rhn* )
['rhn-oracle-jdbc 0 1.0 11 noarch', 'rhn-java-config-sat 0 5.1.0 87 noarch', 'rhns-sql 0 5.1.0 57 noarch', 'rhns-xml-export-libs 0 5.1.0 57 noarch', 'rhns-package-push-server 0 5.1.0 57 noarch', 'rhn-solaris-bootstrap 0 5.1.0 3 noarch', 'rhn-ssl-cert-check 0 1.4 10.6 noarch', 'rhn-sniglets 0 5.1.0 34 noarch', 'rhn-dobby 0 5.1.0 34 noarch', 'rhn-i18n-guides 0 5.1.0 5 noarch', 'rhnlib 0 2.1.1 9.el4_6 noarch', 'rhn-java-lib-sat 0 5.1.0 87 noarch', 'rhn-oracle-jdbc-tomcat5 0 1.0 11 noarch', 'rhns-certs-tools 0 5.1.0 3.el4 noarch', 'rhns 0 5.1.0 57 noarch', 'rhns-server 0 5.1.0 57 noarch', 'rhns-app 0 5.1.0 57 noarch', 'rhns-xmlrpc 0 5.1.0 57 noarch', 'rhns-config-files 0 5.1.0 57 noarch', 'rhns-applet 0 5.1.0 57 noarch', 'rhn-satellite-config 0 5.1.0 25 noarch', 'rhn-html 0 5.1.0 34 noarch', 'rhn-search 0 5.1.0 20 noarch', 'rhn-base 0 5.1.0 34 noarch', 'rhn-pxt 0 5.1.0 34 noarch', 'rhn-moon 0 5.1.0 34 noarch', 'rhn-grail 0 5.1.0 34 noarch', 'rhn-i18n-release-notes 0 5.1.0 6 noarch', 'rhns-satellite-tools 0 5.1.0 57 noarch', 'rhn-cypress 0 5.1.0 34 noarch', 'rhn-org-httpd-ssl-key-pair-rlx-0-16.rhndev 0 1.0 1 noarch', 'rhn_solaris_bootstrap_5_1_0_3 0 1 0 noarch', 'rhns-config-files-common 0 5.1.0 57 noarch', 'rhns-config-files-tool 0 5.1.0 57 noarch', 'rhns-xp 0 5.1.0 57 noarch', 'rhn-satellite-schema 0 5.1.0 27 noarch', 'rhn-java-sat 0 5.1.0 87 noarch', 'rhn-satellite-admin 0 5.1.0 5 noarch', 'rhnpush 0 5.2.0 5 noarch']

$ func "*" call rpms glob *devel

on https://<server>:51234 running rpms glob (*devel)
['rpm-devel 0 4.3.3 23_nonptl i386', 'glib2-devel 0 2.4.7 1 i386', 'libxml2-devel 0 2.6.16 10.1 i386', 'freetype-devel 0 2.1.9 6.el4 i386', 'audiofile-devel 1 0.2.6 1.el4.1 i386', 'libglade2-devel 0 2.4.0 5 i386', 'esound-devel 1 0.2.35 2 i386', 'ORBit2-devel 0 2.12.0 3 i386', 'libgnome-devel 0 2.8.0 2 i386', 'libgnomeui-devel 0 2.8.0 1 i386', 'gd-devel 0 2.0.28 5.4E.el4_6.1 i386', 'zlib-devel 0 1.2.1.2 1.2 i386', 'libart_lgpl-devel 0 2.3.16 3 i386', 'fontconfig-devel 0 2.2.3 13.el4 i386', 'pango-devel 0 1.6.0 9 i386', 'libxslt-devel 0 1.1.11 1.el4_6.1 i386', 'gtk2-devel 0 2.4.13 22 i386', 'libgnomecanvas-devel 0 2.8.0 1 i386', 'alsa-lib-devel 0 1.0.6 5.RHEL4 i386', 'libbonobo-devel 0 2.8.0 2 i386', 'gnome-vfs2-devel 0 2.8.2 8.6.EL4 i386', 'libbonoboui-devel 0 2.8.0.99cvs20040929 2 i386', 'pygtk2-devel 0 2.4.0 2.el4 i386', 'glibc-devel 0 2.3.4 2.39 i386', 'java-1.5.0-sun-devel 0 1.5.0.15 1jpp.2.el4 i586', 'xorg-x11-devel 0 6.8.2 1.EL.33.0.4 i386', 'atk-devel 0 1.8.0 2 i386', 'libIDL-devel 0 0.8.4 1 i386', 'GConf2-devel 0 2.8.1 1.el4 i386', 'python-devel 0 2.3.4 14.4.el4_6.1 i386']

Thanks,
~ Prad


_______________________________________________
Func-list mailing list
Func-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/func-list

[Index of Archives]     [Fedora Users]     [Linux Networking]     [Fedora Legacy List]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux