Friday, September 9, 2016

How can I add an unlisted repository as my primary "Software Sources"?


How can I add an unlisted repository to my Software Sources via its (http/ftp)://... URL?


I am not referring to a single entry in the /etc/apt/sources.list.
The URL I am referring to points to a full-and-complete repository (security updates main restricted universe mutliverse).


I know about manually editing /etc/apt/sources.list, but that is a general pain compared to just adding the repository's URL into Software Sources (if it is possible).


Is the Software Sources server-list dynamically downloaded from Canonical, and/or is it somewhere on my file-system? ... and would it work if I just add my URL to this list, and then choose it via the normal Software Sourced dialog?


There doesn't seem to be an "Add" option in the "Ubuntu Software" tab of Software Sorces. I can only find the "Other" option, which allows me to choose an alread listed server.


*UPDATE*
I've just found a tool called apt-mirror which allows the building of a local mirror, so I assume that there must be a way to use this new mirror, and that it grafts into the normal apt-get/aptitude/Synaptic system.. My "new" mirror is my ISP's not-fully-public Linux mirror, and I assume it can be grafted in, too.. Am I on the right train with this line of thought?



In the Software-Sources pane, there are two tabs: "Software from Ubuntu" and "other software". If you



  • deactivate all of the check boxes for the Ubuntu repositories


and



  • add your repository to the "Other Software" sources list


It will all work as you plan. Assuming of course, your replacement repository is up to scratch and doesn't have any inconsistencies and so on. Make sure your repository's sane!


The Add option you are referring to is in the software centre → edit → Software Sources → Other Software → Add


(The labels could be a bit off, since I'm looking them up on my localised installation)


Note:
After you've done this, the software centre will no longer look as it does now. It will contain all of the Programs in an entry just below the "Provided by Ubuntu" label, which is activated by default. So User Experience will suffer somewhat. If you plan to do this for other users, which will regularly install random applications, it will be slightly awkward. But since Search will work as it did before, it's not a big issue.


Update:
Are you sure your ISP is providing an Ubuntu 10.10 Repository?
If so, maybe apt is already automatically choosing it for you. From what I remember, apt will at some point try to locate the fastest mirror for you.[1] If you're just trying to gain some speed, maybe this is what we programmers call "premature optimisation", a mistake. Is your current access to the repository particularly slow?


[1]: To do it manually, open the Software Sources dialogue, locate the drop down box "Download from" (should say something like "Servers for Australia"), click on "Others" and then click the button that says "Locate fastest server".


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...