LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-04-2018, 04:21 PM   #1
rohitchauhan
Member
 
Registered: Nov 2010
Distribution: RedHat
Posts: 97

Rep: Reputation: Disabled
How to stop createrepo command to consider recursive directories ?


Hi all,

I recently came across a situation which I never noticed before.

The requirement is simple, just create a the repo using createrepo command.
It is actually working fine but taking huge amount of time. Upon investigating I found out that there are multiple recursive directories in which i am running the createrepo command and therefore, while creating the repo, it is going into each directory, picking all the packages available from there also and thus taking high amount of time to complete the process.

Meaning:
Directory structure:
/packages/RHEL7/*.rpm - 40K packages
/packages/RHEL7/cachedir1/*.rpm - 40K packages
/packages/RHEL7/cachedir2/*.rpm - 40K packages

I am running createrepo command in /packages/RHEL7/ directory and it is going into recursive mode and that is the problem.

My only requirement is to create the repo of the RPMs available into the parent directory only, not the packages available in the inner directories.

Is there any solution to this ?

Thanks in advance.
 
Old 12-04-2018, 05:03 PM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,783

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
Include "-x 'cachedir*/*'" (without the outer quotes) in the command line. Note that the wildcards must be quoted so that createrepo and not the shell will do the expansion.
 
1 members found this post helpful.
Old 12-05-2018, 06:22 AM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,716

Rep: Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972
Quote:
Originally Posted by rohitchauhan View Post
Hi all,
I recently came across a situation which I never noticed before.

The requirement is simple, just create a the repo using createrepo command. It is actually working fine but taking huge amount of time. Upon investigating I found out that there are multiple recursive directories in which i am running the createrepo command and therefore, while creating the repo, it is going into each directory, picking all the packages available from there also and thus taking high amount of time to complete the process.

Meaning:
Directory structure:
/packages/RHEL7/*.rpm - 40K packages
/packages/RHEL7/cachedir1/*.rpm - 40K packages
/packages/RHEL7/cachedir2/*.rpm - 40K packages

I am running createrepo command in /packages/RHEL7/ directory and it is going into recursive mode and that is the problem. My only requirement is to create the repo of the RPMs available into the parent directory only, not the packages available in the inner directories. Is there any solution to this ?
Have you looked in Red Hat's knowledgebase (you can access it if you're PAYING for RHEL...are you???), where they have such things documented?? Because you've asked about patching/satellite and such things FIVE YEARS ago: https://www.linuxquestions.org/quest...ro-4175455486/

...and had more than 2 1/2 years of professional Linux administrator experience four years ago: https://www.linuxquestions.org/quest...ux-4175522551/

rknichols gave good advice. Did you try any of the solutions offered in the RHEL knowlegebase also, or in the documentation??
 
Old 12-08-2018, 02:19 PM   #4
rohitchauhan
Member
 
Registered: Nov 2010
Distribution: RedHat
Posts: 97

Original Poster
Rep: Reputation: Disabled
Hi rknichols,

It worked. Thanks a lot.
Appriciate it.

Thanks,
RC
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why i m not being able to create repository using createrepo command in yum? sunilchand Linux - Newbie 5 02-13-2017 01:05 AM
createrepo command clarifications requested - CentOS 5.5 V1.7 maxlambert01 Linux - Distributions 1 01-09-2014 06:59 PM
createrepo command?! linbux Fedora 5 11-24-2010 05:59 AM
I am not able to execute createrepo command AnaghaR Linux - Software 7 06-01-2009 12:45 AM
non Recursive query and Recursive query prashsharma Linux - Server 1 06-27-2007 09:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration