Mantis - pkgutil
Viewing Issue Advanced Details
4117 regular use minor N/A 2010-01-07 12:12 2012-02-18 11:19
skayser  
bonivart  
normal  
closed  
fixed  
none    
none  
0004117: RFE: Support installation of packages to alternate root (pkgaddopts not sufficient)
I have a system which is running the OpenCSW stack already. On this system I just tried to install packages to another root environment mounted to /a. To do so I added "pkgaddopts=-R /a" to an alternative pkgutil.conf file (pkgutil.conf.dr) and specificied this configuration with --config.

The problem with this approach is that pkgutil doesn't query the /a root for installed packages. Instead it checks the local / file system which already has the requested packages installed.

# grep pkgaddopts /etc/opt/csw/pkgutil.conf.dr
pkgaddopts=-R /a

# pkginfo -R /a | grep CSW
#

# pkgutil --config /etc/opt/csw/pkgutil.conf.dr -i sudosh2 sudo
Parsing catalog, may take a while...
Updated packages: CSWcswclassutils-1.30,REV=2009.11.21 CSWsudosh2-1.0.2,REV=2009.12.02
Current packages: CSWcommon-1.4.7,REV=2009.09.20 CSWsudo-1.6.8p12,REV=2005.12.19 CSWsudo-common-1.6.8p12,REV=2005.12.19
Total size: 51.6 KB
2 packages to fetch. Do you want to continue? [Y,n]

Could we get an pkgutil-integrated approach for package installation to an alternate root path? Or as a temporary workaround a pkginfoopts option (don't know whether that would be sufficient though)? I would favor the integrated approach though.
# pkgparam CSWpkgutil VERSION
1.9.1,REV=2009.12.10
Issue History
2010-01-07 12:12 skayser New Issue
2010-01-07 17:43 bonivart Status new => assigned
2010-01-07 17:43 bonivart Assigned To => bonivart
2010-04-14 23:29 bonivart Note Added: 0007858
2010-04-14 23:29 bonivart Status assigned => feedback
2010-04-15 14:59 bonivart Note Added: 0007859
2010-06-09 18:41 bonivart Note Added: 0008000
2012-01-03 15:05 bonivart Project pkg_get => pkgutil
2012-02-17 19:05 bonivart Note Added: 0009611
2012-02-17 19:05 bonivart Status feedback => closed
2012-02-17 19:05 bonivart Resolution open => fixed
2012-02-18 11:19 dam Note Added: 0009612

Notes
(0007858)
bonivart   
2010-04-14 23:29   
I have started to experiment with this. See r242.
(0007859)
bonivart   
2010-04-15 14:59   
There's a new option in pkgutil.conf called root_path, default is of course / but if you set it to /a it should work as expected. I have prefixed every pkgadd/pkgrm/pkginfo/pkgparam call with $root_path.
(0008000)
bonivart   
2010-06-09 18:41   
Can you please test this for me? :-) The code is in the new pkgutil 2.0 package but I haven't set up a test case for it.
(0009611)
bonivart   
2012-02-17 19:05   
This has been in pkgutil since 2.0. If it doesn't work no one is using it anyway.
(0009612)
dam   
2012-02-18 11:19   
It may get more attention in the future as now with ZFS root handling multiple BEs has become really easy and with PCA it is a standard. Additionally, I would like to answer this positively :-)
  http://www.opencsw.org/community/questions/3/solaris-live-upgrade-and-opencsw-packages [^]

Best regards -- Dago