By sudo add-apt-repository '<deb url codename component>'
, a repository is added to the /etc/apt/source.list file.
By sudo add-apt-repository ppa:<user>/<ppa-name>
, I saw that all the ppa repositories are added to /etc/apt/source.list.d dir:
$ ls /etc/apt/sources.list.d/
ferramroberto-sopcast-precise.list
ferramroberto-sopcast-precise.list.save
google-talkplugin.list
google-talkplugin.list.save
kalakris-okular-precise.list
kalakris-okular-precise.list.save
linrunner-thinkpad-extras-precise.list
linrunner-thinkpad-extras-precise.list.save
precise-partner.list
precise-partner.list.save
staticfloat-julia-deps-precise.list
staticfloat-juliareleases-precise.list
staticfloat-juliareleases-precise.list.save
telepathy-ppa-precise.list
telepathy-ppa-precise.list.save
ubuntu-wine-ppa-precise.list
ubuntu-wine-ppa-precise.list.save
venerix-blug-precise.list
venerix-blug-precise.list.save
-
Can a ppa repositories be added to the end of /etc/apt/source.list file, instead?
-
Why are ppa repositories are treated differently from non-ppa ones?
-
Are there other non-ppa repositories treated similarly as ppa ones?
-
Will
sudo add-apt-repository '<deb url codename component>'
add a ppa repository to /etc/apt/source.list, or to some files under /etc/apt/source.list.d?
Best Answer
Yes, PPA's can be added to
/etc/apt/source.list
, in similar way to debian (deb) repositories.An example for WineHq:
Thought just matter of keeping things somehow easily managed, leaving
/etc/apt/source.list
only for official release repositories. All additional repositories goes to/etc/apt/source.list.d/
. Easy to:/etc/apt/source.list
looking to related line)/etc/apt/source.list.d/
folder)/etc/apt/source.list
PPA are always added to
/etc/apt/source.list.d/
folder if wrote it inppa:<user>/<ppa-name>
form.Reference:
man add-apt-repository
Well, it seems only PPA's as shortcut goes to
/etc/apt/sources.list.d/
.add-apt-repository
orapt-add-repository
is a Ubuntu specific tool. All I can think of is just Ubuntu decision to keep personal PPA's out.However you can modify it to use only
/etc/apt/sources.list
. It's a python3 script. Modify/usr/bin/add-apt-repository
line:replace it with this one below to resolve ppa shortcut form to a deb line form: