Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 91159 - etc-update doesn't find files
Summary: etc-update doesn't find files
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All All
: High normal
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2005-05-02 05:48 UTC by Torsten Veller (RETIRED)
Modified: 2005-07-14 06:58 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Torsten Veller (RETIRED) gentoo-dev 2005-05-02 05:48:41 UTC
in 2.0.51.20 etc-update is broken in scan():

- sed -e "s:\(^.*/\)\(._cfg*_\)\(/.*$\):\1\2\3\%\2\%\3:" |
                      ^    ^     ^
+ sed -e "s:\(^.*/\)\(\._cfg[0-9]*_\)\(\.*$\):\1\2\3\%\2\%\3:" |


next i would adjust the locales settings so `cut` doesn't break (from sys-apps/coreutils-5.2.1-r5):
| # echo a%b%c | LANG=POSIX LC_CTYPE=de_DE.UTF-8 cut -f1 -d'%'
| 
| # echo a%b%c | LANG=de_DE.UTF-8 LC_CTYPE=POSIX cut -f1 -d'%'
| a
Comment 1 Jason Stubbs (RETIRED) gentoo-dev 2005-05-02 22:00:41 UTC
This code hasn't changed since etc-update was added to portage in version 2.0.35. Strangely enough, there have been no reports that I'm aware of until now. Did etc-update actually misbehave for you or was it just spotted when looking at the code?
Comment 2 Torsten Veller (RETIRED) gentoo-dev 2005-05-02 23:11:23 UTC
Jason, i found it while investigating this:

[...]
 * IMPORTANT: 1 config files in /etc need updating.
 * Type emerge --help config to learn how to update config files.

# etc-update
Scanning Configuration files...
Exiting: Nothing left to do; exiting. :)


It is a problem with my setup, locale or UTF-8 in general. cut doesn't work correctly (or as expected -- `echo a | cut -f1 -d'%'` returns nothing -- see comment #0).

Why have there been no reports before? Maybe the sorting stuff is not really important? With a correct sed expression the config files are sorted by name and then by cfg_$number. With the unmatching sed expression they are ordered by find output.

As you've already spotted: (/.*$\) -> (\.*$) is wrong. Should be (.*$).
Comment 3 Torsten Veller (RETIRED) gentoo-dev 2005-05-02 23:38:16 UTC
Upgrading to sys-apps/coreutils-5.2.1-r6 fixes the cut problem:

# echo a%b%c | LANG=POSIX LC_CTYPE=de_DE.UTF-8 cut -f1 -d'%'
a
Comment 4 Jason Stubbs (RETIRED) gentoo-dev 2005-05-04 22:09:05 UTC
portage-2.0.51.21-r1
Comment 5 Jason Stubbs (RETIRED) gentoo-dev 2005-07-14 05:47:39 UTC
Fixed on or before 2.0.51.22-r1 
Comment 6 Jason Stubbs (RETIRED) gentoo-dev 2005-07-14 06:58:27 UTC
Looking through the batch of bugs, I'm not sure that some of these are 
actually fixed in stable. Others, the requirements have possibly changed after 
the initial fix was committed. 
 
If you think this bug has been closed incorrectly, please reopen or ask that 
it be reopened.