On 22/08/14 11:15, Manoj Iyer wrote:

I need to create a local repo of some packages, this is for a custom
project I am working on.

I do the following:

* download the deb packages & dependencies to /usr/local/apt/archives/
* create a directory /usr/local/apt/archives/partial
* cd to /usr/local/apt/archives/
* dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
* /usr/local/apt/archives/Packages.gz now exists.
* add /etc/apt/sources.list.d/localrepo.list
    * file:/usr/local/apt/archives/ ./
* apt-get update --fix-missing

but when I apt get install any of the packages from the local repo, it
still looks in archive.ubuntu.com and downloads from there rather than
using my local repo. I also tried adding 'file:/usr/local/apt/archives/
./' to sources.list instead and I have the same behavior.

Am I missing something?

One thing you want to check is apt-cache policy <package> to see what apt thinks is the most up to date place to download from -- keep in mind that versioning is still important, and apt won't prioritize file:// URIs over any other type.

Cheers,
--
                                        Steve
"...In the UNIX world, people tend to interpret `non-technical user'
 as meaning someone who's only ever written one device driver."
         - Daniel Pead

--
ubuntu-devel mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel

Reply via email to