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 Wed 01 Oct 2014, 18:47
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
PPM: Download packages, but don't install
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
MochiMoppel


Joined: 26 Jan 2011
Posts: 402
Location: Japan

PostPosted: Mon 10 Mar 2014, 08:13    Post_subject:  PPM: Download packages, but don't install
Sub_title: Adding a "Download-only" button
 

In recent puppies the Puppy Package Manager (PPM) does not allow to download packages without installing them. If you are lucky the Puppy Package Manager: preinstall dialog contains an Examine dependencies button, which, when clicked, provides an option to download the package, but for packages without missing dependencies this button will not be shown, instead it’s either Install or Cancel. After clicking on Install and choosing a server the PPM will download, install and delete (!) the selected package.

Below patch adds the missing Download-only button.At least it does it for me in Slacko5.6. Should also work in Precise:

1) Open file /usr/local/petget/installpreview.sh with a text editor and find keyword ${DEPBUTTON} (just to make sure that you are editing the right section of code.):

${DEPBUTTON}
<button>
<label>Install ${TREE1}${ONLYMSG}</label>
<action>echo \"${TREE1}\" > /tmp/petget_installpreview_pkgname</action>
<action type=\"exit\">BUTTON_INSTALL</action>
</button>
<button cancel></button>


2) Add 4 lines to the code:

${DEPBUTTON}
<button>
<label>Install ${TREE1}${ONLYMSG}</label>
<action>echo \"${TREE1}\" > /tmp/petget_installpreview_pkgname</action>
<action type=\"exit\">BUTTON_INSTALL</action>
</button>
<button>
<label>Download-only</label>
<action type=\"exit\">BUTTON_PKGS_DOWNLOADONLY</action>
</button>

<button cancel></button>


3) A few lines later find

if [ "$EXIT" != "BUTTON_INSTALL" -a "$EXIT" != "BUTTON_EXAMINE_DEPS" ];then

4) Change the code (everything on one line!) to

if [ "$EXIT" != "BUTTON_INSTALL" -a "$EXIT" != "BUTTON_EXAMINE_DEPS" -a "$EXIT" != "BUTTON_PKGS_DOWNLOADONLY" ];then

That's it. Packages will be downloaded to /root, a message window will appear after the download. The behavior of the Install option will not be affected (packages will be deleted after installation)

Back to top
View user's profile Send_private_message 
mavrothal


Joined: 24 Aug 2009
Posts: 1635

PostPosted: Mon 10 Mar 2014, 14:01    Post_subject:  

Thanks.
Is now in woof for the puppies to come Wink

_________________
Kids all over the world go around with an XO laptop. They deserve one puppy (or many) too Very Happy
Back to top
View user's profile Send_private_message 
Moat

Joined: 16 Jul 2013
Posts: 181

PostPosted: Mon 10 Mar 2014, 23:38    Post_subject:  

Works perfectly in Precise 5.7.1 retro. Brilliant little tweak, Mochi - thanks!! Cool

Bob
image-1.jpg
 Description   MochiMoppel's script tweak applied - results
 Filesize   64.11 KB
 Viewed   540 Time(s)

image-1.jpg

Back to top
View user's profile Send_private_message 
sheldonisaac

Joined: 21 Jun 2009
Posts: 421
Location: Philadelphia, PA

PostPosted: Wed 23 Apr 2014, 09:32    Post_subject: Re: PPM: Download packages, but don't install
Sub_title: Adding a "Download-only" button
 

MochiMoppel, may I ask for some help, please?
In my Lucid Puppy 5.2.8.6 (by rerwin), I did find the first place, and edited according to your instructions:

Quote:
<hbox>
${DEPBUTTON}
<button>
<label>Install ${TREE1}${ONLYMSG}</label>
<action>echo \"${TREE1}\" > /tmp/petget_installpreview_pkgname</action>
<action type=\"exit\">BUTTON_INSTALL</action>
</button>

<button>
<label>Download-only</label>
<action type=\"exit\">BUTTON_PKGS_DOWNLOADONLY</action>
</button>

<button cancel></button>
</hbox>
</vbox>
</window>
"


However, couldn't find the exact
Quote:

A few lines later find

if [ "$EXIT" != "BUTTON_INSTALL" -a "$EXIT" != "BUTTON_EXAMINE_DEPS" ];then


There is
Code:

RETPARAMS="`gtkdialog3 --center --program=PREVIEW_DIALOG`"

eval "$RETPARAMS"
[ "$EXIT" != "BUTTON_INSTALL" -a "$EXIT" != "BUTTON_EXAMINE_DEPS" ] && exit

#DB_ENTRY has the database entry of the main package that we want to install.
#DB_FILE has the name of the database file that has the main entry, ex: Packages-slackware-12.2-slacky

if [ "$EXIT" = "BUTTON_EXAMINE_DEPS" ];then
 /usr/local/petget/dependencies.sh
 [ $? -ne 0 ] && exec /usr/local/petget/installpreview.sh #reenter.
 #returns with /tmp/petget_missing_dbentries-* has the database entries of missing deps.
 #the '*' on the end is the repo-file name, ex: Packages-slackware-12.2-slacky
 



Shall I (somehow?) paste or attach the entire file?

Or is it OK now?

Thank you,
Sheldon

_________________
Dell E6410: Windows XP, LuPu Super 2 & various Puppys;Dell D610: Windows XP, Puppy Linux 5.2, 'lina-lite; Intel D865GBF: Windows XP, Puppy Linux 5.2;
Acer Aspire One: Windows XP, Puppy Linux 5.2; ASUS P5A: MS-Windows 98SE, Puppy Linux 2.14X
Back to top
View user's profile Send_private_message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 402
Location: Japan

PostPosted: Wed 23 Apr 2014, 10:17    Post_subject:  

Lucid uses a slightly different syntax. This should work (haven't tested though):
eval "$RETPARAMS"
[ "$EXIT" != "BUTTON_INSTALL" -a "$EXIT" != "BUTTON_EXAMINE_DEPS"
-a "$EXIT" != "BUTTON_PKGS_DOWNLOADONLY" ] && exit
Back to top
View user's profile Send_private_message 
neerajkolte


Joined: 10 Feb 2014
Posts: 272
Location: Pune, India.

PostPosted: Sun 18 May 2014, 03:25    Post_subject:  

Just bookmarking for future reference.
Thanks.

_________________
"One of my most productive days was throwing away 1000 lines of code."— Ken Thompson
Back to top
View user's profile Send_private_message 
greengeek

Joined: 20 Jul 2010
Posts: 2560
Location: New Zealand

PostPosted: Thu 22 May 2014, 06:23    Post_subject:  

If you end up with a download of a whole bunch of debs and want to assemble them into a single package ready for install or sfs build there is a good suggestion here:
http://ns1.murga-projects.com/puppy/viewtopic.php?p=760502&sid=253b51754744ade829042a046007bef1#760502
.
Back to top
View user's profile Send_private_message 
B.K. Johnson

Joined: 12 Oct 2009
Posts: 117

PostPosted: Tue 03 Jun 2014, 00:17    Post_subject: PPM: Download packages, but don't install  

Retracted

B.K. Johnson
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 » House Training » HOWTO ( Solutions )
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.0679s ][ Queries: 12 (0.0041s) ][ GZIP on ]