b10n1k
b10n1k

Reputation: 615

yum does not return packages from a local created rpm repo in fedora

I create a local repo in a path in the home dir with createrepo command. I add three packages inside to test it. I have created the myrepo.repo file into /etc/yum.repo.d/ and i run "yum search runit --disablerepo=* --enablerepo=myrepo" expecting to return only packages from my repo. the package is myrepo/runit-2.1.1-4.1.src.rpm. When i run repomanage --new myrepo it returns the list of packages correctly. But i doubt if yum is managed to find the packages. When i run yum repolist, although the repo is listed the status provides only whatever are included after creation of rep. This is the output:

fedora/19/i386 Fedora 19 - i386 30,446

!google-talkplugin google-talkplugin 1

!livna rpm.livna.org for 19 - i386 8

!myrepo myrepo 2

rpmfusion-free/19/i386 RPM Fusion for Fedora 19 - Free 377

I am not sure what i must do furthermore and where i have to search for help. A search on internet show up nothing useful. Any suggestion?

Upvotes: 1

Views: 2896

Answers (2)

Gang
Gang

Reputation: 2768

The createrepo for local repo is not enough, I have to add 2 extra commands which requires root access, even the sudo did not work for me

# First run createrepo.sh from Bruno9779

# then, run this as root user
yum --disablerepo="*" --enablerepo="local" clean metadata
yum makecache --enablerepo="local" --disablerep="*"

# yum search your-package-name-short

Upvotes: 0

Bruno9779
Bruno9779

Reputation: 1669

I have had a similar issue. I solved it by making a script that use createrepo and run it in a crontab every few minutes (I have another cron that keeps uploading recently created packages from my build box).

#!/bin/sh

destdir="/share/CentOS/6/myrepo/i686/"

for arch in i686 x86_64

do

    pushd ${destdir}/${arch} >/dev/null 2>&1

        createrepo .

    popd >/dev/null 2>&1

done

If you still can't make it work you need to show your .repo as suggested above

Upvotes: 1

Related Questions