Bug 1301876 - TraceBack while adding ovirt-release-master
TraceBack while adding ovirt-release-master
Status: CLOSED NOTABUG
Product: Repoman
Classification: Community
Component: Core (Show other bugs)
1.2
Unspecified Unspecified
unspecified Severity urgent
: 1.3
: ---
Assigned To: David Caro
David Caro
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-26 04:17 EST by Sandro Bonazzola
Modified: 2016-06-26 19:51 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-01-26 04:50:54 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sandro Bonazzola 2016-01-26 04:17:55 EST
# rpm -qv repoman
repoman-1.2.51-1.el7.centos.noarch

# repoman --with-sources /var/www/html/pub/ovirt-master-snapshot-static add http://jenkins.ovirt.org/job/ovirt-release_master_create-rpms_merged/21127/artifact/exported-artifacts/ovirt-node-ng-image-update-placeholder-4.0.0-0.0.master.noarch.rpm http://jenkins.ovirt.org/job/ovirt-release_master_create-rpms_merged/21127/artifact/exported-artifacts/ovirt-release-master-4.0.0-0.0.master.noarch.rpm http://jenkins.ovirt.org/job/ovirt-release_master_create-rpms_merged/21127/artifact/exported-artifacts/ovirt-release-master-4.0.0-0.0.master.src.rpm http://jenkins.ovirt.org/job/ovirt-release_master_create-rpms_merged/21127/artifact/exported-artifacts/ovirt-release-master-host-node-4.0.0-0.0.master.noarch.rpm


Description of problem:
Traceback (most recent call last):
  File "/bin/repoman", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/site-packages/repoman/cmd.py", line 205, in main
    repo.add_source(art_src.strip())
  File "/usr/lib/python2.7/site-packages/repoman/common/repo.py", line 115, in add_source
    store.add_artifact(artifact_path)
  File "/usr/lib/python2.7/site-packages/repoman/common/stores/RPM/__init__.py", line 178, in add_artifact
    self.add_rpm(pkg, **args)
  File "/usr/lib/python2.7/site-packages/repoman/common/stores/RPM/__init__.py", line 198, in add_rpm
    distro_reg=self.config.get('distro_reg')
  File "/usr/lib/python2.7/site-packages/repoman/common/stores/RPM/RPM.py", line 137, in __init__
    self.distro = self.get_distro(self.release, distro_reg)
  File "/usr/lib/python2.7/site-packages/repoman/common/stores/RPM/RPM.py", line 189, in get_distro
    raise WrongDistroException('Unknown distro for %s' % release)
Comment 1 David Caro 2016-01-26 04:23:04 EST
That's to be expected, as the rpms are malformed (they have no distro in the release at all).

You can bypass this adding the option:

 > repoman --with-sources /path/to/repo add --option stores.RPMStore.on_wrong_distro=warn ...

To do nothing about it (the rpms will not be pulled) or if you want to pull them to all the distros in the repo:

 > repoman --with-sources add /path/to/repo --option stores.RPMStore.on_wrong_distro=copy_to_all


For more info: http://repoman.readthedocs.org/en/latest/repoman.common.stores.RPM.html#repoman.common.stores.RPM.RPMStore
Comment 2 Sandro Bonazzola 2016-01-26 04:39:47 EST
Doesn't work:
# repoman --option stores.RPMStore.on_wrong_distro=copy_to_all --with-sources /var/www/html/pub/ovirt-master-snapshot-static add http://jenkins.ovirt.org/job/ovirt-release_master_create-rpms_merged/21127/artifact/exported-artifacts/ovirt-node-ng-image-update-placeholder-4.0.0-0.0.master.noarch.rpm http://jenkins.ovirt.org/job/ovirt-release_master_create-rpms_merged/21127/artifact/exported-artifacts/ovirt-release-master-4.0.0-0.0.master.noarch.rpm http://jenkins.ovirt.org/job/ovirt-release_master_create-rpms_merged/21127/artifact/exported-artifacts/ovirt-release-master-4.0.0-0.0.master.src.rpm http://jenkins.ovirt.org/job/ovirt-release_master_create-rpms_merged/21127/artifact/exported-artifacts/ovirt-release-master-host-node-4.0.0-0.0.master.noarch.rpm
2016-01-26 09:39:24,625::INFO::repoman.common.stores.RPM::Loading repo /var/www/html/pub/ovirt-master-snapshot-static
2016-01-26 09:39:24,678::ERROR::root::Malformed release string on /var/www/html/pub/ovirt-master-snapshot-static/rpm/el7/noarch/ovirt-node-ng-image-update-placeholder-4.0.0-0.0.master.noarch.rpm
Traceback (most recent call last):
  File "/bin/repoman", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/site-packages/repoman/cmd.py", line 197, in main
    repo = Repo(path=path, config=config)
  File "/usr/lib/python2.7/site-packages/repoman/common/repo.py", line 76, in __init__
    if key in self.stores or 'all' in self.stores
  File "/usr/lib/python2.7/site-packages/repoman/common/stores/RPM/__init__.py", line 160, in __init__
    hidelog=True,
  File "/usr/lib/python2.7/site-packages/repoman/common/stores/RPM/__init__.py", line 178, in add_artifact
    self.add_rpm(pkg, **args)
  File "/usr/lib/python2.7/site-packages/repoman/common/stores/RPM/__init__.py", line 198, in add_rpm
    distro_reg=self.config.get('distro_reg')
  File "/usr/lib/python2.7/site-packages/repoman/common/stores/RPM/RPM.py", line 137, in __init__
    self.distro = self.get_distro(self.release, distro_reg)
  File "/usr/lib/python2.7/site-packages/repoman/common/stores/RPM/RPM.py", line 189, in get_distro
    raise WrongDistroException('Unknown distro for %s' % release)
repoman.common.stores.RPM.RPM.WrongDistroException: Unknown distro for 0.0.master

Note You need to log in before you can comment on or make changes to this bug.