LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 04-02-2014, 03:47 AM   #1
pradnyagandhe
LQ Newbie
 
Registered: Apr 2014
Posts: 2

Rep: Reputation: Disabled
Lightbulb pkgadd with * in parameter


Hi,
Can I use wild character like * in pkgadd parameters.
e.g. I have all pkg file starting with "idsldap."
bash-3.2# pkgadd -d idsldap*.pkg
pkgadd: ERROR: no packages were found in </var/tmp/dstreAAAz5aquw>
bash-3.2# pkgadd -d idsldap*
pkgadd: ERROR: no packages were found in </var/tmp/dstreAAAeeaavw>


I observed that if I give package name directly like
bash-3.2# pkgadd -d idsldap.wp63.pkg

The following packages are available:
1 IDSlwp63 IBM Directory Server - WhitePages
(sparc) 6.3.0.29

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]:


So my question is
1. pkgadd -d idsldap* is a user error OR
2. pkgadd -d idsldap* is an error in pkgadd

Same is observed in pkgrm with * in parameters.
Let me know.

Thanks and Regards,
Pradnya Gandhe
 
Old 04-02-2014, 04:33 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,617

Rep: Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963
Quote:
Originally Posted by pradnyagandhe View Post
Hi,
Can I use wild character like * in pkgadd parameters. e.g. I have all pkg file starting with "idsldap."

bash-3.2# pkgadd -d idsldap*.pkg
pkgadd: ERROR: no packages were found in </var/tmp/dstreAAAz5aquw>
bash-3.2# pkgadd -d idsldap*
pkgadd: ERROR: no packages were found in </var/tmp/dstreAAAeeaavw>

I observed that if I give package name directly like

bash-3.2# pkgadd -d idsldap.wp63.pkg
The following packages are available:
1 IDSlwp63 IBM Directory Server - WhitePages
(sparc) 6.3.0.29

Select package(s) you wish to process (or 'all' to process all packages). (default: all) [?,??,q]:

So my question is
1. pkgadd -d idsldap* is a user error OR
2. pkgadd -d idsldap* is an error in pkgadd

Same is observed in pkgrm with * in parameters.
Read the man page on the pkgadd command:
http://docs.oracle.com/cd/E19253-01/...qci/index.html

This is obviously a user error, since the command does not support wildcards. The program is acting perfectly, and if you call it correctly, it works.
 
1 members found this post helpful.
Old 04-02-2014, 06:39 PM   #3
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
More precisely, the pkgadd command expect a single name to follow -d. Using a wildcard will work if there is a single file matching idsldap*.pkg. If there is more than one, that is a syntax error.

On the other hand, pkgrm supports wildcards but expects package names, not file names so for example this command will remove all packages having a name starting with "IDSlw":

Code:
pkgrm "IDSlw*"
Note that the parameter should be quoted to prevent the shell to expand it in case files matching that pattern do exist in the current directory.
 
Old 04-07-2014, 04:02 AM   #4
pradnyagandhe
LQ Newbie
 
Registered: Apr 2014
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thank you TB0ne and jlliagre for your replies.
I get that
With pkgadd -d is meant for device. Also solaris packaging can be of two types a. folder structure or b. pkg file.
If a package format of folder structure is used then -d will take parent folder of the package named folders. This method could take a wild char in place of package names (e.g.: pkgadd -d . *)

But we use a .pkg format files which must be used with -d flag itself - means the pkg file is the device itself, and it can not take a wild char. We should use full pkg file names with -d.

Thanks and Regards,
Pradnya Gandhe
 
Old 04-07-2014, 08:57 AM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,617

Rep: Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963
Quote:
Originally Posted by pradnyagandhe View Post
Thank you TB0ne and jlliagre for your replies.
I get that With pkgadd -d is meant for device. Also solaris packaging can be of two types a. folder structure or b. pkg file.
If a package format of folder structure is used then -d will take parent folder of the package named folders. This method could take a wild char in place of package names (e.g.: pkgadd -d . *)

But we use a .pkg format files which must be used with -d flag itself - means the pkg file is the device itself, and it can not take a wild char. We should use full pkg file names with -d.
No, the -d flag is for a device/directory, and *STILL* doesn't accept package-name wildcards. You can specify multiple input directories with a wildcard, but it will install all the packages beneath them. You can't specify file names with wildcards.

Again, read the man page, and if you feel that things should behave differently, then feel free to contact Oracle, and explain to them why you'd like the behavior changed.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
pkgadd not found on ubuntu Jarke Linux - Newbie 2 08-24-2009 10:29 AM
pkgadd problem Yeung Solaris / OpenSolaris 2 12-01-2008 01:09 AM
pkgadd problem, please help. mokku Solaris / OpenSolaris 1 04-08-2008 11:32 AM
linux bash - how to use a dynamic parameter in shell parameter expansion expression nickleus Linux - General 2 08-21-2006 04:54 AM
Can someone help please - what is pkgadd? deanbrown3d Solaris / OpenSolaris 3 06-18-2004 08:23 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 11:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration