deb2pet & rpm2pet

Miscellaneous tools
Message
Author
amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#31 Post 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...

User avatar
dejan555
Posts: 2798
Joined: Sun 30 Nov 2008, 11:57
Location: Montenegro
Contact:

#32 Post 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...
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]

User avatar
dejan555
Posts: 2798
Joined: Sun 30 Nov 2008, 11:57
Location: Montenegro
Contact:

#33 Post 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?
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]

User avatar
dejan555
Posts: 2798
Joined: Sun 30 Nov 2008, 11:57
Location: Montenegro
Contact:

#34 Post by dejan555 »

nope, doesn't work. :(
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]

User avatar
dejan555
Posts: 2798
Joined: Sun 30 Nov 2008, 11:57
Location: Montenegro
Contact:

#35 Post 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.
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]

User avatar
dejan555
Posts: 2798
Joined: Sun 30 Nov 2008, 11:57
Location: Montenegro
Contact:

#36 Post 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! :?:
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]

User avatar
Dingo
Posts: 1437
Joined: Tue 11 Dec 2007, 17:48
Location: somewhere at the end of rainbow...
Contact:

#37 Post by Dingo »

this script has no GUI? How can I make a GUi for this?
replace .co.cc with .info to get access to stuff I posted in forum
dropbox 2GB free
OpenOffice for Puppy Linux

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#38 Post 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
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
dejan555
Posts: 2798
Joined: Sun 30 Nov 2008, 11:57
Location: Montenegro
Contact:

#39 Post 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
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]

DMcCunney
Posts: 889
Joined: Tue 03 Feb 2009, 00:45

#40 Post 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

User avatar
Runemaster
Posts: 180
Joined: Sat 05 Aug 2006, 04:41
Location: Albany, GA U.S.

help meh plz!

#41 Post 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. :)
Adventurer: I seek knowledge and strength.

Seer:Knowledge comes from experience.....Strength comes from battleaxes.

User avatar
dejan555
Posts: 2798
Joined: Sun 30 Nov 2008, 11:57
Location: Montenegro
Contact:

#42 Post 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?
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]

User avatar
droope
Posts: 801
Joined: Fri 01 Aug 2008, 00:17
Location: Uruguay, Mercedes

#43 Post by droope »

We should figure a way of making it look for libraries. Nowhere near impossible. ;) Nowhere near my possibilities tho :P

User avatar
dejan555
Posts: 2798
Joined: Sun 30 Nov 2008, 11:57
Location: Montenegro
Contact:

#44 Post 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
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]

User avatar
dejan555
Posts: 2798
Joined: Sun 30 Nov 2008, 11:57
Location: Montenegro
Contact:

#45 Post 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
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]

Master_wrong
Posts: 452
Joined: Thu 20 Mar 2008, 01:48

#46 Post 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...

mistfire
Posts: 1411
Joined: Wed 05 Nov 2008, 00:35
Location: PH

some components is missing

#47 Post 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)

User avatar
dejan555
Posts: 2798
Joined: Sun 30 Nov 2008, 11:57
Location: Montenegro
Contact:

#48 Post 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)
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]

mistfire
Posts: 1411
Joined: Wed 05 Nov 2008, 00:35
Location: PH

#49 Post 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

User avatar
dejan555
Posts: 2798
Joined: Sun 30 Nov 2008, 11:57
Location: Montenegro
Contact:

#50 Post 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.
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]

Post Reply