Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 148115 - portage-2.1.2_pre1 find command in etc-update broken
Summary: portage-2.1.2_pre1 find command in etc-update broken
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS, REGRESSION
: 148124 (view as bug list)
Depends on:
Blocks: 147007
  Show dependency tree
 
Reported: 2006-09-18 13:39 UTC by tom.ashley
Modified: 2006-09-22 19:25 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
set -x in etc-update (etc-update.trace,10.05 KB, text/plain)
2006-09-18 15:10 UTC, tom.ashley
Details
turn off file name globbing during expansion of ${find_opts} (no_globbing.patch,642 bytes, patch)
2006-09-18 18:03 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tom.ashley 2006-09-18 13:39:19 UTC
emerge --info
-------------------------------------------------------------------------
Portage 2.1.2_pre1 (default-linux/x86/2006.1/desktop, gcc-3.4.6/vanilla, glibc-2.4-r3, 2.6.15-gentoo-r1 i686)
=================================================================
System uname: 2.6.15-gentoo-r1 i686 VIA C3 Ezra
Gentoo Base System version 1.12.5
Last Sync: Mon, 18 Sep 2006 16:50:01 +0000
--snip--
---------------------------------------------------------------------------

when running /usr/sbin/etc-update the 'find' command is erroring
--------------
localhost # etc-update
/var/tmp
/etc /opt/glftpd/etc /opt/glftpd/ftp-data /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/share/X11/xkb /usr/share/config
/etc/env.d /etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/terminfo
Scanning Configuration files...
find: paths must precede expression
Usage: find [-H] [-L] [-P] [path...] [expression]
find: paths must precede expression
Usage: find [-H] [-L] [-P] [path...] [expression]
find: paths must precede expression
Usage: find [-H] [-L] [-P] [path...] [expression]
find: paths must precede expression
Usage: find [-H] [-L] [-P] [path...] [expression]
find: paths must precede expression
Usage: find [-H] [-L] [-P] [path...] [expression]
find: paths must precede expression
Usage: find [-H] [-L] [-P] [path...] [expression]
Exiting: Nothing left to do; exiting. :)
find: paths must precede expression
Usage: find [-H] [-L] [-P] [path...] [expression]
find: paths must precede expression
Usage: find [-H] [-L] [-P] [path...] [expression]
find: paths must precede expression
Usage: find [-H] [-L] [-P] [path...] [expression]
find: paths must precede expression
Usage: find [-H] [-L] [-P] [path...] [expression]
find: paths must precede expression
Usage: find [-H] [-L] [-P] [path...] [expression]
find: paths must precede expression
Usage: find [-H] [-L] [-P] [path...] [expression]
localhost # emerge -av portage
--------------------------------

The above also includes the uncommenting of lines 440-443 and 450-451 in /usr/sbin/etc-update
Comment 1 SpanKY gentoo-dev 2006-09-18 13:43:07 UTC
you didnt say what version of find you actually have
Comment 2 tom.ashley 2006-09-18 13:46:15 UTC
localhost # find --version
GNU find version 4.3.0
Features enabled: D_TYPE O_NOFOLLOW(enabled) LEAF_OPTIMISATION FTS 
Comment 3 Zac Medico gentoo-dev 2006-09-18 13:57:01 UTC
(In reply to comment #0)
> The above also includes the uncommenting of lines 440-443 and 450-451 in
> /usr/sbin/etc-update

Go ahead and comment those lines again and then add 'set -x' at the very top of the file (below #!/bin/bash, of course).  That will give us a trace showing the exact commands that cause the errors.
Comment 4 tom.ashley 2006-09-18 15:10:35 UTC
Created attachment 97367 [details]
set -x in etc-update
Comment 5 SpanKY gentoo-dev 2006-09-18 15:24:07 UTC
yeah, looks like we have misquoting ...

...
+ find_opts='-iname ._cfg????_*'
...
++ find /etc/ -iname ._cfg0000_.bash_logout ._cfg0000_.bash_profile ._cfg0000_.bashrc '!' -name '.*~' '!' -name '.*.bak'
find: paths must precede expression
Usage: find [-H] [-L] [-P] [path...] [expression]
...

# touch /etc/._cfg0000_passwd
# touch /etc/._cfg0000_fstab
# cd /etc
# etc-update 
Scanning Configuration files...
find: paths must precede expression: ._cfg0000_passwd
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|stat|opt] [path...] [expression]
...
Comment 6 Zac Medico gentoo-dev 2006-09-18 18:03:24 UTC
Created attachment 97375 [details, diff]
turn off file name globbing during expansion of ${find_opts}

This is fixed in svn r4476.  If you save this patch as /tmp/no_globbing.patch, then you can apply it as follows:

cd /usr/lib/portage
patch -p0 < /tmp/no_globbing.patch
Comment 7 tom.ashley 2006-09-19 11:41:25 UTC
This patch appears to fix the issue.

Thanks
Comment 8 Zac Medico gentoo-dev 2006-09-19 12:58:52 UTC
*** Bug 148124 has been marked as a duplicate of this bug. ***
Comment 9 Zac Medico gentoo-dev 2006-09-22 19:25:14 UTC
This has been released in 2.1.2_pre1-r1.