Page 2 of 3

Posted: Fri 27 Mar 2009, 20:51
by amigo
To handle spaces in path or file names, you need to double quote the places where you are handling the paths in your scripts. You can create a couple of test paths to check the functionality. I recently added support for spaces in paths in my src2pkg program. It was a nightmare since src2pkg is around 10,000 lines of bash script with path-handling every 5-10 lines! The moral is -get that working before you add too much code -I nearly went nuts finding all the places I needed to change the code...

Posted: Fri 27 Mar 2009, 20:57
by dejan555
Can you see any place in my script I didn't double quote?
Cause I don't, it stays as it is if someone with more knowledge doesn't change it, I'm not making any changes from now on...

Posted: Fri 27 Mar 2009, 21:26
by dejan555
maybe using bash instead of sh for interpreter? It worked for my madplay dialog? Didn't want to play songs that had spaces even when double qouted, but when I change to bash it works?

Posted: Fri 27 Mar 2009, 21:33
by dejan555
nope, doesn't work. :(

Posted: Fri 27 Mar 2009, 22:24
by dejan555
Yaaayyy! I found it!
The problem was in basename command, replaced

Code: Select all

FOLDR=`basename $(echo "$FOLDR")` 
with

Code: Select all

FOLDR=`basename "$FOLDR"` 
and now everything works OK! That's all from me guys, I'm satisfied with this now! :D

Package reuploaded.

Posted: Fri 27 Mar 2009, 22:45
by dejan555
LOL, guess what? Petget cannot install pets that are placed in a directory with spaces in filename? I just tested conversion of rpms and debs on LiveCD and wanted to install them immidiately after, but I couldn't install them when clicked on them. So I thought I made something wrong with the script, so they are not packed right, but no, when I copied converted pets into my-documents, they installed OK on click! :?:

Posted: Fri 27 Mar 2009, 23:34
by Dingo
this script has no GUI? How can I make a GUi for this?

Posted: Fri 27 Mar 2009, 23:44
by technosaurus
I've posted some stuff on gtkdialog here:
http://www.murga-linux.com/puppy/viewtopic.php?t=40361

you can use that and/or Xdialog to make a simple gui

I like to use Xdialog from within a gtkdialog script to get inputs and display messages ... makes it somewhat smaller

Posted: Fri 27 Mar 2009, 23:49
by dejan555
Dingo wrote:this script has no GUI? How can I make a GUi for this?
I thought it was more simple to do right click in rox -> Convert pet
There's a line for Xdialog in there too, if you want it that way, just uncomment line 2 from script and comment line 3
Open /usr/local/bin/deb2pet in geany (and/or rpm2pet)

Code: Select all

#DEB=`Xdialog --title "Select file" --wrap --fselect *.deb 0 0 2>&1`
DEB=$1
^Just uncomment line where it says Xdialog, and comment the one under that

EDIT: There's a line at the bottom which says rox, u can uncomment that too if you want folder containing the pet to open after conversion

There's a version in the main post that works with xdialog and has a menu entry under utilities

Posted: Sat 28 Mar 2009, 17:46
by DMcCunney
dejan555 wrote:LOL, guess what? Petget cannot install pets that are placed in a directory with spaces in filename?
Why do you have a directory with spaces in the filename?

Windows permits that particular abomination, but *nix is generally allergic to it. Various globbing routines don't understand that the space is part of the directory name without special quoting, and will attempt to treat what comes after the space as a separate argument.

It should not be a surprise that PetGet will fail in that circumstance.
______
Dennis

help meh plz!

Posted: Sat 28 Mar 2009, 18:53
by Runemaster
I have no idea what im doing wrong (im pretty sure it's me doing something wrong.

ok installed deb2pet and rpm2pet and if i was supposed to put it in a specific folder then i guess i didnt see it because I read all the posts

So i download a .deb or .rpm file and i right click on it and click on turn into pet or whatever it is and it creates a tar files out of the deb or rpm file and makes a blank word document called whatever the file was and adds the .pet extension to it and nothing will do anything.

if this is what it is supposed to do then i got lost in translation and it doesent do what i thought it would do.

any help is greatly appreciated. :)

Posted: Sat 28 Mar 2009, 20:13
by dejan555
DMcCunney wrote: Why do you have a directory with spaces in the filename?
I normally don't, only wanted to be sure that if someone did have it, he/she doesn't have errors when trying to convert. Me personally don't use folders with spaces.

@Runemaster
Don't know what you're exactly saying, script is supposed to repack deb or rpm package to pet, so any contents that where in deb are now in converted pet, if this doesn't work I'll have to test this again, maybe I damaged something in script when changing that basename command, if anyone else had this problem please post it here. Runemaster, you can also try installing some other version that is attached and see if works, but I tested this last one, and it worked? Also, did you install unrpm, undeb pet, I think older puppy versions didn't have undeb?

Posted: Sun 29 Mar 2009, 02:05
by droope
We should figure a way of making it look for libraries. Nowhere near impossible. ;) Nowhere near my possibilities tho :P

Posted: Sun 29 Mar 2009, 09:38
by dejan555
You mean like checking dependencies?
Petget does it while installing pet.
And for deb2pet and rpm2pet you only need to installunrpm.undeb.pet from MU's post from the first page

Posted: Fri 10 Apr 2009, 09:03
by dejan555
Converting multiple packages at once:

If you use rox right click version of the script, you can convert multiple packages this way. Put all debs in one folder, then open terminal in that folder and type:

Code: Select all

for i in *.deb; do deb2pet "$i"; done

Posted: Wed 03 Jun 2009, 02:36
by Master_wrong
@Dejan

I have creted pet here : http://www.murga-linux.com/puppy/viewtopic.php?t=43131

please inform me if there any good proper way to put the lib files into usb/lib ? because in the package above it isn't installed automatically.


Thank you...

some components is missing

Posted: Wed 10 Nov 2010, 03:49
by mistfire
I noticed that when I'm converting rpm to pet. It fails because there is component missing or conflicted. When i'm converting deb to pet, the undeb script was not included in this package. It cant to convert deb to pet until you download it. Can you include all the needed scripts in order to run it properly. What I mean is to include some required scripts for this app. (example: undeb is required for conversion so it must included on this pet package)

Posted: Wed 10 Nov 2010, 07:40
by dejan555
mistifire, ability to install debs on click is added to all newer puppy versions, so deb2pet is not really needed unless you're running some older puppy. undeb and unrpm are also provided in separate pet (read the main post)

Posted: Fri 19 Nov 2010, 06:46
by mistfire
OK, by the way what versions of puppy does the installation of debs and rpms supported? Is it recognizable in Puppy Package manager. What I mean is when you install a deb or rpm file. The list of installed rpm or deb file can be found at PPM? Or do we need another Package manager to handle that kind of package? Is it possible to install a device driver in deb or rpm form in Puppy? Thank you in advance

Posted: Fri 19 Nov 2010, 07:17
by dejan555
Yes, puppy versions 5.x, dpup/squeeze pup and I think even quirky, really any of newer pups handles installation of debs through PPM.