Writing to Newtwork share via slkbuild script

Other talk about Salix
User avatar
laprjns
Salix Warrior
Posts: 1105
Joined: 28. Aug 2009, 01:30
Location: Connecticut USA

Writing to Newtwork share via slkbuild script

Post by laprjns »

I've been trying to set up a network directory for all my package builds and using gigolo to connect to them. However I've run into the following problem writing to the directories.

Code: Select all

rich[~]$ 
rich[~]$ cd .gvfs/shared_data\ on\ slugo_server/salix_builds/noarch/pysolfc/
rich[pysolfc]$ slkbuild -g 
cp: target `slugo_server/salix_builds/noarch/pysolfc/SLKBUILD' is not a directory
At first I thought it was a permissions issue but now I don't think it is

Code: Select all

rich[pysolfc]$ ls
./  ../
rich[pysolfc]$ cp /etc/slkbuild/SLKBUILD .
rich[pysolfc]$ ls
./  ../  SLKBUILD*
So I started to look at the slkbuild script and as a test I changed the line "cp $TEMPLATE $startdir/SLKBUILD" to "cp $TEMPLATE ./SLKBUILD" and now was able to write the SLKBUILD file to the directory. I know this is not the solution, but it lead me to looking into startdir="$(pwd)". I did the following test:

Code: Select all

rich[pysolfc]$ startdir="$(pwd)"
rich[pysolfc]$ echo $startdir 
/home/rich/.gvfs/shared_data on slugo_server/salix_builds/noarch/pysolfc
rich[pysolfc]$ cp /etc/slkbuild/SLKBUILD $startdir 
cp: target `slugo_server/salix_builds/noarch/pysolfc' is not a directory
rich[pysolfc]$ ls
It looks to me like there is some issue with gigolo (gvfs-fuse?) mounted directory path. Any ideas?
I know that I can mount the directories by fstab, but I would really like to be able use gigolo,because it's some what easier to setup.
Thanks
Rich
“Don’t you see that the whole aim of Newspeak is to narrow the range of thought?"
User avatar
Akuna
Salix Wizard
Posts: 1038
Joined: 14. Jun 2009, 12:25

Re: Writing to Newtwork share via slkbuild script

Post by Akuna »

Is this with 13.1 ?

Gigolo worked fine here with 13.0 but seems broken in 13.1
Image
What really matters is where you are going, not where you come from.
User avatar
damNageHack
Posts: 663
Joined: 24. Sep 2009, 17:07

Re: Writing to Newtwork share via slkbuild script

Post by damNageHack »

laprjns wrote:

Code: Select all

rich[pysolfc]$ startdir="$(pwd)"
rich[pysolfc]$ echo $startdir 
/home/rich/.gvfs/shared_data on slugo_server/salix_builds/noarch/pysolfc
rich[pysolfc]$ cp /etc/slkbuild/SLKBUILD $startdir 
cp: target `slugo_server/salix_builds/noarch/pysolfc' is not a directory
rich[pysolfc]$ ls
You probably have to escape the spaces for the cd command.
Image
This is the oppinion of the author, it does not force you to share and is signed automatically.
You are free to keep them all errors for your own. Linux is the best game I ever played.
User avatar
laprjns
Salix Warrior
Posts: 1105
Joined: 28. Aug 2009, 01:30
Location: Connecticut USA

Re: Writing to Newtwork share via slkbuild script

Post by laprjns »

Akuna wrote:Is this with 13.1 ?
It's 13.1
damNageHack wrote:You probably have to escape the spaces for the cd command.
cd'ing works fine, but I agree that the problem seems to has something to do with the spaces in the gigolo (gvfs.fuse) mounting path.
Rich
“Don’t you see that the whole aim of Newspeak is to narrow the range of thought?"
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: Writing to Newtwork share via slkbuild script

Post by Shador »

You've got two possibilities.
a. Get rid of the spaces in the patch. I would recommend this to you as many other shell scripts could run into problems otherwise.
b. Change slkbuild (and possibly any other shell script) to always use quotes. I.e. make them pathes with space compatible. This gets really tricky if you've got a list of files, because bash uses ' ' as separator for lists. In that case you would have to look at the IFS variable.
Image
User avatar
laprjns
Salix Warrior
Posts: 1105
Joined: 28. Aug 2009, 01:30
Location: Connecticut USA

Re: Writing to Newtwork share via slkbuild script

Post by laprjns »

Shador wrote:a. Get rid of the spaces in the patch.
I'm assuming that "patch" is a typo and you meant path. Can't get ride of the spaces, since this is the way that gigolo or gvfs.fues mount the director path. I tried looking for config files, even udev and hal rules to see if i could fix it there but I couldn't find anything.
I will try changing slkbuild for a test, but in the long run I would prefer to stay with the stock script

Thanks
Rich
“Don’t you see that the whole aim of Newspeak is to narrow the range of thought?"
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: Writing to Newtwork share via slkbuild script

Post by Shador »

laprjns wrote:I'm assuming that "patch" is a typo and you meant path. Can't get ride of the spaces, since this is the way that gigolo or gvfs.fues mount the director path. I tried looking for config files, even udev and hal rules to see if i could fix it there but I couldn't find anything.
Yes, it's a typo. ;)
Instead of changing gigolo's behaviour you could try to change the name of the share to not contain spaces.
If that's still not possible, something worth trying would be a symlink like ln -s "path/with spaces" path/without/spaces
Image
User avatar
laprjns
Salix Warrior
Posts: 1105
Joined: 28. Aug 2009, 01:30
Location: Connecticut USA

Re: Writing to Newtwork share via slkbuild script

Post by laprjns »

Shador wrote:Instead of changing gigolo's behaviour you could try to change the name of the share to not contain spaces.
That's the problem, the share name does not have spaces in it.
"smb://slugo_server/shared_data/"
The spaces in /shared_data on slugo_server/ is either a samba or gigolo thing.
Last edited by laprjns on 16. May 2010, 21:10, edited 1 time in total.
“Don’t you see that the whole aim of Newspeak is to narrow the range of thought?"
User avatar
gapan
Salix Wizard
Posts: 6241
Joined: 6. Jun 2009, 17:40

Re: Writing to Newtwork share via slkbuild script

Post by gapan »

I'm not sure how smart it is to build packages in a network share, especially a samba share. All sorts of trouble could potentially come up.
Image
Image
User avatar
JRD
Salix Warrior
Posts: 950
Joined: 7. Jun 2009, 22:52
Location: Lyon, France

Re: Writing to Newtwork share via slkbuild script

Post by JRD »

For me, it's a bug (minor) in slkbuild script which should always use double quotes in pathes.
We should be able to use spaces in our pathes if we want/should. Unfortunately, there are a lot of scripts (including mine, I sometimes forget) that do not protect pathes.
Image
Post Reply