Bug 801114 - Logic for handling orphan packages should account for sub directories
Logic for handling orphan packages should account for sub directories
Status: CLOSED CURRENTRELEASE
Product: Pulp
Classification: Community
Component: user-experience (Show other bugs)
1.1.0
Unspecified Unspecified
unspecified Severity unspecified
: ---
: Sprint 34
Assigned To: John Matthews
Preethi Thomas
: Triaged
Depends On: 801090
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-07 12:26 EST by Pradeep Kilambi
Modified: 2013-09-09 12:27 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 801090
Environment:
Last Closed: 2012-05-25 10:14:54 EDT
Type: ---
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)
Comment 1 John Matthews 2012-04-17 09:12:41 EDT
Issue was with local syncs and how we handled the case of an existing package on the local filesystem but no longer in the source repo....this would break when the package was under a sub directory.

Fixed by removing the orphan logic from the local sync, allowing the removal to take place in repo_sync.py

Added a unit test to duplicate this issue:
nosetests test_repo_sync:TestRepoSync.test_local_sync_orphaned_package


Commit in pulp_v1 branch:
http://git.fedorahosted.org/git/?p=pulp.git;a=commitdiff;h=c0d6c66ef0272347f1f7abcdcda27678f6b06250
Comment 2 Jeff Ortel 2012-04-19 11:44:38 EDT
build: 1.1.3
Comment 3 Preethi Thomas 2012-04-20 15:54:48 EDT
verified

[root@pulp-v1-1-server ~]# rpm -q pulp
pulp-1.1.3-1.fc16.noarch


<jmatthews> 1) create a small local repo
<jmatthews> 2) add a few subdirs, so something line a/pkg1.rpm  b/pkg2.rpm
<jmatthews> 3) run createrepo so it's a valid repo
<jmatthews> 4) do a pulp local sync from this local repo
<jmatthews> 5) remove one of the pkgs from the local repo
<jmatthews> 6) resync

[root@pulp-v1-1-server ~]# pulp-admin -u admin -p admin repo create --id=local --feed=file:///tmp/local-repo/
Successfully created repository [ local ]

[root@pulp-v1-1-server ~]# pulp-admin repo sync --id=local -F
Sync for repository local started
Sync: Finished
2/2 new items downloaded
0/2 existing items processed

Item Details: 
RPMs: 2/2

[root@pulp-v1-1-server ~]# cd /tmp/local-repo/
[root@pulp-v1-1-server local-repo]# ls
a  b  repodata

[root@pulp-v1-1-server local-repo]# cd a/


[root@pulp-v1-1-server a]# cd ..
[root@pulp-v1-1-server local-repo]# rm -rf a/gofer-0.66-1.fc16.noarch.rpm 


root@pulp-v1-1-server ~]# createrepo /tmp/local-repo/
Spawning worker 0 with 1 pkgs
Workers Finished
Gathering worker results

Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete

[root@pulp-v1-1-server ~]# 
[root@pulp-v1-1-server ~]#  pulp-admin repo sync --id=local -F
Sync for repository local started
Sync: Finished
0/1 new items downloaded
1/1 existing items processed

Item Details: 
RPMs: 1/1
Comment 4 Preethi Thomas 2012-05-25 10:14:54 EDT
Pulp v1.1 Release

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