On Fri, 2010-05-21 at 11:06 +0200, Jano Kupec wrote:
On 05/21/2010 08:31 AM, Roger Oberholtzer wrote:
I want to add an installed package check to our installation. I am looking for suggestions about the best way to do this. We install on pre-installed openSUSE systems, so we never know what will be there.
So you're installing several pieces of software which are not packed as .rpm on various openSUSE systems?
In that case, just make a list of the packages you require to be installed beforhand and simply feed this list to 'zypper install ...'. You can even make this non-interactive and check for zypper exit value to see if all is OK (packages already there, or successfully installed), or some packages are missing or can't be installed). That might be all there is to it; go ahead and install your software.
The zypper approach was indeed my first thought. However, the disadvantage is that if the user needs to insert the openSUSE DVD, zypper will not prompt (at least not in a GUI). I could run zypper once, and if it feels all is not installed, do the GUI thing myself and then run zypper again. Doable, but perhaps less efficient. In my current install, I have a Tcl procedure that gets a list of all installed packages (set rpms "[exec rpm -qa]"). It can then check what is not installed, and make a list. But I feel I should use the openSUSE dialogs instead of making my own so the user will recognize what is happening.
Of course, if you had .rpms, the procedure would be a lot easier: just put them into a directory, add this directory as repo to zypper (zypper ar /your/rpms yourrepoalias) and then 'zypper install your sofware').
If I had an RPM, the problem remains the same: zypper will not prompt for needed install media. So, I was thinking I might make an RPM that is only the list of packages I want to be present. If that RPM is not installed, run a YPM script to install that RPM. I think the YPM GUI will request media as needed to resolve the RPM's dependencies. Another advantage of the RPM approach is that I would leave it installed. So the user would know they are doing something wrong if they removed a package that RPM caused to be installed. -- 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