Bug 801114 - Logic for handling orphan packages should account for sub directories
Summary: Logic for handling orphan packages should account for sub directories
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: user-experience
Version: 1.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: Sprint 34
Assignee: John Matthews
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On: 801090
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-07 17:26 UTC by Pradeep Kilambi
Modified: 2013-09-09 16:27 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 801090
Environment:
Last Closed: 2012-05-25 14:14:54 UTC


Attachments (Terms of Use)

Comment 1 John Matthews 2012-04-17 13:12:41 UTC
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 15:44:38 UTC
build: 1.1.3

Comment 3 Preethi Thomas 2012-04-20 19:54:48 UTC
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 14:14:54 UTC
Pulp v1.1 Release


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