Mantis - pkg_get
Viewing Issue Advanced Details
2944 regular use major always 2008-11-14 21:44 2009-02-27 18:10
bfr-murphy  
phil  
normal  
closed  
fixed  
none    
none  
0002944: latest version of pkg-get added bad flag to pkgrm
Issue ID 0002173 was resolved by having pkg-get add the -G flag when calling pkgrm.

Unfortunately, on Solaris 10 5/08 pkgrm does not have a -G command line option.

This breaks trying to do 'pkg-get -u' because the pkgrm fails, and then the pkgadd fails since the previous package version is still installed. The addition informatino below contains the output from okgrm when pkg-get calls it with the -G option.
pkgrm: illegal option -- G
usage:
        pkgrm [-a admin] [-n] [[-M|-A] -R host_path] [-V fs_file] [-v] [-Y category[,category ...] | pkg [pkg ...]]
        pkgrm -s spool [-Y category[,category ...] | pkg [pkg ...]]
related to 0002173closed  when -G flag is enabled in pkg-get.conf it is applied only to pkgadd, but not to pkgrm 
Issue History
2008-11-14 21:44 bfr-murphy New Issue
2008-11-17 22:49 phil Status new => assigned
2008-11-17 22:49 phil Assigned To => phil
2008-11-17 22:50 phil Note Added: 0005414
2008-11-20 00:51 bfr-murphy Note Added: 0005415
2008-11-21 05:24 philadmin Relationship added related to 0002173
2008-11-21 05:25 philadmin Note Added: 0005416
2008-11-24 21:55 bfr-murphy Note Added: 0005424
2008-12-19 17:05 phil Note Added: 0005471
2008-12-19 17:05 phil Status assigned => resolved
2008-12-19 17:05 phil Resolution open => fixed
2009-02-27 18:10 philadmin Status resolved => closed

Notes
(0005414)
phil   
2008-11-17 22:50   
Are you saying that pkgadd now still HAS a -G option, but pkgrm, no longer does?

If so, then if the prior, zone-friendly behaviour was

pkgadd -G blah... ; pkgrm -G blah ...

what is the new zone-friendly behaviour?
(0005415)
bfr-murphy   
2008-11-20 00:51   
pkgrm does not have a -G option on a Ultra 20 running 'Solaris 10 11/06 s10x_u3wos_10 X86', or a T2000 running 'Solaris 10 8/07 s10s_u4wos_12b SPARC', or a SunBlade 100 running 'Solaris 10 5/08 s10s_u5wos_10 SPARC'.

According to the pkgrm(1M) man page, and confirmed by actually running the command on those systems, the pkgrm command does not have a -G option.

pkgadd on those systems does have a -G option.

I do not know if this was a change, nor do I know what the correct zone-friendly method is supposed to be. As near as I can tell on the range of Solaris 10 systems (update 3, update 4, and update 5) I use, pkgadd has always had a -G option and pkgrm has never had a -G option.
(0005416)
philadmin   
2008-11-21 05:25   
It may not be documented, but if it doesnt exist at all, then what is our bug 0002173 about??
(0005424)
bfr-murphy   
2008-11-24 21:55   
The first Note attached to bug 0002173 points out that pkgrm does not have a -G option.

I think the issue is that if you run pkgrm from within the global zone it will remove the package from all the local zones no matter what. pkgrm does not offer the option of not removing local zone packages when it is invoked from the global zone. Since pkgadd does honor the -G option in the global zone 'pkg-get -u' removes the local CSW packages, but does not install the updated packages in the local zones.

I don't know what a good solution is, but having 'pkgget -u' call pkgrm with a -G option definitely breaks things both globally and locally.

The non-optimum solutions are either not having a -G option for pkgget, or not installing CSW packages in the global zone.
(0005471)
phil   
2008-12-19 17:05   
pkg-get 4.0 supports separate PKGADDFLAGS and PKGRMFLAGS now.