symlinks in repos point to the absolute path to a package: zlib-1.2.3-3.x86_64.rpm -> /var/lib/pulp//packages/zlib/1.2.3/3/x86_64/eb6/zlib-1.2.3-3.x86_64.rpm This mean that syncing content under different root other than /var/lib/pulp won't work. Can you re-work linking to use relative paths instead? /var/lib/pulp/repos/<repo>/zlib-1.2.3-3.x86_64.rpm -> ../../packages/zlib/1.2.3/3/x86_64/eb6/zlib-1.2.3-3.x86_64.rpm
To clarify, the perspective of this bug is from the CDN use case where the content is copied somewhere else. For that case it's important the symlinks are relative.
Here is an example of what the links look like now: /var/lib/pulp/repos/repo_resync_a/pulp-test-package-0.3.1-1.fc11.x86_64.rpm -> ../../packages/pulp-test-package/0.3.1/1.fc11/x86_64/6bc/pulp-test-package-0.3.1-1.fc11.x86_64.rpm Requires grinder 0.85 Related pulp commits are below: http://git.fedorahosted.org/git/?p=pulp.git;a=commitdiff;h=545f47fc4da098e8ceca09555084e755a5b8646a http://git.fedorahosted.org/git/?p=pulp.git;a=commitdiff;h=c82616b88f7c4b8ea6ab6936fb52dd3645e8ff84
build: 0.146
Moving back to MODIFIED. I didn't fix the case when we call add_package from the API. I only addressed this from the sync perspective. Will have this fix 3/10/11
Fixed case of 'add_packages'. All usage of symlink in pulp will create relative links. Commit: http://git.fedorahosted.org/git/?p=pulp.git;a=commitdiff;h=45fbca1543d8a09729afff8fbc8bf9694783f7d0 QE Test: 1) local sync 2) yum sync 3) add_packages Verify that under /var/lib/pulp/ all new symlinks created are relative If you see any links that aren't fail this bug and add a comment please with details. Look under /var/lib/pulp/published as well as /var/lib/pulp/repos
Build: 0.147
From the yum repo [root@hp-ml370g4-01 ~]# ls -l /var/lib/pulp/repos/repos/pulp/pulp/testing/fedora-14/x86_64/ total 180 -rw-r--r-- 1 apache apache 0 Mar 11 10:48 cachecookie -rw-r--r-- 1 apache apache 5028 Mar 10 11:26 filelists.xml.gz lrwxrwxrwx 1 apache apache 87 Mar 11 10:48 gofer-0.20-1.fc14.noarch.rpm -> ../../../../../../../packages/gofer/0.20/1.fc14/noarch/775/gofer-0.20-1.fc14.noarch.rpm lrwxrwxrwx 1 apache apache 95 Mar 11 10:48 grinder-0.0.86-1.fc14.noarch.rpm -> ../../../../../../../packages/grinder/0.0.86/1.fc14/noarch/816/grinder-0.0.86-1.fc14.noarch.rpm From the local repo [root@hp-ml370g4-01 ~]# ls -l /var/lib/pulp/repos/local-repo1/ total 96 drwxr-sr-x 2 apache apache 4096 Mar 11 10:54 drpms lrwxrwxrwx 1 apache apache 72 Mar 11 10:54 gofer-0.20-1.fc14.noarch.rpm -> ../../packages/gofer/0.20/1.fc14/noarch/775/gofer-0.20-1.fc14.noarch.rpm lrwxrwxrwx 1 apache apache 80 Mar 11 10:54 grinder-0.0.86-1.fc14.noarch.rpm -> ../../packages/grinder/0.0.86/1.fc14/noarch/816/grinder-0.0.86-1.fc14.noarch.rpm From a upload repo with add_package [root@hp-ml370g4-01 upload]# ls -l /var/lib/pulp/repos/upload/ total 16 lrwxrwxrwx 1 apache apache 110 Mar 11 11:15 kalpana-0.1.30-1.git.26.0642cff.fc14.noarch.rpm -> ../../packages/kalpana/0.1.30/1.git.26.0642cff.fc14/noarch/b39/kalpana-0.1.30-1.git.26.0642cff.fc14.noarch.rpm drwxr-sr-x 2 apache apache 4096 Mar 11 11:15 repodata [root@hp-ml370g4-01 upload]#
[root@hp-ml370g4-01 upload]# pulp-admin repo add_package --id=upload -p gofer-0.20-1.fc14.noarch.rpm --source=local-repo1 Following dependencies are suggested. ['python-gofer-0.20-1.fc14.noarch.rpm', 'gofer-0.20-1.fc14.noarch.rpm'] Would you like us to add these?(Y/N/Q):y Successfully added packages ['gofer-0.20-1.fc14.noarch', 'python-gofer-0.20-1.fc14.noarch', 'gofer-0.20-1.fc14.noarch'] to repo [upload]. [root@hp-ml370g4-01 upload]# [root@hp-ml370g4-01 upload]# [root@hp-ml370g4-01 upload]# [root@hp-ml370g4-01 upload]# ls -l /var/lib/pulp/repos/upload/total 32 lrwxrwxrwx 1 apache apache 72 Mar 11 11:23 gofer-0.20-1.fc14.noarch.rpm -> ../../packages/gofer/0.20/1.fc14/noarch/942/gofer-0.20-1.fc14.noarch.rpm lrwxrwxrwx 1 apache apache 110 Mar 11 11:15 kalpana-0.1.30-1.git.26.0642cff.fc14.noarch.rpm -> ../../packages/kalpana/0.1.30/1.git.26.0642cff.fc14/noarch/b39/kalpana-0.1.30-1.git.26.0642cff.fc14.noarch.rpm lrwxrwxrwx 1 apache apache 86 Mar 11 11:23 python-gofer-0.20-1.fc14.noarch.rpm -> ../../packages/python-gofer/0.20/1.fc14/noarch/e35/python-gofer-0.20-1.fc14.noarch.rpm drwxr-sr-x 2 apache apache 4096 Mar 11 11:23 repodata
verified results in above 2 comments [root@hp-ml370g4-01 upload]# rpm -q pulp pulp-0.0.147-1
Closing with Community Release 15 pulp-0.0.223-4.