Project

Profile

Help

Issue #3917

closed

The repo metadata (Release) generated by pulp_deb doesn't allow repo pinning

Added by rvba over 5 years ago. Updated almost 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version - Debian:
Platform Release:
2.17.1
Target Release - Debian:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

  1. Problem statement

The general context of this issue is that we have a few Deb repos managed by pulp and we'd like to use apt pinning client-side (https://wiki.debian.org/AptPreferences) to control the priorities of the various repos.

The problem is that apt pinning works by distinguishing the repos based on the information present in each repo metadata file and the metadata produced by pulp_deb effectively uses the codename across the board for all the metadata fields, thus preventing apt pinning.

Here is an example of a Release file (the repo metadata file) produced by pulp_deb (this is version 1.7.1 but looking at the code, current master works the same):

# head -n 10 /var/lib/pulp/published/deb/master/deb_distributor/upstream_ubuntu-xenial-security_all/1529937308.62/dists/xenial/Release
Architectures: amd64
Components: restricted main universe
Codename: xenial
Suite: xenial
Description: Xenial
Origin: Xenial
Label: Xenial
Version: 1.0
SHA256:
 da98163c0f347ad50af1e564365af689c57f4d7d7a99143cd9c28bc697907994           103571 restricted/binary-amd64/Packages

Here is a "proper" Release file from http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu/dists/xenial/Release

Origin: LP-PPA-kubuntu-ppa-backports
Label: Kubuntu Backports
Suite: xenial
Version: 16.04
Codename: xenial
Date: Tue, 14 Aug 2018 12:28:35 UTC
Architectures: amd64 arm64 armhf i386 powerpc ppc64el s390x
Components: main
Description: Ubuntu Xenial 16.04
MD5Sum:
 67bf01f32017e60f75b9dd66160104f5           334136 main/binary-amd64/Packages.gz
[...]

The main problem is that, in the Release file generated by pulp, the value for 'Label' and 'Origin' which are typically used to pin repositories, are both 'xenial'/'Xenial' (i.e. the codename) and not something meaningful which allows to distinguish repos.

  1. Suggested solution

Since it's not entirely clear where to get the 'Origin' information I suggest simply fixing the 'Label' by setting it to the repo id: this will enable us to do pinning. Additionally, the 'Description' field can also be fixed.

Also available in: Atom PDF