I have a shell script that takes a set of directories containing bins and libraries, and determines which RPMs need to be installed to satisfy all references. My plan is to make a ypm (YaST package manager) script to make it easy to be sure all that is needed is installed. The script provides the name of the RPM on the current system, like: libstdc++44-4.4.1_20090817-2.3.4.i586 libtiff3-3.8.2-145.2.i586 libuuid1-2.16-4.5.1.i586 libxml++-2.26.1-2.2.i586 libxml2-2.7.3-2.2.i586 openmotif-libs-2.3.1-10.1.i586 tcl-8.5.7-4.6.i586 tk-8.5.7-3.1.i586 xorg-x11-libICE-7.4-7.1.i586 I want to make the script a little less specific about versions. Like the i586, or the OBS build number. For example, for tcl I would like: tcl-8.5.7 or for the xorg item: xorg-x11-libICE-7.4 My use is a bit restricted, in that the script will be generated on a machine running the same openSUSE release where the ypm script should run. But the various machines may have different upgrades applied. I can't see how one could figure this out for the various names here. Just look at the first and the last in my list. Granted the list is only 30 or so long, so I could edit it by hand. I am hoping, however, to add the package manager script to the installable package, and would be happy if it could track these things as packages are built. -- Roger Oberholtzer OPQ Systems / Ramböll RST Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden Office: Int +46 10-615 60 20 Mobile: Int +46 70-815 1696 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Am 03.02.2010 14:54, schrieb Roger Oberholtzer:
[...] The script provides the name of the RPM on the current system, like:
libstdc++44-4.4.1_20090817-2.3.4.i586 libtiff3-3.8.2-145.2.i586 libuuid1-2.16-4.5.1.i586 libxml++-2.26.1-2.2.i586 libxml2-2.7.3-2.2.i586 openmotif-libs-2.3.1-10.1.i586 tcl-8.5.7-4.6.i586 tk-8.5.7-3.1.i586 xorg-x11-libICE-7.4-7.1.i586
I want to make the script a little less specific about versions. Like the i586, or the OBS build number. For example, for tcl I would like:
tcl-8.5.7
or for the xorg item:
xorg-x11-libICE-7.4
My use is a bit restricted, in that the script will be generated on a machine running the same openSUSE release where the ypm script should run. But the various machines may have different upgrades applied.
I can't see how one could figure this out for the various names here. Just look at the first and the last in my list.
That's easy remove the last '-' and everything behind. Version and release numbers and architectures do not include any '-'. If you construct the list with help of "rpm -q", you can use --qf option to tailor the output format for you needs.
[...]
Herbert -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Wed, 2010-02-03 at 15:37 +0100, Herbert Graeber wrote:
If you construct the list with help of "rpm -q", you can use --qf option to tailor the output format for you needs.
That was just what I needed. Thanks! -- Roger Oberholtzer OPQ Systems / Ramböll RST Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden Office: Int +46 10-615 60 20 Mobile: Int +46 70-815 1696 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (2)
-
Herbert Graeber
-
Roger Oberholtzer