GoNgetIT - Ubuntu&Debian Package Downloader for Puppy

Miscellaneous tools
Message
Author
User avatar
ariel
Posts: 140
Joined: Fri 03 Jul 2009, 19:47
Contact:

GoNgetIT - Ubuntu&Debian Package Downloader for Puppy

#1 Post 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.
Attachments
GGnG-0.1.pet
tcl/tk-Graphic environement for GoNgetIT
(1.61 KiB) Downloaded 1019 times
GGnG-screenshot.png
(7.05 KiB) Downloaded 2896 times
GGnG-screenshot-1.png
(5.54 KiB) Downloaded 2587 times
screenshot-v0-2.jpg
screenshot v 0.2
(42.96 KiB) Downloaded 3330 times
gongetit-0.2-source.pet
source
(5.62 KiB) Downloaded 826 times
gongetit-0.2.pet
binary
(28.8 KiB) Downloaded 940 times
screenshot-1.jpg
(17.9 KiB) Downloaded 4312 times
screenshot-2.jpg
(19.39 KiB) Downloaded 4494 times
gongetit-0.1.pet
binary
(25.51 KiB) Downloaded 926 times
gongetit-0.1-source.tar.gz
source
(4.33 KiB) Downloaded 822 times
Last edited by ariel on Sat 17 Nov 2012, 19:36, edited 11 times in total.

gcmartin

Get Debian Packages into Puppy

#2 Post by gcmartin »

Very good.

User avatar
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

#3 Post 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.
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#4 Post by smokey01 »

It looks very useful but it would appeal to more users with a GUI.

User avatar
neurino
Posts: 362
Joined: Thu 15 Oct 2009, 13:08

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

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#6 Post 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...
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

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

User avatar
ariel
Posts: 140
Joined: Fri 03 Jul 2009, 19:47
Contact:

#8 Post 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:

stu90

#9 Post by stu90 »

Great work Ariel - GoNgetIT is straight forward, easy to use and works well.

thanks.

User avatar
neurino
Posts: 362
Joined: Thu 15 Oct 2009, 13:08

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

User avatar
ariel
Posts: 140
Joined: Fri 03 Jul 2009, 19:47
Contact:

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

User avatar
ariel
Posts: 140
Joined: Fri 03 Jul 2009, 19:47
Contact:

ubuntu + debian package downloader for puppy linux

#12 Post by ariel »

check out new version 0.2 and download packages from debian repo too.

see first post

aarf

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

User avatar
ariel
Posts: 140
Joined: Fri 03 Jul 2009, 19:47
Contact:

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

aarf

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

stu90

#16 Post 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.
Attachments
ggigui.gz
Needs Yad and GoNgetIT installed - remove fake .gz extension and make script executable.
(1.29 KiB) Downloaded 544 times

User avatar
pemasu
Posts: 5474
Joined: Wed 08 Jul 2009, 12:26
Location: Finland

#17 Post 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.
Attachments
gongetit-with-gui-0.0.3.pet
(33.98 KiB) Downloaded 734 times

User avatar
ariel
Posts: 140
Joined: Fri 03 Jul 2009, 19:47
Contact:

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

User avatar
pemasu
Posts: 5474
Joined: Wed 08 Jul 2009, 12:26
Location: Finland

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

stu90

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

Post Reply