Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I added a repo by putting a file in

 /etc/apt/sources.list.d 

and then i did an

 apt-get update.  

However it didn't do anything with that repo. I then noticed that it didn't appear to be including any of the repos in that directory. Only stuff in /etc/apt/sources.list seem to be noticed by apt-get. All the files in the directory end in .list and contain something like:

 virtualbox.list

      deb http://download.virtualbox.org/virtualbox/debian oneiric contrib

 pj-assis-ppa-oneiric.list

      deb http://ppa.launchpad.net/pj-assis/ppa/ubuntu oneiric main
      deb-src http://ppa.launchpad.net/pj-assis/ppa/ubuntu oneiric main

Do I need to put some sort of include statement in /etc/apt/sources.list?

I'm using kubuntu 11.10.

share|improve this question
1  
You can dump the current apt configuration by using apt-config dump. There should be a line that says Dir::Etc::sourceparts "sources.list.d";. Maybe this helps for further investigation. –  phoibos Sep 18 '12 at 12:30
    
You did apt-get update or sudo apt-get update? How did you notice or confirm that, that repository is not enabled? –  Anwar Shah Sep 18 '12 at 12:51
    
just copy the lines in /etc/apt/sources.list. –  green7 Sep 18 '12 at 14:03
    
So the problem seemed to be that I had a package installed from one of the normal apt repos and I wanted it to update with a version from one of the new repos. Apparently this is not possible. I had to uninstall the packages in question and then install with all of the normal repos commented out. I'm still not sure why when you do an apt-get update, that none of these new repos have their urls displayed. –  Jistanidiot Sep 25 '12 at 15:10

2 Answers 2

The names of files in /etc/sources.list.d must end in .list, if they are to be included as software sources.

As the man page of sources.list says:

DESCRIPTION

   The package resource list is used to locate archives of the package
   distribution system in use on the system. At this time, this manual
   page documents only the packaging system used by the Debian GNU/Linux
   system. This control file is /etc/apt/sources.list.

   The source list is designed to support any number of active sources and
   a variety of source media. The file lists one source per line, with the
   most preferred source listed first. The format of each line is: type
   uri args The first item, type determines the format for args.  uri is a
   Universal Resource Identifier (URI), which is a superset of the more
   specific and well-known Universal Resource Locator, or URL. The rest of
   the line can be marked as a comment by using a #.

SOURCES.LIST.D

   The /etc/apt/sources.list.d directory provides a way to add
   sources.list entries in separate files. The format is the same as for
   the regular sources.list file. File names need to end with .list and
   may only contain letters (a-z and A-Z), digits (0-9), underscore (_),
   hyphen (-) and period (.) characters. Otherwise APT will print a notice
   that it has ignored a file if the file doesn't match a pattern in the
   Dir::Ignore-Files-Silently configuration list - in this case it will be
   silently ignored.

Taking an example from this page, suppose you wanted to install chef (from opscode), what you'd do is:

  • Create and open a file named opscode.list:
    sudo vim /etc/apt/sources.list.d/opscode.list
  • Add the required line and save the file:
    deb http://apt.opscode.com/ oneiric main

The above steps can be combined to make a single command:

sudo echo "deb http://apt.opscode.com/ onereic main" > /etc/apt/sources.list.d/opscode.list

Note: The command contains onereic because the codename of the Ubuntu you're using is Onereic. Had you been using Precise (12.04), you'd have writter precise.

share|improve this answer
4  
Have you read the OP? He does all these steps. –  January Sep 18 '12 at 11:55
    
He did not specify, what file he added. –  green7 Sep 18 '12 at 13:10
1  
He did give two names (virtualbox.list and another one) –  January Sep 18 '12 at 13:14
up vote 0 down vote accepted

So the problem seemed to be that I had a package installed from one of the normal apt repos and I wanted it to update with a version from one of the new repos. Apparently this is not possible. I had to uninstall the packages in question and then install with all of the normal repos commented out. I'm still not sure why when you do an apt-get update, that none of these new repos have their urls displayed.

share|improve this answer
    
You do not answer your own question. What you did here is not very clear, doesn't relate to your question and probably it should have been done by apt pinning. –  JoBo Aug 29 '13 at 9:38
    
I only can tell you that this fixed the problem I was having when I asked the question. The other "answer" clearly didn't read my question and was totally useless. This is what worked for me. I don't know if it will work for anyone else. I assume it was some bug in ubuntu 11 that caused it not to use updated packages from additional repos. It seems to not be an issue in ubuntu 12 or 13. –  Jistanidiot Aug 30 '13 at 11:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.