[opensuse] Installing many packages
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. But we rely on certain packages being present. The obvious answer would to be to put these as dependencies in an RPM. But is that the only way? Could we define a pattern that is all these packages and install the pattern? Or is there a smart way to do this with YMP? There would be many packages. -- Roger Oberholtzer Ramböll RST/OPQ 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
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. 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').
But we rely on certain packages being present. The obvious answer would to be to put these as dependencies in an RPM. But is that the only way? Could we define a pattern that is all these packages and install the pattern? Or is there a smart way to do this with YMP? There would be many packages.
I don't think it's worth fiddling with patterns or YMPs, given your description. -- cheers, jano Ján Kupec YaST team ---------------------------------------------------------(PGP)--- Key ID: 637EE901 Fingerprint: 93B9 C79B 2D20 51C3 800B E09B 8048 46A6 637E E901 ---------------------------------------------------------(IRC)--- Server: irc.freenode.net Nick: jniq Channels: #zypp #yast #suse #susecz ---------------------------------------------------------(EOF)---
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
On Friday 21 May 2010 12:28:14 Roger Oberholtzer wrote:
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.
Sounds like you want to create some add-on media? I never used yast2-add-on-creator, but the package claims: An add-on is a CD or DVD medium with additional software. By creating an add-on medium with YaST Add-On Creator, partners can easily provide customers with the ability to install their applications as part of the SUSE installation. [http://developer.novell.com/wiki/index.php/Creating_Add-On_Media_with_YaST] If you use an .rpm package that takes care of your dependencies, you could start with creating just one pattern that requires this package.... -- cu, Michael Andres +------------------------------------------------------------------+ Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4 +------------------------------------------------------------------+ Michael Andres ZYPP Development ma@suse.de SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0 +------------------------------------------------------------------+ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Fri, 2010-05-21 at 13:55 +0200, Michael Andres wrote:
On Friday 21 May 2010 12:28:14 Roger Oberholtzer wrote:
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.
Sounds like you want to create some add-on media? I never used yast2-add-on-creator, but the package claims:
An add-on is a CD or DVD medium with additional software. By creating an add-on medium with YaST Add-On Creator, partners can easily provide customers with the ability to install their applications as part of the SUSE installation.
[http://developer.novell.com/wiki/index.php/Creating_Add-On_Media_with_YaST]
I am not so sure. It is not our install that is the issue (IOP). It is the state of the openSUSE install that is of concern. We want to ensure that all needed openSUSE packages are installed. And, when they are not, we would like to use the existing openSUSE infrastructure to get them installed. The reasons being (1) why re-invent the wheel by making our own GUIs, and (2) makes the installation of OS components look familiar as it uses tools that come with the OS and were probably already used.
If you use an .rpm package that takes care of your dependencies, you could start with creating just one pattern that requires this package....
But then the need for a pattern is less obvious. Unless there are other benefits. -- 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 (3)
-
Jano Kupec
-
Michael Andres
-
Roger Oberholtzer