Page 1 of 2

GoNgetIT - Ubuntu&Debian Package Downloader for Puppy

Posted: Tue 10 May 2011, 01:11
by ariel
WHAT IS IT?

GoNgetIT is a program written in C++ that allows to automatically download deb packages and their dependencies from an Ubuntu repository. It doesn't need any index files and it should work with most/all versions of Puppy as it only depends on curl.

HOW DOES IT WORK?

Choose a package here.

open a terminal and type gongetit. It will appear a menu with some options that are self-explanatory. When you press option 1- begin you will be prompted to input an address of a package (eg. hardy/editors/zile). Be sure to write the correct address as I have written no sanity check. Keep in mind that Hardy repo is good for puppy 4.x and Wary while Lucid for Lupu.

When you press enter GoNgetIT will start and parse all the links of the dependencies and then download everything.

If you have turned on option 5 the program will turn all the .deb packages into a .pet by using dir2pet.

Packages will be stored in a directory in /root with several txt files used by the program.

If your download is slow you can change the download site by modifying /root/.gongetit/searchtree.txt. Put the repo you prefer in the first place with a text editor.


WHAT IS THE FILTER?

In /root/.gongetit there are some files needed by the program. Among them there's libraries.txt in which there is a list of libraries that are already in Puppy and that should not be downloaded, such as C library and so forth. If you have already some libraries that you don't want to download anymore add them here with a text editor (openGL libraries are already filtered because I assume that you can find them in the official Puppy repo). On the other hand if you leave this file blank all the libraries will be downloaded. This can be useful for repairing an Ubuntu system that is damaged or that cannot connect to the internet for any reasons. In this way Puppy may turn into a rescue tool for Ubuntu :) Be careful not to delete critical libraries in the filter, though. You might install a package that could disrupt your Puppy installation.

BEWARE

With GoNgetIT several requests in the forum may be fulfilled but keep in mind that GoNgetIT is not a substitute of aptget and Puppy is not Ubuntu. If you download a package and it doesn't work probably you have to manually set things right. GoNgetIT is a powerful tool but not a magic wand.

Don't ask, just GoNgetIT!



^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


GoNgetIT v.0.2




What's new:
===========

-download deb packages from both the ubuntu and debian repositories.
-command line options.
-stop download when space on disk is less than 15Mb. Continue when free space is available.
- the target directory can be chosen from the command line.
-different way to deal with default options.


Command line:
=============

Command-line options have been added so that you can implement gongetit in a script like this:

Code: Select all

#!/bin/sh

echo "Do you want to download emacs? It's a powerful editor."
read a
if [ $a == "y" ] ; then
gongetit -d lenny/emacs22-gtk
echo "downloading..."
else echo "Maybe next time."
fi
To see the accepted options type gongetit --help. If you don't insert any options it will start up a menu, like before. And to chose the repo in the menu launch the program like so:

Code: Select all

gongetit -u      # menu uses ubuntu repo

gongetit -d      # menu uses debian repo
Pay attention because there are small differences in the way v 0.2 deals with default values and directories. And there are small differences in what can be done in the menu with respect to the command line. This one is more powerful. For example, the target directory can be chosen from the command line, but from the menu packages are stored in /root/gongetit/ by default.

Known issues:
=============

* No verification of both syntax and path is done by the program yet. So, check that the target directory exists and that it ends with a slash (by typing TAB) and that the URLpath does not have one. Example:

gongetit -d -p -s /root/my-documents/tmp/ lenny/games/vectoroids
---------------------------------------------------^^---------------------------^
------------options------------directory---------------URLpath------------

* Be sure to chose the same repo in both option and URLpath. Example:

Code: Select all

gongetit -d lenny/emacs22-gtk           # OK
gongetit -u lenny/emacs22-gtk           # WRONG: ubuntu path is different (e.g. hardy/editors/emacs22-gtk)
* if it is inserted a non-existent option no warning is shown


Uninstall programs:
===================

To install a package click on the new pet package generated by the program and uninstall it with the standard Puppy Package Manager.


How to compile
==============
The program is written in C++ so to compile just type:

g++ gongetit-0.2.cpp -o gongetit





**********************************************************************
************************GraphicGoNgetIT*****************************
**********************************************************************



Here we go with another gui for GoNgetIT. I played with tcl/tk and here's the result: GraphicGoNGetit, or GGnG to put it simply.

Basically it's formed by two screens.

1-deb download section (steps 1,2,3)
2-pet making (steps 4,5)


1)Choosing the deb to download.

Go to the package section of the ubuntu or debian website and choose the package that you wish to download. For example packages.ubuntu.com/precise/tk. Copy the part of the URL with the exception of the repo address, so precise/tk.

2)Choosing the directory.

Click on the 'directory' button and choose where you want your package to be downloaded.

3)Go'N'Get IT

Click this button. While the program donloads the packages the button will display in a red colour. The time of the download depends on how the package is big and on your connection speed. When the download is over the button turns green again and the message 'PACKAGE DOWNLOADED' appears in the bottom part of the window. You can look at the log if something went wrong.


4) Turn the debs into a pet package (standard Puppy Linux package).

Click the 'Make Pet' button and it pops up a new window. Choose the directory CONTAINING the deb packages previously downloaded and click the button 'Pet'. You have to answer a number of questions to build the package. At the end of the process, when the button changes from red to green again, close this window.

5) Install the pet package.

Open Rox filer and click on the newly created pet package as usual.



NOTES
=====

* The gui has tcl/tk as a dependency. Racy comes with these packages already installed. But if you don't have tcl/tk installed you can download with gongetit the Precise version, that should work with other recent puppies.

* If you have tcl/tk already installed and the gui doesn't show up, this means that you should create a symlink to your binary with something similar to this:

Code: Select all

ln -s /usr/bin/wish8.5 /usr/bin/wish
* This package doesn't install GoNgetIT. You must install GoNgetIT v. 0.2 before using GGnG.

* Tested with Racy and Precise puppy.

Get Debian Packages into Puppy

Posted: Tue 10 May 2011, 16:14
by gcmartin
Very good.

Posted: Tue 10 May 2011, 19:11
by Béèm
Looks nice, but one thing worries me.
As packages are downloaded to /root, if I understand well, there is a danger that the save file is filled-up rapidly.

So nice for FULL installs, but potential problematic for FRUGAL installs.

Would be nice to select a download directory.

Posted: Tue 10 May 2011, 20:46
by smokey01
It looks very useful but it would appeal to more users with a GUI.

Posted: Tue 10 May 2011, 20:52
by neurino
I think I will absolutely love it given I can store outside my savefile, for example all my downloaded / created pets go in /mnt/home/petsbin...

Don't care at all about missing GUI...

Posted: Tue 10 May 2011, 21:07
by sc0ttman
awesome! this looks great... gonna try it out now in puppy 4 (puplite).. wil let you know how I get on...

would you be able to make one like this that works with debian?
the .debs there are easier to integrate into puppy usually... not so many libs..

Can you give the line you use to compile this? Sorry if I am being really thick, but I tried

Code: Select all

gcc file
which did not work :(

Using goingnuts excellent work on a CLI/X menu wrapper for stuff, you could easily make this a CLI and Gtkdialog frontend... It would detect if X is running and load either a CLI menu or a Xdialog one... Checkout the pUpnGo thread for more info - his latest OTF-SFS thing uses it...

Posted: Wed 11 May 2011, 08:50
by vovchik
Dear ariel,

Thanks and good work. I tested it last night and was pleased that gongetit really examined the dependencies. I, too, think this is a nice candidate for a gui version....

With kind regards,
vovchik

Posted: Wed 11 May 2011, 09:38
by ariel
Béèm wrote:Looks nice, but one thing worries me.
As packages are downloaded to /root, if I understand well, there is a danger that the save file is filled-up rapidly.

So nice for FULL installs, but potential problematic for FRUGAL installs.

Would be nice to select a download directory.
this is the reason why I have inserted the option 'ask' by which the program examines the dependency tree but will ask you before downloading anything; and when you have 50Mb free you can download really big packages even with a frugal install.

anyway I'll leave this for future versions.
sc0ttman wrote:Can you give the line you use to compile this? Sorry if I am being really thick, but I tried

Code:
gcc file

which did not work

Code: Select all

g++ file -o optional_new_name
As for the gui I have to say that I like CLI apps because of best backward and forward compatibility, keyboard friendliness and less trouble in coding :D . Moreover, I have some functions that I'd like to implement. There are a few things that can be done starting from this point. I have to think about it some more before implementing a gui. I'll think about it anyway.

Thanks to all of you guys for your feedback.

Note.
You don't realise that we're all under the watch of our kind administrators until you see the title of your post gracefully changed. Yeah, this one is better than the previous. :wink:

Posted: Wed 11 May 2011, 10:05
by stu90
Great work Ariel - GoNgetIT is straight forward, easy to use and works well.

thanks.

Posted: Wed 11 May 2011, 10:51
by neurino
Stupid question:

will GONgetIT work the same as downloading a .deb package and clicking on it (I miss the default action)?

Since this often breaks CUPS.

Posted: Wed 11 May 2011, 20:01
by ariel
neurino wrote: will GONgetIT work the same as downloading a .deb package and clicking on it (I miss the default action)?

Since this often breaks CUPS.
GoNgetIT undebs deb packages before turning them into a pet when you turn 'pet' switch on. After that you click on a pet package as usual. If the switch is off you'll have deb packages in a directory. It's up to you what to do afterwards.


I forgot to reply to this question:
sc0ttman wrote:
would you be able to make one like this that works with debian?
Yes, it is possible to extend the principle to the debian repo. but it takes a tad more work.

ubuntu + debian package downloader for puppy linux

Posted: Sat 04 Feb 2012, 17:50
by ariel
check out new version 0.2 and download packages from debian repo too.

see first post

Posted: Sun 05 Feb 2012, 01:50
by aarf
Looks good havent tried it. But if you have all the pets in a directory could you also have an option to make an sfs? Re http://www.murga-linux.com/puppy/viewtopic.php?t=75423

Posted: Sun 05 Feb 2012, 19:34
by ariel
yes, it could be done. GoNgetIT is flexible enough that I think it could be implemented in the future.

for now if you actually need to convert pet packages to sfs you can have a go with programs like this one. It seems that Trio hasn't much time to keep it up to date but it's worth trying.

Posted: Mon 06 Feb 2012, 02:14
by aarf
There are two sfs for software that have a limited following that would be useful additions to the puppy array. One is zoneminder the other is Arduino. If goNgetit can do zoneminder it has passed all tests. Anyone interested in having a shot. Currently i dont have the connection capabilities to even try.

Posted: Mon 06 Feb 2012, 16:18
by stu90
Hi Ariel,
Nice update to GoNgetIT.

Here is a simple Yad GUI / front end for GoNgetIT - repos are set to Lucid / Squeeze although easily changed in the script.

Image
cheers.

Posted: Mon 06 Feb 2012, 18:10
by pemasu
Because there is gui...it needs menu entry....
This version has gongetit version 0.2 and ggigui in /usr/bin and menu entry stuff....so it is whole set.
I changed in ggigui the preference to debian so it is the enabled choice but ubuntu is the choosable choice.

You can test it by typing: mplayer....joke...joke...downloaded dependencies are enormous.

Posted: Tue 07 Feb 2012, 09:51
by ariel
GoNgetIT is not yet finished that a gui is already out there. You gui addicts did it in no time... then be prepared to other changes but with a more zen-like timetable :wink: .


One word on the way ggigui works. What if you want to download games/vectodroid ? it doesn't work because $GETPACK variable can't store the inner slash. you should take into consideration that.


Anyway, thanks guys for your interest in the project.

Posted: Tue 07 Feb 2012, 10:15
by pemasu
For puplet builder...gongetit is fastest way to download needed dependencies. Having them in /tmp as .deb is the wanted way.

For my needs gui usage helps to do things easy way.

So...gongetit...ggigui....and menu entry suits me.

Posted: Tue 07 Feb 2012, 12:57
by stu90
ariel wrote:GoNgetIT is not yet finished that a gui is already out there. You gui addicts did it in no time... then be prepared to other changes but with a more zen-like timetable :wink: .


One word on the way ggigui works. What if you want to download games/vectodroid ? it doesn't work because $GETPACK variable can't store the inner slash. you should take into consideration that.


Anyway, thanks guys for your interest in the project.
Hi Ariel,
No rush, i will update gui if i can as and when 8)
regarding gui - when i enter games/vectoroids into the package entry box on the gui it downloads ok for me?

Hi pemasu,
thanks for making .pet package