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.

How are the files in an Ubuntu repository organized? What are the important files in a repository? What happens when a repository becomes inconsistent, broken or is being synced?

share|improve this question
add comment

2 Answers

up vote 10 down vote accepted

According to the deb line on your apt source, apt will fetch:

It validates if the Release.gpg is a valid signature for the Release file, and if the Packages.gz contents matches the integrity checksum present on the Release file. If there is a mismatch, a repository signature integrity failure is reported.

The package file name for the requested package is determined from the previously retrieved Packages.gz contents. It is downloaded, and its content checksum must match the Packages.gz checksum content or an integrity failure is reported.

Your last question is not about the mirror structure per se, it is about the mirror synchronization, which depends on the mirroring process. It is possible to synchronize using a temporary location without breaking the archive integrity during synch. I am not sure if all Ubuntu mirrors do that.

share|improve this answer
    
unfortunately links are broken –  bluish Sep 19 '11 at 15:02
    
They are not broken, they are just templates, you will need to replace the "release" "COMPONENT", binary-", etc, which are dynamic fields. –  João Pinto Sep 28 '11 at 21:31
add comment

Joao answered the second half of my question, so I investigated the first half on my own. At the root level, there are four directories and one file.

root
| -- dists
| -- pool
| -- indices
| -- project
| -- ls-lr.gz

(Also in my college repo, only the first two entries were there. So the last 3 seem to be non-essential to the functioning of the repo.)

The file ls-lr.gz contains the output of the ls -lr command as run on the repository root directory.

The dists directory seems to contain most of the metadata, including all the packages.gz file (which contains a list of packages) and Release.gpg/Release which signs the package. (Thanks to Joao for the info)

The pool directory contains the actual .deb files. The organization is /pool/[section]/[letter]/[group]/packagename.deb. Thus the actual location of the python-subversion package is /pool/main/s/subversion/python-subversion_1.3.2-3ubuntu2%7edapper1_amd64.deb, because subversion is the group of the python-subversion package, and s is the first letter of subversion.

The projects directory seems to contain a few files detailing how the mirror was synced to the original repo.

The indices directory contains many files, most of them empty. The non-empty files seem to supply some extra metadata for packages.

share|improve this answer
add comment

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.