Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 22 Dec 2014, 00:17
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
deb2pet & rpm2pet
Moderators: deshlab, Flash, GuestToo, Ian, JohnMurga, Lobster
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 3 of 4 Posts_count   Goto page: Previous 1, 2, 3, 4 Next
Author Message
amigo

Joined: 02 Apr 2007
Posts: 2294

PostPosted: Fri 27 Mar 2009, 16:51    Post_subject:  

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...
Back to top
View user's profile Send_private_message 
dejan555


Joined: 30 Nov 2008
Posts: 2720
Location: Montenegro

PostPosted: Fri 27 Mar 2009, 16:57    Post_subject:  

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...

_________________
Dpup 487 | Puppy Gallery | My photo gallery | mtPaint works
Back to top
View user's profile Send_private_message Visit_website MSNM 
dejan555


Joined: 30 Nov 2008
Posts: 2720
Location: Montenegro

PostPosted: Fri 27 Mar 2009, 17:26    Post_subject:  

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?
_________________
Dpup 487 | Puppy Gallery | My photo gallery | mtPaint works
Back to top
View user's profile Send_private_message Visit_website MSNM 
dejan555


Joined: 30 Nov 2008
Posts: 2720
Location: Montenegro

PostPosted: Fri 27 Mar 2009, 17:33    Post_subject:  

nope, doesn't work. Sad
_________________
Dpup 487 | Puppy Gallery | My photo gallery | mtPaint works
Back to top
View user's profile Send_private_message Visit_website MSNM 
dejan555


Joined: 30 Nov 2008
Posts: 2720
Location: Montenegro

PostPosted: Fri 27 Mar 2009, 18:24    Post_subject:  

Yaaayyy! I found it!
The problem was in basename command, replaced
Code:
FOLDR=`basename $(echo "$FOLDR")`


with
Code:
FOLDR=`basename "$FOLDR"`


and now everything works OK! That's all from me guys, I'm satisfied with this now! Very Happy

Package reuploaded.

_________________
Dpup 487 | Puppy Gallery | My photo gallery | mtPaint works
Back to top
View user's profile Send_private_message Visit_website MSNM 
dejan555


Joined: 30 Nov 2008
Posts: 2720
Location: Montenegro

PostPosted: Fri 27 Mar 2009, 18:45    Post_subject:  

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! Question
_________________
Dpup 487 | Puppy Gallery | My photo gallery | mtPaint works
Back to top
View user's profile Send_private_message Visit_website MSNM 
Dingo


Joined: 11 Dec 2007
Posts: 1425
Location: somewhere at the end of rainbow...

PostPosted: Fri 27 Mar 2009, 19:34    Post_subject:  

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
Back to top
View user's profile Send_private_message Visit_website 
technosaurus


Joined: 18 May 2008
Posts: 4425

PostPosted: Fri 27 Mar 2009, 19:44    Post_subject:  

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

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send_private_message 
dejan555


Joined: 30 Nov 2008
Posts: 2720
Location: Montenegro

PostPosted: Fri 27 Mar 2009, 19:49    Post_subject:  

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:

#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

_________________
Dpup 487 | Puppy Gallery | My photo gallery | mtPaint works
Back to top
View user's profile Send_private_message Visit_website MSNM 
DMcCunney

Joined: 02 Feb 2009
Posts: 897

PostPosted: Sat 28 Mar 2009, 13:46    Post_subject:  

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
Back to top
View user's profile Send_private_message 
Runemaster


Joined: 05 Aug 2006
Posts: 180
Location: Albany, GA U.S.

PostPosted: Sat 28 Mar 2009, 14:53    Post_subject: help meh plz!  

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. Smile

_________________
Adventurer: I seek knowledge and strength.

Seer:Knowledge comes from experience.....Strength comes from battleaxes.
Back to top
View user's profile Send_private_message MSNM 
dejan555


Joined: 30 Nov 2008
Posts: 2720
Location: Montenegro

PostPosted: Sat 28 Mar 2009, 16:13    Post_subject:  

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?

_________________
Dpup 487 | Puppy Gallery | My photo gallery | mtPaint works
Back to top
View user's profile Send_private_message Visit_website MSNM 
droope


Joined: 31 Jul 2008
Posts: 814
Location: Uruguay, Mercedes

PostPosted: Sat 28 Mar 2009, 22:05    Post_subject:  

We should figure a way of making it look for libraries. Nowhere near impossible. Wink Nowhere near my possibilities tho Razz
Back to top
View user's profile Send_private_message 
dejan555


Joined: 30 Nov 2008
Posts: 2720
Location: Montenegro

PostPosted: Sun 29 Mar 2009, 05:38    Post_subject:  

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

_________________
Dpup 487 | Puppy Gallery | My photo gallery | mtPaint works
Back to top
View user's profile Send_private_message Visit_website MSNM 
dejan555


Joined: 30 Nov 2008
Posts: 2720
Location: Montenegro

PostPosted: Fri 10 Apr 2009, 05:03    Post_subject:  

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:

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

_________________
Dpup 487 | Puppy Gallery | My photo gallery | mtPaint works
Back to top
View user's profile Send_private_message Visit_website MSNM 
Display_posts:   Sort by:   
Page 3 of 4 Posts_count   Goto page: Previous 1, 2, 3, 4 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0911s ][ Queries: 12 (0.0120s) ][ GZIP on ]