createrepo-0.9.9-4.fc15 loses beginning of package file names
Jim Walker <[email protected]> Sun, 30 Oct 2011 17:25:20 +0000 (UTC)
| Newsgroups | gmane.linux.rpm.metadata |
|---|---|
| Message-ID | <1571308079.345929.1319995520491.JavaMail.root@cl05-host03.roch.ny.frontiernet.net> |
If the name of the directory is the same as the beginning of the name of a package, createrepo trims those characters from the beginning of the package file name when it creates the metadata. Then yum can't find the file. This is easily reproducable. The workaround is to name the directory something else. Tested on fedora 13 with createrepo-0.9.8-4.fc13 and on fedora 15 live KDE with createrepo-0.9.9-4.fc15. In this example, naming the repository repo causes repo to be deleted from the beginning of filenames report-*.rpm, leaving us with rt-*.rpm [root@localhost ~]# cat /etc/redhat-release Fedora release 15 (Lovelock) [root@localhost ~]# rpm -q createrepo createrepo-0.9.9-4.fc15.noarch [root@localhost ~]# mkdir /repo [root@localhost ~]# cp /x/Packages/report-* /repo [root@localhost ~]# createrepo /repo Spawning worker 0 with 8 pkgs Workers Finished Gathering worker results Saving Primary metadata Saving file lists metadata Saving other metadata Generating sqlite DBs Sqlite DBs complete [root@localhost ~]# cd /repo/repodata/ [root@localhost repodata]# ls 278e393e713bc8a1184496fd898b71ca95d326b30304aade85e5cf15a99cf241-primary.sqlite.bz2 49a9ca8f1c4e3f6f928c4dda977fb5d0ff5515e3fad12ff1b2449bb765d82295-filelists.xml.gz 4ac9143e1190aca4359570eedb971769ade7294e92750cb1115e388464f1db5f-primary.xml.gz 4e62760f53f4d258364f2ecb7e27551634551552c80833c4e9e34a64c5e5614f-other.sqlite.bz2 8164659a4ce805a71ed77fa4eed294207bc99a86e4e2129bb05482410f7ae0c2-other.xml.gz d3068c3b3903f9e63d6bbd9e97df382cab212c4e1d5506c238d066ed0fdaae9d-filelists.sqlite.bz2 repomd.xml [root@localhost repodata]# cat *primary.xml.gz | gunzip | grep href <location href="rt-plugin-bugzilla-0.10-5.fc13.i686.rpm"/> <location href="rt-plugin-scp-0.10-5.fc13.i686.rpm"/> <location href="rt-gtk-0.10-5.fc13.i686.rpm"/> <location href="rt-config-scp-0.10-5.fc13.i686.rpm"/> <location href="rt-config-bugzilla-redhat-com-0.10-5.fc13.i686.rpm"/> <location href="rt-0.10-5.fc13.i686.rpm"/> <location href="rt-plugin-localsave-0.10-5.fc13.i686.rpm"/> <location href="rt-config-localsave-0.10-5.fc13.i686.rpm"/> [root@localhost repodata]# cd .. [root@localhost repo]# ls repodata report-0.10-5.fc13.i686.rpm report-config-bugzilla-redhat-com-0.10-5.fc13.i686.rpm report-config-localsave-0.10-5.fc13.i686.rpm report-config-scp-0.10-5.fc13.i686.rpm report-gtk-0.10-5.fc13.i686.rpm report-plugin-bugzilla-0.10-5.fc13.i686.rpm report-plugin-localsave-0.10-5.fc13.i686.rpm report-plugin-scp-0.10-5.fc13.i686.rpm [root@localhost repo]#