Hi jigang, Thank you very much for providing detailed debug methods. Please see following information following your instructions.
On 7/16/12, jigang.djg <jigang....@taobao.com> wrote: > From the yum manual: > > CLEAN OPTIONS > The following are the ways which you can invoke yum in clean mode. > Note that "all files" in the com- > mands below means "all files in currently enabled repositories". If > you want to also clean any (tem- > porarily) disabled repositories you need to use --enablerepo=’*’ > option. > yum clean expire-cache > Eliminate the local data saying when the metadata and > mirrorlists were downloaded for each > repo. This means yum will revalidate the cache for each repo. > next time it is used. However if > the cache is still valid, nothing significant was deleted. > yum clean packages > Eliminate any cached packages from the system. Note > that packages are not automatically > deleted after they are downloaded. > yum clean headers > Eliminate all of the header files which yum uses for > dependency resolution. > yum clean metadata > Eliminate all of the files which yum uses to determine the > remote availability of packages. > Using this option will force yum to download all the metadata > the next time it is run. > yum clean dbcache > Eliminate the sqlite cache used for faster access to > metadata. Using this option will force > yum to recreate the cache the next time it is run. > yum clean all > Runs yum clean packages and yum clean headers, yum clean > metadata and yum clean dbcache as > above. > > For question 1, the answer is "no", i think. > > For your questions (2) and (3), the 'yum clean all' command only clean local > cached data. For example, on my computer: > > ls /etc/yum.repos.d/ > rhel-debuginfo.repo rhel.repo > > cat /etc/yum.repos.d/rhel.repo > [rhel.5.i386] > name=rhel.5.i386 > baseurl=http://yum.mysite.test.com/rhel/$releasever/i386 > gpgcheck=0 > > then for the test, edit file /etc/yum.repos.d/rhel.repo > > changing baseurl to an error addres, such as "nobody_know_this_host.com" > > "baseurl=http://nobody_know_this_host.com/rhel/$releasever/i386" > > as you know, it is an invalid url, firstly, let's have a look at that what > are stored in the defaut cache: > > tree /var/cache/yum/ > /var/cache/yum/ > `-- rhel.5.i386 > |-- cachecookie > |-- packages > |-- primary.sqlite > `-- repomd.xml I've got the same result. > we can see all the cache files on local machine. then run command "yum clean > all", and "tree /var/cache/yum/" once again: > tree /var/cache/yum/ > /var/cache/yum/ > `-- rhel.5.i386 > `-- packages Yes, I've got same result, it indeed cleaned the cache. > it is shown that the cached files on local machine were removed when running > 'yum clean all', and no retires for remote yum server exists. > > It is all the process of test for 'yun clean all' > > Defaultly, 'yum clean all' only clean repos which are set up (in the .repo > finle, enabled=1), to clean all repositiyes, you may try command: > yum clean all --enablerepo=* Yes, I tried, no luck. > Back to your problem again, it seems that the problem is caused by the > network or some plugins or other repos. > there are several methods to check it. > > > (1):if the command "zcat repo_path/repodata/primary.xml.gz | grep > new_pkg_name" may output newly-added packages names. > try to download the packages with wget (assuming that the http service is > used to download packages for your yum) such as : Yes, " zcat repo_path/repodata/primary.xml.gz | grep new_pkg_name" did shown all new package names in the private repository machine. Do other machines have primary.xml.gz in cache? It seems only repomd.xml in the local cache. > wget http://you_yum_domain_name/rhel/5Server/x86_64/new_pkg.rpm The firewall only allows port 80 for http, the ftp won't work, but "yum install my_package" works fine, the network should be ok. But will it be the problem? > if it succeds, we are sure that the network is ok. > then run command to check whether it is the fault of options of yum command > (step 2). (or,stopped and check your network). > > > (2) run yum list just to list your own repo. (remember to recover the > baseurl to right address) > yum list --disablerepo=* --enablerepo=your_own_repo.* | grep > new_pkg_name > if it succeds, it's showing that the problem is caused by other repo(s). > try to find the reason. > or it fails, the new packages names still can not be seen, go on to step > 3 No luck, it did not work. > (3) disable all plugins and try yum list or yum search. > > yum list --noplugins | grep pkg_name > or > yum list --noplugins --disablerepo=* --enablerepo=your_repo.* No luck either. > It is all that i can supply for you to resove the problem, good luck to you. > waitting for your response. Really mysterious :-(. Thank you. Kind regards, _______________________________________________ Yum-devel mailing list Yum-devel@lists.baseurl.org http://lists.baseurl.org/mailman/listinfo/yum-devel