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 Fri 24 Oct 2014, 14:26
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
Right-click to extract Debian package
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
don570


Joined: 10 Mar 2010
Posts: 3345
Location: Ontario

PostPosted: Wed 19 Dec 2012, 21:18    Post_subject:  Right-click to extract Debian package  

Extract-debian 1.5 - localised

Purpose: a simple right-click on debian package to extract all
files with their paths preserved. The original
file remains untouched. Cool

Requirements: Rox Filer (doesn't work with Thunar file manager)
It uses undeb application which I have included.

I have improved Tazoc's script to give an additional
destination option to store the extracted folder. As well I localised
the app.

It uses a combination of yaf-splash and Xdialog messages.



_____________________________________________
Extract-debian_NLS-1.5.pet
Description  German and French locales
pet

 Download 
Filename  Extract-debian_NLS-1.5.pet 
Filesize  1.42 KB 
Downloaded  427 Time(s) 
Extract-debian-1.5.pet
Description  application
pet

 Download 
Filename  Extract-debian-1.5.pet 
Filesize  3.1 KB 
Downloaded  514 Time(s) 

Edited_times_total
Back to top
View user's profile Send_private_message 
666philb


Joined: 07 Feb 2010
Posts: 1776
Location: wales

PostPosted: Mon 24 Dec 2012, 08:47    Post_subject:  

hi don570

debian packages have another hidden 'debian' folder that contain install scipts. sometimes these need to be run, as in the case of some python apps (openshot for instance has an update python modules script).

i know that 'file roller' can extract these from the .deb and rcrsn5's 'debbi' can install a .deb and run the scripts.

it would be nice to have the option either to extract the scripts or run them

cheers

_________________
Tahrpup, built with trusty tahr packages http://murga-linux.com/puppy/viewtopic.php?t=93998
Quickpet_Precise, install popular apps quickly http://www.murga-linux.com/puppy/viewtopic.php?t=83642
Back to top
View user's profile Send_private_message 
don570


Joined: 10 Mar 2010
Posts: 3345
Location: Ontario

PostPosted: Sat 29 Dec 2012, 16:47    Post_subject:  

I've been concentrating on getting my extraction programs to work correctly
even when the packages have whitespace in their name. This happens
(albeit rarely) when the Windows downloader finds a similar file
stored on your hard disk so it makes a name change automatically
during the download. The file isn't corrupted at all . It's just that the
filename now has a space . An example --->

Code:
bash_advanced_guide-6.6e (1).pet


I think I have it fixed for extract-pet v1.4 so I'll concentrate on
Extract-debian now.

__________________________________________________
Back to top
View user's profile Send_private_message 
pemasu


Joined: 08 Jul 2009
Posts: 5463
Location: Finland

PostPosted: Sat 29 Dec 2012, 17:51    Post_subject:  

About .deb postinst script.
If you want to install .deb and also run possible postinst script...like update-python-modules openshot.public
Firstly you need to extract the folders and files in .deb as debbi do. Link to debbi-1.1.pet:
http://www.murga-linux.com/puppy/viewtopic.php?mode=attach&id=56503

Extract the pet and check debbi script.

debbi uses dpkg-deb with -x (extract ie install the files to the system, debbi does not just extract the files to the dedicated folder like extracted-debian, it installs them to the system.
Next....debbi extracts the DEBIAN folder with control files..amongst them is also postinst script. dpkg-deb -e.
With openshot it executes update-python-modules openshot.public and some other commands.
Then it removes the DEBIAN folder.

For Openshot, you need to have python-support .deb installed to have update-python-modules binary for use. It is not in Precise Puppy. I include that python-support .deb now to the Upup Precise.

So....for having .deb installed and also the possible postinst script executed, you need to use dpkg-deb -x (extract the files) and dpkg-deb -e (extract the DEBIAN control folder content) parameters and also you need to run postinst script and also you need to have needed binaries and other stuff in place if the postinst script calls them.
Code:
dpkg-deb -x $1 /
dpkg-deb -e $1
if [ -e DEBIAN/postinst ]; then
  sh DEBIAN/postinst
  echo "Post-install script completed!"
fi

I think this is more or less something to be included in /usr/local/petget/installpkg.sh script.

So...for extracting the .deb DEBIAN control folder with all included files and scripts...postinst included...I suppose above give some info more.
Back to top
View user's profile Send_private_message 
pemasu


Joined: 08 Jul 2009
Posts: 5463
Location: Finland

PostPosted: Sun 30 Dec 2012, 06:42    Post_subject:  

Sorry about misinformation. I have edited the above post.
/usr/local/petget/installpkg.sh has the dpkg-deb installation section:
Code:
 *.deb)
  DLPKG_MAIN="`basename $DLPKG_BASE .deb`"
  PFILES="`dpkg-deb --contents $DLPKG_BASE | tr -s ' ' | cut -f 6 -d ' '`"
  [ $? -ne 0 ] && exit 1
  echo "$PFILES" > /root/.packages/${DLPKG_NAME}.files
  install_path_check
  dpkg-deb -x $DLPKG_BASE ${DIRECTSAVEPATH}/
  if [ $? -ne 0 ];then
   rm -f /root/.packages/${DLPKG_NAME}.files
   exit 1
  fi
 ;;

That part would need editing so that postinst script would be launched.

For .deb extract-deb it would need similar modification like in debbi script, so that dpkg-deb -e would be used to extract DEBIAN folder content.
Back to top
View user's profile Send_private_message 
don570


Joined: 10 Mar 2010
Posts: 3345
Location: Ontario

PostPosted: Sat 12 Jan 2013, 16:07    Post_subject: New version 1.5  

New version 1.5

- The package is now equivalent to Extract-pet i.e.
there is now checking of available space on your hard drive
to make sure that extraction is successful .

- Non-standard debian packages with whitespace in name
are now handled perfectly i.e. everything will be extracted Laughing

-There should be error messages if the extraction is not successful.

_______________________________________________________
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
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.0819s ][ Queries: 13 (0.0189s) ][ GZIP on ]