Bug 713580

Summary: blacklist_packages broken
Product: [Retired] Pulp Reporter: Chris St. Pierre <cstpierr>
Component: z_otherAssignee: Sayli Karmarkar <skarmark>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: cperry, skarmark
Target Milestone: ---   
Target Release: Sprint 25   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-16 12:10:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 647488    
Attachments:
Description Flags
Patch none

Description Chris St. Pierre 2011-06-15 19:59:40 UTC
Created attachment 504934 [details]
Patch

Description of problem:

When syncing a repo with a blacklist filter, "pulp-admin repo status" says:

Last Error: 2011-06-15 14:32:59-04:00
ValueError: list.remove(x): x not in list


Version-Release number of selected component (if applicable):

0.0.190, HEAD

How reproducible:

Every time

Steps to Reproduce:

1. Configure a repo with a blacklist filter.
2. Trigger a sync of that repo.
  
Actual results:

The sync fails with the error listed above.  The full stack trace is:

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/pulp/server/tasking/task.py", line 330, in run
    result = self.callable(*self.args, **self.kwargs)
  File "/usr/lib/python2.4/site-packages/pulp/server/api/repo_sync.py", line 224, in _sync
    progress_callback, synchronizer, max_speed, threads)
  File "/usr/lib/python2.4/site-packages/pulp/server/api/repo_sync.py", line 302, in fetch_content
    progress_callback, max_speed, threads)
  File "/usr/lib/python2.4/site-packages/pulp/server/api/synchronizers.py", line 747, in sync
    progress_callback)
  File "/usr/lib/python2.4/site-packages/pulp/server/api/synchronizers.py", line 607, in _sync_rpms
    pkglist = self._find_filtered_package_list(unfiltered_pkglist, whitelist_packages, blacklist_packages)
  File "/usr/lib/python2.4/site-packages/pulp/server/api/synchronizers.py", line 597, in _find_filtered_package_list
    pkglist.remove(pkg)
ValueError: list.remove(x): x not in list

Expected results:

The sync proceeds apace with the selected packages filtered out.

Additional info:

Patch is attached.

Comment 1 Sayli Karmarkar 2011-06-16 07:32:31 UTC
Tested and applied patch.

Comment 2 Jeff Ortel 2011-06-17 21:10:12 UTC
build: 0.192

Comment 3 Preethi Thomas 2011-08-09 18:33:57 UTC
verified
[root@preethi ~]# rpm -q pulp
pulp-0.0.223-1.fc14.noarch
[root@preethi ~]# 

[root@preethi ~]# pulp-admin repo clone --id=f14 --clone_id=f14-clone --clone_name=f14-clone --feed=parent -f filter1 -F
Repository [f14] is being cloned as [f14-clone]
Clone: Finished
Item Details: 
Tree_Files: 6/6
Rpms: 2764/2766

[root@preethi ~]# pulp-admin repo clone --id=f14-clone  -F
Usage: pulp-admin <options> repo clone <options>

pulp-admin: error: Option --clone_id is required; please see --help
[root@preethi ~]# pulp-admin repo sync --id=f14-clone  -F
Sync for repository f14-clone started
Sync: Finished
0/2772 new items downloaded
2772/2772 existing items processed

Item Details: 
Tree_Files: 6/6
Rpms: 2764/2766

Comment 4 Preethi Thomas 2011-08-16 12:10:04 UTC
Closing with Community Release 15

pulp-0.0.223-4.

Comment 5 Preethi Thomas 2011-08-16 12:22:14 UTC
Closing with Community Release 15

pulp-0.0.223-4.