Operating System - HP-UX
1748136 Members
3480 Online
108758 Solutions
New Discussion юеВ

Re: Fail to create depot with whitespace in file names

 
SOLVED
Go to solution
Jianbo Li
Occasional Advisor

Fail to create depot with whitespace in file names

Dear all,

I'm trying to create a depot with swpackage and some of the files to be delivered contain whitespace in filenames. I created below psf:

directory /tmp/tc_output2.2/HPUX11.0/prepackage/proot/SpaceInFileName=/
file -m 555 -o bin -g bin opt/OV/bin/file Space In Name

The file I tried to deliver is "file Space In Name" but swpackage reported an error and said 'opt/OV/bin/file' couldn't be found.

I also tried double-quote surrounding file name but swpackage reported error again.

Is there anybody know how to package a file with space in its name? Any help is appreciated!

Thank you in advance!
Jianbo
15 REPLIES 15
Avinash20
Honored Contributor

Re: Fail to create depot with whitespace in file names

http://docs.hp.com/en/B2355-90682/swpackage.4.html

keyword value

Use double quotes (") to define values that span multiple lines:

"This is an example of a

two-line value."

#

Double quotes (") are optional when defining a value that contains embedded whitespace.

### Also check that nsswitch.conf contains

hosts: files dns

## /etc/hosts contains the correct hostname to IP address mapping and nslookup works fine.

# swagentd -r

>> Then again try to install
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
Jianbo Li
Occasional Advisor

Re: Fail to create depot with whitespace in file names

Thank you for your reply!

I tried:
directory /tmp/tc_output2.2/HPUX11.0/prepackage/proot/SpaceInFileName=/
file -m 555 -o bin -g bin "opt/OV/bin/file Space In Name"

Got below errors:
ERROR: Invalid definition for the file "Space", beginning at line 41.
Valid file definitions are of the form:

file [-t type] [-m mode | -u umask] [-o [owner[,]][uid]] \
[-g [group[,]][gid]] [-v] source [dest]

Seems that it ignored double quote and considered the " Space" as optional [dest] value
Avinash20
Honored Contributor

Re: Fail to create depot with whitespace in file names

opt/OV/bin/"file Space In Name"

Please try like above
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
Avinash20
Honored Contributor

Re: Fail to create depot with whitespace in file names

Also please remember to assign points to the threads once you get your answers
http://forums11.itrc.hp.com/service/forums/helptips.do?#33
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
Jianbo Li
Occasional Advisor

Re: Fail to create depot with whitespace in file names

Thanks. I will if I get the answer.

I have tried this before but didn't help. It reported the same error.
Dennis Handly
Acclaimed Contributor
Solution

Re: Fail to create depot with whitespace in file names

>I'm trying to create a depot with swpackage and some of the files to be delivered contain whitespace in filenames.

Don't. Unix Shells and shell users hate these files. Using a "_" would be a good compromise.
OldSchool
Honored Contributor

Re: Fail to create depot with whitespace in file names

"...delivered contain whitespace in filenames...."

don't do that. UNIX isn't Windoozz. For this to work, everything in "swpackage" would have to be written to handle whitespace in names. As you've seen, it probably doesn't, or at least not well.

as noted above, rename to something more fitting for UNIX, say "_".
Dennis Handly
Acclaimed Contributor

Re: Fail to create depot with whitespace in file names

>OldSchool: For this to work, everything in swpackage would have to be written to handle whitespace in names.

Besides swpackage, all of SD, including the IPD files.
T G Manikandan
Honored Contributor

Re: Fail to create depot with whitespace in file names

Can you try

/opt/OV/bin/file\ Space\ In\ Name