[Yum] [rfe] yum-arch force create headers,headers/headers.info on empty dir

Troy Dawson dawson at fnal.gov
Fri Apr 25 13:04:42 UTC 2003


Hi,
We've ran into this problem as well, but found that changing our scripts fixed 
the problem, as well as gave us a double check ... well ... at least if solved 
the problem.
We didn't worry about it because I can see lots of times where I accidently 
point yum-arch at the wrong directory, and if it automatically made a 
'headers' directory and a header.info, that might accidently mess something 
up, or at least leave clutter.
But if Seth want's to put a force option on, that would be fine with me.
Incase you were wondering, for our automated yum-arch's this is a snip from 
the script that we use.

         /usr/sbin/yum-arch -z $THISPATH > /dev/null 2>&1
         if [ $? -ne 0 ] ; then
                 if [ -s $THISPATH/headers/header.info ] ; then
                         rm -rf $THISPATH/headers
                 fi
                 mkdir $THISPATH/headers > /dev/null 2>&1
                 touch $THISPATH/headers/header.info > /dev/null 2>&1
         fi

it works pretty well.
That little part about about removing everything is because the area that we 
are working on is maintained by a wide variety of people, and we found out 
that when they remove all their rpm's, then it didn't get cleared out.  So you 
might want to take that out if it worries you.

Troy

nathan r. hruby wrote:
> Hi!
> 
> I'm new here, and have just started using YUM.  
> 
> We encountereed a problem recently where the RHL9 updates/en/os/noarch 
> directory was empty, thus yum-arch did not create any headers in that 
> directory when run.  This causes yum to fail before updating if the empty 
> directory is listed in a user yum.conf file making for unhappy users.
> 
> I emailed Seth about it and he asked me to file the below RFE in bugzilla.  
> I though that this might intrest the list as well, so I'm appending a copy 
> of the bug for comments by y'all.
> 
> Thanks! 
> 
> -n
> 
> ---- BEGIN BUG: http://devel.linux.duke.edu/bugzilla/show_bug.cgi?id=19
> Bug 19 - yum-arch force create headers,headers/headers.info on empty dir
> Bug#: 19 
> Product: yum 
> Version: unspecified 
> Platform: x86
> OS/Version: Linux 
> Status: NEW 
> Severity: enhancement 
> Priority: P2
> Resolution:  
> Assigned To: skvidal at phy.duke.edu 
> Reported By: nathan at drama.uga.edu
> Component: Yum
> URL: 
> Summary: yum-arch force create headers,headers/headers.info on empty dir
> Description:
> 
> This is an RFE.
> 
> It would be nice to have a "force creation of headers/ and headers.info
> even if directory is empty" option as currently yum-arch doesn't do this,
> which causes clients pointed at that empty repository to bail out early,
> claiming it can't get the headers.
> 
> Ideally, this feature would be enabled with a run-time switch to force
> creation of said directories and exit with a normal exit code (this makes
> it easier for when scripting yum-arch while preventing accidental
> directory creation if this were the default behavior). If the flag is not
> present yum-arch should not take any action (the current behavior) and
> exit with a exit code that indicates "I didn't do anything becasue the
> directory was empty" (new).
> 
> In reality, either one of these options would be sufficent for dealing 
> repositories that are empty, but need to remain valid for clients.
> 
> -n
> --- END BUG

-- 
__________________________________________________
Troy Dawson  dawson at fnal.gov  (630)840-6468
Fermilab  ComputingDivision/OSS  CSI Group
__________________________________________________




More information about the Yum mailing list