How do I install YAST2 packages in /usr/local?

http://www.linuxforums.org/forum/images/smilies/icon_sad.gif Since I would like to be able to preserve my postinstall applications - like I do with /home partition - between system upgrades, I set aside another /usr/local partition…BUT http://www.linuxforums.org/forum/images/smilies/icon_mad.gif I can’t figure out how to take any random YAST2 listed program and [FONT=inherit ! important]install[/FONT]](http://www.linuxforums.org/forum/#) it into that last mentioned partition! The traditional / or /usr partition is within YAST2’s INSTALL PATH! HELP!!!http://www.linuxforums.org/forum/images/smilies/icon_sad.gifhttp://www.linuxforums.org/forum/images/smilies/icon_mad.gif

You can’t. An RPM package, as installed by YaST, zypper or *rpm, *contains a bunch of files that go into the places where they belong. That being in /usr, /lib, /bin, /etc and more. And all those files “know” where the other files are. Thus you can not move those files without braking your product. For doing what you want, you have to repackage the product into the RPM and probably even to rebuild it (compile from source).

The traditional / or /usr partition is within YAST2’s INSTALL PATH!

That is not true, it is in the package itself.

I only can advise you to keep a list of installed packages. That can be automated. I do e.g. regularly

rpm -qa

where you can modify to get output to your choice (maybe even to easy create zypper install statements out of them). E.g

rpm -qa --qf '%{NAME}:%{VERSION}:%{RELEASE}:%{INSTALLTID}:%{SUMMARY}
' | sort 

And BTW you better reclaim that partition for* /usr/local.* Waist of diskspace.

On 2012-07-21 11:16, jmonlive wrote:
>
> [image:
> http://www.linuxforums.org/forum/images/smilies/icon_sad.gif] Since I
> would like to be able to preserve my postinstall applications - like I
> do with /home partition - between system upgrades, I set aside another
> /usr/local partition…BUT

Ok…

> [image:
> http://www.linuxforums.org/forum/images/smilies/icon_mad.gif] I can’t
> figure out how to take any random YAST2 listed program and ‘install’
> (http://www.linuxforums.org/forum/#) it into that last mentioned
> partition!

No, you can not.

You do not change the path of any program, as the path is defined when the program is built.
The path /usr/local is thus used by programs you build yourself; a separate partition is used
(as I do) when you want to keep your own programs separate and safe from a system reinstall.

If you do not build programs, a separate partition for /usr/local is useless.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

jmonlive; It can be done, just not with YaST or zypper (and not easily with rpm). You’d have to compile to accomplish what you want.