Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ubuntu mirrors package for debian sources.list #175

Merged
merged 2 commits into from
Jul 9, 2020

Conversation

piraka9011
Copy link
Collaborator

@piraka9011 piraka9011 commented Jul 9, 2020

Use the mirror protocol so apt selects the best mirror to use for downloading packages.
The default sources.list file used by colcon-bundle hardcoded the repo to the US mirror.
apt will now select the best mirror based on network and location.

Using the US repo on an instance in Tokyo, colcon bundle took 14m 59.416s.
Using the mirror protocol, bundling now takes 3m 47.402s

The mirror protocol does not work for Ubuntu Xenial (16.04) so we use the default archive repo instead of the explicit one from the US (which redirects to it's own mirror accordingly).

Signed-off-by: Anas Abou Allaban allabana@amazon.com

@piraka9011 piraka9011 changed the title Use dev mirrors Use ubuntu mirrors package for debian sources.list Jul 9, 2020
Signed-off-by: Anas Abou Allaban <allabana@amazon.com>
@piraka9011
Copy link
Collaborator Author

piraka9011 commented Jul 9, 2020

Using the mirrors results in the following error:

Step 22/23 : RUN source /opt/ros/kinetic/setup.sh; colcon bundle --bundle-version 1 --bundle-base v1 --pip-requirements py27_requirements.txt --pip3-requirements py3_requirements.txt
[10.717s] ERROR:colcon.colcon_bundle.verb:Could not fetch from repositories: 
W:The repository 'mirror://mirrors.ubuntu.com/mirrors.txt xenial Release' does not have a Release file., 
W:Data from such a repository can't be authenticated and is therefore potentially dangerous to use., 
W:See apt-secure(8) manpage for repository creation and user configuration details., 
W:The repository 'mirror://mirrors.ubuntu.com/mirrors.txt xenial-updates Release' does not have a Release file., 
W:Data from such a repository can't be authenticated and is therefore potentially dangerous to use., 
W:See apt-secure(8) manpage for repository creation and user configuration details., 
W:The repository 'mirror://mirrors.ubuntu.com/mirrors.txt xenial-backports Release' does not have a Release file., 
W:Data from such a repository can't be authenticated and is therefore potentially dangerous to use., 
W:See apt-secure(8) manpage for repository creation and user configuration details., 
W:The repository 'mirror://mirrors.ubuntu.com/mirrors.txt xenial-security Release' does not have a Release file., 
W:Data from such a repository can't be authenticated and is therefore potentially dangerous to use., 
W:See apt-secure(8) manpage for repository creation and user configuration details., 
W:GPG error: http://packages.osrfoundation.org/gazebo/ubuntu-stable xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 67170598AF249743, 
W:The repository 'http://packages.osrfoundation.org/gazebo/ubuntu-stable xenial InRelease' is not signed., 
W:Data from such a repository can't be authenticated and is therefore potentially dangerous to use., 
W:See apt-secure(8) manpage for repository creation and user configuration details., 
E:Failed to fetch mirror://mirrors.ubuntu.com/mirrors.txt/dists/xenial/main/binary-amd64/Packages  No mirror file '/opt/package/integration/test_workspace/v1/cache/installer_cache/apt/var/lib/apt/mirrors/mirrors.ubuntu.com_mirrors.txt' found  [Mirror: ], 
E:Failed to fetch mirror://mirrors.ubuntu.com/mirrors.txt/dists/xenial-updates/main/binary-amd64/Packages  No mirror file '/opt/package/integration/test_workspace/v1/cache/installer_cache/apt/var/lib/apt/mirrors/mirrors.ubuntu.com_mirrors.txt' found  [Mirror: ], 
E:Failed to fetch mirror://mirrors.ubuntu.com/mirrors.txt/dists/xenial-backports/main/binary-amd64/Packages  No mirror file '/opt/package/integration/test_workspace/v1/cache/installer_cache/apt/var/lib/apt/mirrors/mirrors.ubuntu.com_mirrors.txt' found  [Mirror: ], 
E:Failed to fetch mirror://mirrors.ubuntu.com/mirrors.txt/dists/xenial-security/main/binary-amd64/Packages  No mirror file '/opt/package/integration/test_workspace/v1/cache/installer_cache/apt/var/lib/apt/mirrors/mirrors.ubuntu.com_mirrors.txt' found  [Mirror: ], 
E:Some index files failed to download. They have been ignored, or old ones used instead.
[10.718s] ERROR:colcon:colcon bundle: Failed to fetch from repositories. Did you set your keys correctly?

I can't reproduce locally on Ubuntu 18.04.

I was able to reproduce this in an ubuntu:xenial Docker image.
It looks like Xenial does not support the mirror protocol for apt.

Signed-off-by: Anas Abou Allaban <allabana@amazon.com>
@piraka9011 piraka9011 marked this pull request as ready for review July 9, 2020 22:48
@piraka9011 piraka9011 merged commit 1ceb166 into master Jul 9, 2020
@delete-merged-branch delete-merged-branch bot deleted the mirror-sources branch July 9, 2020 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants