My first exercise with pulp_deb, after installing on CentOS 7:
( https://gist.github.com/beattidp/103a4528a67c37095a720b33c7a542e6 )
Try to create Ubuntu 14 (Trusty) Security repo only.
$ pulp-admin deb repo create \
--repo-id=ubuntu-trusty-SECURITY-main-binary-amd64 \
--relative-url=ubuntu/dists/trusty-security/main/binary-amd64 \
--feed=http://security.ubuntu.com/ubuntu/dists/trusty-security/main/binary-amd64/ \
--serve-http=true
$ pulp-admin deb repo sync run \
--repo-id=ubuntu-trusty-SECURITY-main-binary-amd64
+----------------------------------------------------------------------+
Synchronizing Repository [ubuntu-trusty-SECURITY-main-binary-amd64]
+----------------------------------------------------------------------+
This command may be exited via ctrl+c without affecting the request.
Task Failed
[Errno 2] No such file or directory:
u'/var/cache/pulp/reserved_resource_worker-3@linuxrepo01.machine.local/f065f24b
-cd79-4a74-969e-02b2c8120326/Release'
What's this?! 'dists/stable' appended to my feed URL?
[itserv@linuxrepo01 ~]$ sudo grep "pulp: nectar" /var/log/messages | tail -n1
Jun 8 22:25:49 linuxrepo01 pulp: nectar.downloaders.threaded:INFO: Download failed:
Download of
http://security.ubuntu.com/ubuntu/dists/trusty-security/main/binary-amd64/dists/stable/Release
failed with code 404: Not Found
Yes, the 'Release' file is there, and retrievable.
[itserv@linuxrepo01 ~]$ curl \
http://security.ubuntu.com/ubuntu/dists/trusty-security/main/binary-amd64/Release
Archive: trusty-security
Version: 14.04
Component: main
Origin: Ubuntu
Label: Ubuntu
Architecture: amd64
So, then I discovered pulp.plan.io and reading the sources ( plugins/pulp_deb/plugins/importers/sync.py ) mentions issue 2765, which refers to this (2764), which seems the relevant issue for my question:
What in theory happens if we don't force an appended 'dists/stable' on there, assuming the 'Release' file is present at the default feed URL? I don't know all the interactions of other code, but I wonder if a way to evaluate this (while leaving existing 'dists/stable' appended) might be to first check for existence of a './Release' file at the default feed URL.