Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 71265
Alias:
Product:
Component:
Status: RESOLVED
Resolution: WONTFIX
Assigned To: Gentoo Toolchain Maintainers <toolchain@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Simone Gotti (RETIRED) <motaboy@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
fixlafiles.py /usr/lib/portage/bin/fixlafiles.py text/plain Simone Gotti (RETIRED) 2004-11-15 02:43 0000 8.46 KB Details
portage_contents.py-20041114-01.patch portage_contents.py-20041114-01.patch patch Simone Gotti (RETIRED) 2004-11-15 02:44 0000 3.12 KB Details | Diff
fix_libtool_files.sh.patch fix_libtool_files.sh.patch patch Simone Gotti (RETIRED) 2004-11-15 02:44 0000 2.47 KB Details | Diff
fixlafiles.py fixlafiles.py text/plain Simone Gotti (RETIRED) 2004-11-25 16:37 0000 8.96 KB Details
portage_contents.py-20041125-01.patch portage_contents.py-20041125-01.patch patch Simone Gotti (RETIRED) 2004-11-25 16:38 0000 5.86 KB Details | Diff
fix_contents (alternative fix) fix_contents text/plain TGL 2005-04-27 07:03 0000 6.68 KB Details
fixlafiles.awk--fix_CONTENTS.patch (alternative fix) fixlafiles.awk--fix_CONTENTS.patch patch TGL 2005-04-27 07:04 0000 867 bytes Details | Diff
fix_libtool_files.sh.patch fix_libtool_files.sh.patch patch Ryan Hill 2005-05-07 19:51 0000 2.56 KB Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 71265 depends on: Show dependency tree
Bug 71265 blocks: 73435
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2004-11-15 02:42 0000
The program fix_libtool_files.sh and the called one fixlafile.awk have a MAJOR
problem: they change of course the md5 and mtime of the .la files but don't
update the portage database (CONTENTS files). So an "emerge -C foo" won't
remove this changed files and this will bring to an unclean system and problems
with some apps.

To fix this in a cleaner way I did some things:

1) Added a class to portage_contents.py that let you manage CONTENTS file, get
and edit the file properties like md5 and mtime.

2) We needed an "atomic" file update. Every time we change an .la file we have
to updated the CONTENTS file that own that .la file. Doing this at the end of
all the changes is ugly and less functional.
For this reason I had to rewrite fixlafile.awk in python so I can add the
functions provided by portage_contents.sh

3) On Travis Tilley request: removed the need to pass an OLDVER variabile to
fix_libtool_file.sh, now every version that is different from the gcc current
one is updated (this need some testing please).

By now, fix_libtools_file.sh is used again and it'll call
/usr/lib/python/bin/fixlafiles.py, probably it can be removed and fixlafiles.py
can be called directly.

I'll attach the new fixlafile.py, and patched against portage_contents.py and
fix_libtool_files.sh

------- Comment #1 From Simone Gotti (RETIRED) 2004-11-15 02:43:34 0000 -------
Created an attachment (id=43982) [details]
/usr/lib/portage/bin/fixlafiles.py

------- Comment #2 From Simone Gotti (RETIRED) 2004-11-15 02:44:07 0000 -------
Created an attachment (id=43983) [details]
portage_contents.py-20041114-01.patch

------- Comment #3 From Simone Gotti (RETIRED) 2004-11-15 02:44:37 0000 -------
Created an attachment (id=43984) [details]
fix_libtool_files.sh.patch

------- Comment #4 From Simone Gotti (RETIRED) 2004-11-25 16:37:27 0000 -------
Created an attachment (id=44757) [details]
fixlafiles.py

Better script, remove all the bashism, updated the CONTENTS only if the md5 and
mtime registered in the CONTENTS are the same of the file.

------- Comment #5 From Simone Gotti (RETIRED) 2004-11-25 16:38:44 0000 -------
Created an attachment (id=44758) [details]
portage_contents.py-20041125-01.patch

Now the contentsManager class can also act as a dict.
Uses the same CONTENTS parsing used in portage.py.

------- Comment #6 From Simone Gotti (RETIRED) 2004-12-09 07:52:16 0000 -------
*** Bug 64112 has been marked as a duplicate of this bug. ***

------- Comment #7 From Gregorio Guidi (RETIRED) 2004-12-28 03:30:00 0000 -------
*** Bug 75850 has been marked as a duplicate of this bug. ***

------- Comment #8 From Gregorio Guidi (RETIRED) 2004-12-29 11:39:11 0000 -------
*** Bug 75940 has been marked as a duplicate of this bug. ***

------- Comment #9 From SpanKY 2005-01-18 16:30:28 0000 -------
*** Bug 78598 has been marked as a duplicate of this bug. ***

------- Comment #10 From Simone Gotti (RETIRED) 2005-01-26 06:33:05 0000 -------
*** Bug 79051 has been marked as a duplicate of this bug. ***

------- Comment #11 From Gregorio Guidi (RETIRED) 2005-03-07 14:51:13 0000 -------
*** Bug 84440 has been marked as a duplicate of this bug. ***

------- Comment #12 From Carsten Lohrke 2005-03-29 10:36:03 0000 -------
*** Bug 87141 has been marked as a duplicate of this bug. ***

------- Comment #13 From Sven Wegener 2005-04-24 14:56:52 0000 -------
*** Bug 90292 has been marked as a duplicate of this bug. ***

------- Comment #14 From Carsten Lohrke 2005-04-27 06:22:35 0000 -------
*** Bug 90608 has been marked as a duplicate of this bug. ***

------- Comment #15 From TGL 2005-04-27 07:02:29 0000 -------
Oops, sorry for having added to an already long list of duplicates...

Anyway, since i've wrote my own solution now, i will re-attach it here. Don't get me wrong, i don't claim it's better than Simone's one... at the contrary, i can only welcome the idea of some awk to python rewriting :)
But it has the benefit to be non-intrusive, so maybe it could be used as a temporary fix or something like that.

------- Comment #16 From TGL 2005-04-27 07:03:51 0000 -------
Created an attachment (id=57386) [details]
(alternative fix) fix_contents

This is an helper script to update the CONTENTS files.

------- Comment #17 From TGL 2005-04-27 07:04:56 0000 -------
Created an attachment (id=57387) [details]
(alternative fix) fixlafiles.awk--fix_CONTENTS.patch

And this is a small patch for the awk code to call it.

------- Comment #18 From Jason Stubbs (RETIRED) 2005-04-28 21:44:42 0000 -------
$ grep /lib/rcscripts/awk/fixlafiles.awk /var/db/pkg/*/*/CONTENTS
/var/db/pkg/sys-devel/gcc-3.4.3.20050110-r2/CONTENTS:obj /lib/rcscripts/awk/fixlafiles.awk c8fd3851ccee57651e43cac458dba7c1 1113754816

Why is this assigned directly to portage?

Toolchain, can these scripts be verified please?

------- Comment #19 From Ryan Hill 2005-05-07 19:51:28 0000 -------
Created an attachment (id=58311) [details]
fix_libtool_files.sh.patch

original patch bit-rotted.

------- Comment #20 From Markus Tacker 2005-06-02 04:18:04 0000 -------
*** Bug 93306 has been marked as a duplicate of this bug. ***

------- Comment #21 From Carsten Lohrke 2005-09-01 15:42:34 0000 -------
*** Bug 104443 has been marked as a duplicate of this bug. ***

------- Comment #22 From Carsten Lohrke 2005-11-20 07:33:26 0000 -------
This is really a problem for users dealing with stale files, resulting e.g. in 


grep /usr/lib/libfoo.la: No such file or directory
/bin/sed: can't read /usr/lib/libfoo.la: No such file or directory
libtool: link: `/usr/lib/libfoo.la` is not a valid libtool archive. 


errors. This bug is now open for over a year, what holds us back to fix this?

------- Comment #23 From Ryan Hill 2005-11-26 19:56:26 0000 -------
if this isn't getting looked at, could we at least get the current
fix_libtool_files.sh to not touch mtimes or update the portage db with new
mtimes & checksums? (bug #78597, bug #90292, and bug #87141)

------- Comment #24 From Ryan Hill 2005-11-26 19:57:50 0000 -------
(In reply to comment #23)

> mtimes & checksums? (bug #78597, bug #90292, and bug #87141)

er, bug #78598 that is.


------- Comment #25 From Mark Loeser 2005-12-15 00:53:22 0000 -------
What we do here is going to depend on what we decide with regards to bug #90744

------- Comment #26 From SpanKY 2006-02-19 15:19:13 0000 -------
we're getting rid of this stuff

------- Comment #27 From SpanKY 2006-03-04 20:17:16 0000 -------
*** Bug 124980 has been marked as a duplicate of this bug. ***

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug