Visit Jeremy's Blog.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 10-19-2005, 08:11 AM   #1
Registered: Nov 2004
Distribution: Slackware 11, Ubuntu 6.06 LTS
Posts: 700

Rep: Reputation: 30
apt-get based application - anybody interested?


I was just thinking - how many people have complained because their Linux box isn't connected to the internet, and they can't download the packages off another machine because they'll end up with dependancy problems? Well, I don't have enough experience as a programmer to work on it myself, but I've had an idea.

Ok, basically, there are two apps which go hand-in-hand.

1. A checker system, which can be compiled on any Debian-based distro with ease (this is the one which will be used on the offline box), and which will include any dependencies it itself might need;
2. The downloader tool, to be used on a box which has internet access (this app would have to be available for both Linux and Windows).

The first app is the one you should use primarily. As I said, it should be simple to compile (possibly put in a Python script to do it for them), and then all it does is discover what's on your system - what programs, libraries, versions of those, and any other things it might need to know. That app will save this information into a file (XML?), which you then put onto a flash drive/floppy disk/data transfer device.

The idea is that you install the second app on the machine which has internet access (can be either a Linux or Windows box), and you plug in your device. You start up the second app, point it to the file on the device, and then (in a similar way to apt-get) you type in the program/library you want to download. It will find out what versions of what libraries and programs you have (from the file), and then will go onto the repositories (which one should be able to change as easily as /etc/apt/sources.list) to download the program/library you specified. Should that program have dependencies, it will also download them (bearing in mind that it would exclude any dependencies which you already have, as long as it is >= version needed). All these files would be downloaded to a specified folder, and once it's done you can copy that folder to your data device, plug that device back into your offline Linux box, and then just use 'dpkg -i' to install the downloaded .deb files!

I thought it might be a good idea to base the downloading app on apt-get (which I think is written in C, but cannot check up right now) so that less work would need to be done on the repository bit, but I guess we could discuss the language used with any others willing to take up this project.

So, what do you all think? I know it's a long-shot, but it could be an interesting project for a couple of bored programmers to work on... Please let me know if you do decide to do so!


Ps. I have also posted on the Ubuntu forums, just in case you would like to see how that's going. My thread can be found here.
Old 10-19-2005, 01:14 PM   #2
Senior Member
Registered: Apr 2001
Location: Perry, Iowa
Distribution: Mepis , Debian
Posts: 2,692

Rep: Reputation: 45
moved to programming
Old 10-20-2005, 05:01 AM   #3
Registered: Nov 2004
Distribution: Slackware 11, Ubuntu 6.06 LTS
Posts: 700

Original Poster
Rep: Reputation: 30
Thank you.

So, is anyone interested? Do you think it's a good idea?
Old 10-20-2005, 12:27 PM   #4
Registered: Mar 2004
Location: Massachusetts
Distribution: Debian
Posts: 557

Rep: Reputation: 42
Some random ideas:

The first application is essentially written for you; dpkg -l tells what's installed or, I think, you can get the same information from /var/lib/dpkg/status . The first two characters per line of the dpkg output or the Status: line in the file say whether a package is installed.

For the second, it sounds like you basically want a portable version of apt-get install -d

I'd guess that the best way to go about this is modifying the apt-get and/or dpkg source. This still could be difficult if you want it to run on windows.

You could cheat a bit by figuring out what apt-get update does (I think it just downloads a single file for each source in /etc/apt/sources.list), getting the right data on the internet-connected machine, transfering that to the linux machine, running apt-get install --dry-run whatever, and using the output to figure out what to download on the connected machine.

Somewhere in this mess you might find it useful to host an apt repository on the linux box, so you can just point its sources.list to localhost.
Old 10-20-2005, 12:38 PM   #5
Registered: Nov 2004
Distribution: Slackware 11, Ubuntu 6.06 LTS
Posts: 700

Original Poster
Rep: Reputation: 30
aluser - Thanks you very much for your ideas, as they were useful! You have taught me a few things about dpkg and apt-get which will be helpful when I look at the apps tomorrow, so thank you. That would help in the formation of the base of the app, and then we'd just have to make a pretty front-end.

Thank you again, and if anyone would like to contribute to this project (I am starting to put ideas together, and will create a page for this project within the next couple of days) then please let me know, because I am definitely looking for volunteers.


Ps. I would also be grateful if anyone could provide a link to a site where I could find some good programmers willing to work on this Open Source project...


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
apt-get problem - need top force remove an application amon Debian 4 10-22-2010 07:02 AM
Using debian based- Apt-Get issues sumguy231 Linux - Software 6 10-07-2004 01:50 PM
GUI based application for Installing RPMs for Red Hat Linux 9? AskMe Linux - Software 3 07-29-2004 07:16 AM
I can't install apt RPM no application associated yeehi Fedora - Installation 1 05-25-2004 03:11 AM
Load Balancing for a Browser Based Application divorcingbill Linux - Networking 3 02-10-2003 03:06 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:26 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration