Bug 63274

Summary: lftp (2.1.5) exclude options match too loosly
Product: [Retired] Red Hat Linux Reporter: chrism
Component: lftpAssignee: Jason Vas Dias <jvdias>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-08-24 19:35:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description chrism 2002-04-11 21:08:13 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020311

Description of problem:
-x exclude options in lftp's mirror subcommand seem to match more loosly than
would be expected.  Using lftp to mirror redhat's updates
(ftp.redhat.com/pub/redhat/linux/updates/) the -x option matched too loosely and
cause some packages to be missed during the mirror.  I had -x .nfs* as one of my
exclude options and it cause at least 7 files to be skipped as a result.

(* is used below to omit version numbers not be inclusive of packages)
The packages skipped were:
printconf-*src.rpm
redhat-config-network-*-src.rpm
Xconfigurator*.i386.rpm
nfs-utils-*.i386.rpm
printconf-*.i386.rpm
printconf-gui.i386.rpm
xemacs-info-*.i386.rpm
printconf-*.ia64.rpm
printconf-gui-*.ia64.rpm
redhat-config-network-*.noarch.rpm

lftp script is as follows:
/usr/bin/lftp <<CONF
open ftp.redhat.com
lcd /app/mirrors/redhat/7.2/updates/os
cd /pub/redhat/linux/updates/7.2/en/os
mirror -e -x .nfs*
CONF

I found this problem with lftp on a 6.2 box, but it was verified by someone else
on a 7.2 box as well.


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. create appropriate directories referenced in above script
2. create and run the above shell script
3. check for existance of the above listed packages (Xconfigurator, etc)
	


Actual Results:  it will mirror 90% of the data there, but it will leave out the
listed packages and possible others.

Expected Results:  should have mirrored all the packages in that directory
including the listed ones.

Additional info:

lftp version: 2.1.5

it appears that it's match is too loose, like it's matching the n or the f or s.
 Or something similar.

it is worked around by quoting the arguement to the mirror comamnd
...
mirror -e -x '.nfs*' 
...

Comment 1 Brian Brock 2002-04-11 21:10:05 UTC
behavior confirmed in 7.2 x86 (lftp-2.4.0-2).

Comment 2 Jason Vas Dias 2004-08-24 19:35:14 UTC
Just clearing out old bugs here .
The latest version of lftp is 3.0.6 and I have confirmed that its
mirror -x RE and mirror -X GLOB commands work OK.
This bug could have resulted from some confusion about -x option:
The -x option expects an extented regular expression as in egrep(1),
so .nfs* matches any character followed by 'nf' followed by a 
(perhaps empty) sequence of 's' chars, so the following all match:
  onf
  inf 
etc.
lftp now provides the mirror -X glob option so '-X *.nfs*' would 
do what I think you were expecting here.