Bug 817914

Summary: yum fails list repo and install packages from repo that has i18n character in its id
Product: [Retired] Pulp Reporter: Preethi Thomas <pthomas>
Component: user-experienceAssignee: Sayli Karmarkar <skarmark>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.1.0CC: cperry, jason.dobies
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-25 14:15:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Preethi Thomas 2012-05-01 19:13:08 UTC
Description of problem:

yum fails list repo and install packages from repo that has i18n character in its id                  
Version-Release number of selected component (if applicable):
[root@pulp-v1-1-server ~]# rpm -q pulp
pulp-1.1.6-1.fc16.noarch

How reproducible:


Steps to Reproduce:
1.create and sync a repo with i18n characters in the id
2.bind the repo to a consumer
3.run yum repolist on the consumer
4 Try to install a package from the repo on the consumer 
  
Actual results:

[root@pulp-client ~]# yum repolist
Loaded plugins: product-id, pulp-profile-update, security, subscription-manager
Updating certificate-based repositories.
Bad id for repo: Brasília, byte = � 4
repolist: 0
[root@pulp-v1-1-server ~]# pulp-admin package install --consumerid=pulp-client  -n pulp
Created task id: f5a4d105-93c1-11e1-9165-525400fbc951
Waiting: [\] 
Consumer ID: pulp-client  [ FAILED ] No package(s) available to install

[root@pulp-v1-1-server ~]# 



Expected results:


Additional info:

Comment 1 Sayli Karmarkar 2012-05-02 16:59:21 UTC
We are not going to allow multi-byte characters in repo ids anymore as yum does not support them. Added migrate script to let the users know of any existing repos with multi-byte ids. 

commit 631b46a068857ca2b659fc114a7c1943670ce483
Author: Sayli Karmarkar <skarmark>
Date:   Wed May 2 09:49:39 2012 -0700

    817914 - adding restriction on repo id as yum does not support multibyte characters inside .repo file in repo title, this fix also contains migrate script to let u

$ pulp-admin repo create --id Brasília --feed http://spacewalk.redhat.com/yum/1.6-client/Fedora/16/x86_64/
error:  operation failed: PulpValidationError: Given ID is invalid. ID may contain numbers(0-9), upper and lower case letters(A-Z, a-z), hyphens(-), underscore(_) and periods(.)


$ sudo pulp-migrate 
removing persisted tasks

ID for repositories [Brasília] contains characters which are not supported by Yum as a repository title in a '.repo' file.
Because of this, you may see an error when installing a package from these repositories on a consumer. You can either 
manually update consumer's .repo file to update title, or delete and create a new repository that follows new ID restriction. 
Repository ID may now contain only numbers(0-9), upper and lower case letters(A-Z, a-z), hyphens(-), underscore(_) and periods(.)

database migration to version 41 complete

Comment 2 Jay Dobies 2012-05-03 13:19:25 UTC
Fixed in build 1.1.7.

Comment 3 Preethi Thomas 2012-05-03 17:27:51 UTC
[root@pulp-v1-server ~]# rpm -q pulp
pulp-1.1.7-1.el6.noarch
[root@pulp-v1-server ~]# 


[root@pulp-v1-1-server ~]#  pulp-admin -u admin -p admin repo create --id Brasília --feed http://repos.fedorapeople.org/repos/pulp/pulp/v1/testing/fedora-16/x86_64/
error:  operation failed: PulpValidationError: Given ID is invalid. ID may contain numbers(0-9), upper and lower case letters(A-Z, a-z), hyphens(-), underscore(_) and periods(.)
[root@pulp-v1-1-server ~]# 
[root@pulp-v1-server ~]# pulp-migrate
removing persisted tasks

ID for repositories ['Bras\xc3\xadlia'] contains characters which are not supported by Yum as a repository title in a '.repo' file.
Because of this, you may see an error when installing a package from these repositories on a consumer. You can either 
manually update consumer's .repo file to update title, or delete and create a new repository that follows new ID restriction. 
Repository ID may now contain only numbers(0-9), upper and lower case letters(A-Z, a-z), hyphens(-), underscore(_) and periods(.)

database migration to version 41 complete

Comment 4 Preethi Thomas 2012-05-25 14:15:22 UTC
Pulp v1.1 Release