LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   painstaking dpkg operation - could it have been quicker? (https://www.linuxquestions.org/questions/linux-general-1/painstaking-dpkg-operation-could-it-have-been-quicker-4175482447/)

tpprynn 10-28-2013 04:31 AM

painstaking dpkg operation - could it have been quicker?
 
I have just moved to the DWM window manager using Debian 7.2 installed from the 'standard' iso. This is after a few years of distro-hopping and feeling irritated by one thing or another using full desktop environments.

I don't have full internet at home, I just occasionally use mobile broadband - 1gb for £10 so I can't fritter it away. I intended to set up a DWM Debian system on my pc and netbook, so before blanking my Xfce-based netbook I used it to download a few packages to get the mobile broadband dongle working (mostly usb-modeswitch and wvdial). I knew I'd have to attend to some dependency issues, but after a lot of trial and error the pc was online.

Basically I had about ten .deb files in the /home directory and used sudo dpkg --install for each, taking a step back when I found a .deb that needed another package installed first. Typos made the job not a short one, and it seemed copy and paste wasn't available with the basic console.

I could have just used the Xfce iso and ignored Xfce but I'm glad I persevered for various reasons. Is this how it had to be or could this have been automated or quicker? It would have been nice if I could have put these .debs in /var/cache/apt/archives and installed them all in one hit but I've thought that the system would overlook uninstalled dependencies even if they were present. I have the possibly wrong impression that I need to be online to run sudo apt-get update as I remember the task failing when I was not - I have sometimes just moved the contents of one machine's archives to the other to save on downloads, which works well. Maybe some temporary alteration to /etc/apt/sources.list would allow sudo apt-get update without the internet being on? As a harebrained bit of guesswork I once cd'd to the archives folder and tried to used sudo dpkg --install on the lot but (of course?) chaos resulted from this.

I feel like I've learnt more about Linux in the last three days than in the five years before through forced use of terminal commands - but I have an itchy feeling someone here could tell me how things could have been easier. It'd be good to know for Debian 8.

Thanks for all thoughts.

paladin.michael 10-28-2013 04:32 PM

I've never tried to set up an offline repository before, however I did find a couple pages which might help. While I don't envy you the amount of reading involved, from the look of things you might be able to get a quick and dirty local test repository up and running relatively quickly. It looks like there are also some repository archiving programs which could make this easier for you so you don't have to necessarily manually structure the whole thing.

This one is specific to Ubuntu, but gives you the basic idea of the process and, to my knowledge, there isn't much different as far as apt and dpkg are concerned between Ubuntu and Debian and you can get the proper Debian url's from the other links:
https://help.ubuntu.com/community/Ap...ine/Repository

This one is the Debian document on setting up a repository:
https://wiki.debian.org/HowToSetupADebianRepository

This one is on the format and structure of the repository so clients understand it:
https://wiki.debian.org/RepositoryFormat

Anyway, hope this is helpful.

tpprynn 10-29-2013 04:58 AM

Thanks, I've downloaded those for offline digestion.

Yesterday I made a silly error using rm and ended up reinstalling on the pc. wjat I should have done is noted the order of the packages that are the pre-requisite to getting online. Then I could have assembled a single apt-get or dpkg command in a simple script for if this is needed again. Later a few version numbers might need changing but it'd still be smoother.


All times are GMT -5. The time now is 05:38 AM.