Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 485226

Summary: portage writes invalid /var/db/pkg/*/*/CONTENTS when symlinks contain linebreaks
Product: Portage Development Reporter: Torsten Kaiser <Storklerk>
Component: CoreAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal CC: kernel
Priority: Normal Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 484436    

Description Torsten Kaiser 2013-09-17 18:16:22 UTC
Calculating dependencies  !!! Parse error in '/var/db/pkg/sys-kernel/git-sources-3.12_rc1/CONTENTS'
!!!   line 47480: Unrecognized CONTENTS entry
!!!   line 47481: Unrecognized CONTENTS entry                                                                                                                       ... done!

The last lines of that CONTENTS are:

sym /usr/src/linux-3.12-rc1/arch/arm/boot/dts/include/dt-bindings -> ../../../../../include/dt-bindings 1378154770
sym /usr/src/linux-3.12-rc1/arch/mips/boot/dts/include/dt-bindings -> ../../../../../include/dt-bindings
 1379438418
(If bugzilla changes the layout: The arm symlink is correctly all in one line, while the timestamp of the mips symlink gets put onto the next line)

The source of this problem is, that Linus somehow managed to get a linebreak at the end of that symlink target. Which is wrong because it breaks that link, but portage should either reject the merging of such a link or not corrupt its database.

Just installing =sys-kernel/git-sources-3.12_rc1 should be enough to reproduce this bug.
Comment 2 Zac Medico gentoo-dev 2013-09-23 21:18:20 UTC
This is fixed in 2.2.7.