LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices

Reply
 
Search this Thread
Old 09-04-2005, 11:55 AM   #1
akudewan
Member
 
Registered: Apr 2004
Location: India
Distribution: Ubuntu
Posts: 364

Rep: Reputation: 30
Question how do I add a local folder as a repository?


Is there any way I can add a location on my disk such as "/home/akudewan/debs/" as an apt repository? I searched a lot, but didn't find anything.
 
Old 09-04-2005, 04:39 PM   #2
fenderman11111
Member
 
Registered: Jun 2004
Location: Denton
Distribution: debian, freebsd
Posts: 121

Rep: Reputation: 15
to manually install .deb files that you have downloaded, it is best to simply use dpkg.

Code:
dpkg i my_deb_package.deb
 
Old 09-05-2005, 01:35 AM   #3
akudewan
Member
 
Registered: Apr 2004
Location: India
Distribution: Ubuntu
Posts: 364

Original Poster
Rep: Reputation: 30
Talking Hurray, I got it working :)

Thanks fenderman11111. But I managed to get the repository working

This is how I did it. First off, I created a local directory, where I store nothing but .deb packages. For me, this was /home/akudewan/repository/debs/

Next, I created a "Packages" file, that holds info to all packages in the repository. To do this, I used the command:
Code:
dpkg-scanpackages /home/akudewan/repository/debs/ /dev/null > /home/akudewan/repository/debs/Packages
Now, I created a backup of my apt sources, just incase.
Code:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
Next, edit the /etc/apt/sources.list file and add the line:
Code:
deb file:///home/akudewan/repository/debs ./
Then I was getting an error when using apt, so I had to do this:
Code:
sudo ln -s /home/akudewan/repository/debs/Packages /var/lib/apt/lists/_home_akudewan_repository_debs_._Packages
(Note: Just use underscores(_) instead of / and link your Packages file)

When I ran synaptic after this, everything was working file. But I noticed that the "Packages" file has to be updated whenever you add new packages. So I made a shellscript to do this
Code:
sudo gedit /usr/local/bin/deblocalupdt
Put in the line:
Code:
dpkg-scanpackages /home/akudewan/repository/debs/ /dev/null > /home/akudewan/repository/debs/Packages
Make the file executable:
Code:
sudo chmod a+x /usr/local/bin/deblocalupdt
Now every time I add new packages in the repository, I just have to run "deblocalupdt"

Hurray!
 
  


Reply


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
want to set up local yum repository linmix Linux - Software 4 04-23-2013 03:42 AM
How do I add a local directory as an YaST repository. simjii Suse/Novell 4 04-03-2006 10:07 AM
how to create a local apt repository bakwas_internet Fedora 3 01-19-2004 02:14 AM
How do I build a local repository using apt (RH 9) ? hadding Linux - Newbie 3 10-27-2003 12:38 AM
How to build a local repository with apt (RH 9) ? hadding Red Hat 3 10-27-2003 12:36 AM


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

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