Results 1 to 5 of 5

Thread: lftp -c mirror --exclude-glob="**/00Archived/**" downloading unexpected directory

  1. #1
    Join Date
    Jan 2018
    Location
    Annandale, VA
    Posts
    143

    Default lftp -c mirror --exclude-glob="**/00Archived/**" downloading unexpected directory

    The command below is downloading a 00Archived directory despite the --exclude-glob="**/00Archived/**" option.
    Code:
    lftp -c mirror --only-newer --verbose=3 --include-glob="*.rpm" --exclude-glob="**/00Archived/**" --exclude-glob="**/archived/**" --exclude-glob="**/debuginfo/**" --exclude-glob="**/debugsource/**" --exclude-glob="**/SRPMS/**" --exclude-glob="*-debug-*" --exclude-glob="*-debuginfo-*" --exclude-glob="*-debugsource-*" --exclude-glob="*.src.rpm" http://rpm.netlabs.org/release "/run/media/root/DFS1JFS64/Vendors/Netlabs/Netlabsrepo"
    Code:
    Mirroring directory `00Archived'
    Making directory `00Archived'
    Mirroring directory `00Archived/i386'
    Making directory `00Archived/i386'
    Transferring file `00Archived/i386/ash-0.0.0-10.oc00.i386.rpm'
    Last edited by shmuelmetz; 15-Oct-2019 at 16:05. Reason: Request e-mail notification

  2. #2
    Join Date
    Sep 2012
    Posts
    5,185

    Default Re: lftp -c mirror --exclude-glob="**/00Archived/**" downloading unexpected directory

    Quote Originally Posted by shmuelmetz View Post
    The command below is downloading a 00Archived directory despite the --exclude-glob="**/00Archived/**" option.
    lftp checks final pathname component so this pattern cannot match. "--exclude-glob=00Archived/" should work.

    P.S. I wonder why you stubbornly continue to put "**" everywhere even though it has absolutely no significance in glob pattern and just makes the whole command less comprehensible (pretending it does something that it actually does not).

  3. #3
    Join Date
    Jan 2018
    Location
    Annandale, VA
    Posts
    143

    Default Re: lftp -c mirror --exclude-glob="**/00Archived/**" downloading unexpected directory

    Quote Originally Posted by arvidjaar View Post
    lftp checks final pathname component so this pattern cannot match. "--exclude-glob=00Archived/" should work.

    P.S. I wonder why you stubbornly continue to put "**" everywhere even though it has absolutely no significance in glob pattern and just makes the whole command less comprehensible (pretending it does something that it actually does not).
    Because I'm still learning lftp, the man page is rather sketchy and I may be confusing the semantics of lftp with those of rsync or wget.

  4. #4
    Join Date
    Sep 2012
    Posts
    5,185

    Default Re: lftp -c mirror --exclude-glob="**/00Archived/**" downloading unexpected directory

    Quote Originally Posted by shmuelmetz View Post
    I may be confusing the semantics of lftp with those of rsync or wget.
    wget is using normal globbing, so '**' has no significance either. The only program that interprets '**' (or '***') specially is rsync and there it is also explicitly documented.

  5. #5
    Join Date
    Jan 2018
    Location
    Annandale, VA
    Posts
    143

    Default Re: lftp -c mirror --exclude-glob="**/00Archived/**" downloading unexpected directory

    Quote Originally Posted by arvidjaar View Post
    wget is using normal globbing, so '**' has no significance either. The only program that interprets '**' (or '***') specially is rsync and there it is also explicitly documented.
    This seems to work
    Code:
    lftp -c mirror --only-newer --verbose=3 --include-glob="*.rpm" --exclude-glob=00Archived/ --exclude-glob=archived/ --exclude-glob=debuginfo/ --exclude-glob=debugsource/ --exclude-glob=SRPMS/ --exclude-glob="*-debug-*" --exclude-glob="*-debuginfo-*" --exclude-glob="*-debugsource-*" --exclude-glob="*.src.rpm" http://repos.arcanoae.com/release "/run/media/root/DFS1JFS64/Vendors/ArcaNoae/repos/ArcaOS"/
    Is the correct equivalent for wget
    Code:
    wget --mirror --cut-dirs=0 -e robots=off --no-host-directories --no-parent --recursive --accept rpm -X 00Archived/ -X archived/ -X debuginfo -X debugsource --reject "*-debug*" -X SRPMS/ --reject src.rpm --directory-prefix="/run/media/root/DFS1JFS64/Vendors/ArcaNoae/repos/ArcaOS" -N http://repos.arcanoae.com/release/

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •