Comment 3 for bug 1578224

Revision history for this message
Sergey Kulanov (skulanov) wrote :

Just to simplify the debugging let's take one package:

packetary --debug --threads-num 10 clone \
   -t rpm \
   -r centos_mirror.yaml \
   -R packages.yaml \
   -d /tmp/mirrors/

centos_mirror.yaml:

- name: "mos-repos"
  uri: "http://localhost:8000/centos//x86_64"
  priority: 1
  path: "/tmp/mirrors/mos-centos"

- name: "upstream-os"
  uri: "http://osci-mirror-kha.kha.mirantis.net/pkgs/centos-2016-05-22-170053//os/x86_64"
  priority: 90
  path: "/tmp/mirrors/centos"
- name: "upstream-updates"
  uri: "http://osci-mirror-kha.kha.mirantis.net/pkgs/centos-2016-05-22-170053//updates/x86_64"
  priority: 10
  path: "/tmp/mirrors/centos"
- name: "upstream-extras"
  uri: "http://osci-mirror-kha.kha.mirantis.net/pkgs/centos-2016-05-22-170053//extras/x86_64"
  priority: 90
  path: "/tmp/mirrors/centos"
- name: "mos-repos"
  uri: "http://localhost:8000/centos//x86_64"
  priority: 1
  path: "/tmp/mirrors/mos-centos"

packages.yaml:

packages:
  - name: python2-oslo-config

# repositories:
# - name: mos-repos
# excludes:
# - name: "/^.*debuginfo.*/"

Result:

Unresolved relation: python-debtcollector (>= 0:1.2.0) from python2-oslo-config

So it seems we have some issues in logic:

Information from spec:
Provides: python-debtcollector = %{version}-%{release}
Obsoletes: python-debtcollector < 0.7.0-3

From package meta information:
$] cat OBSOLETES
python-debtcollector < 1.2.0-1.el7~mos1
python-debtcollector < 0.7.0-3

$] cat PROVIDES
python-debtcollector = 1.2.0-1.el7~mos1
python2-debtcollector = 1.2.0-1.el7~mos1

So rpm package can either provide or obsolete packages, and this this logic [1] doesn't take it into account

[1]. https://github.com/openstack/packetary/blob/master/packetary/objects/packages_tree.py#L63-L80