Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 197617 - app-doc/repodoc should check for missing values
Summary: app-doc/repodoc should check for missing values
Status: RESOLVED WONTFIX
Alias: None
Product: Doc Translations
Classification: Unclassified
Component: [ES] (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo TreeCleaner Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-31 11:00 UTC by Xavier Neys (RETIRED)
Modified: 2010-07-31 03:07 UTC (History)
4 users (show)

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 Xavier Neys (RETIRED) gentoo-dev 2007-10-31 11:00:29 UTC
See http://www.gentoo.org/doc/es/handbook/handbook-x86.xml?part=1&chap=6#doc_chap_pre7
where the value "profile" is used but is not defined.
Comment 1 Xavier Neys (RETIRED) gentoo-dev 2007-10-31 11:04:08 UTC
French got hit as well:
http://www.gentoo.org/doc/fr/handbook/handbook-x86.xml?part=1&chap=6#doc_chap_pre7
Comment 2 Jose Luis Rivero (yoswink) (RETIRED) gentoo-dev 2007-10-31 11:31:51 UTC
Already fixed in the handbook.

Thanks for the suggestion,  I'll try to implement this in the following days.
Comment 3 Camille Huot (RETIRED) gentoo-dev 2007-10-31 13:32:52 UTC
Fixed in French, thanks for the heads up.
Comment 4 Jose Luis Rivero (yoswink) (RETIRED) gentoo-dev 2008-01-10 12:28:01 UTC
The implementation is not trivial as we need to handle all kind of guidexml conditionals to avoid false positives.

Ferdy and myself are aware of the problem and we are looking the best way to implement it. Probably we'll spend a bit more of time with this. 
Comment 5 Xavier Neys (RETIRED) gentoo-dev 2008-01-10 17:00:25 UTC
(In reply to comment #4)
> The implementation is not trivial as we need to handle all kind of guidexml
> conditionals to avoid false positives.

I know it's not trivial at all.
You need to wade through conditionals & includes.
Doing the test is trivial, knowing on what to apply the test is not.

A debug mode in the XSL might help you with the testing as it's trivial to detect a missing value, but (it can never be easy, can it?) knowing which XML file you need to test for missing values (or even a missing include) is less trivial, e.g. how do know which XML fileS you need to request to test some hb-install-included-section-from-...xml

Comment 6 Xavier Neys (RETIRED) gentoo-dev 2008-01-13 08:37:22 UTC
Missing keys will be reported to STDERR with the current xsl, I did a minor update, a lot easier than to create something else, just throw the doc to gorg:

handbook $ gorg --param full 1 <handbook-x86.xml 1>/dev/null

or when "raid+lvm" is removed from the quick guide:

en $ gorg <gentoo-x86+raid+lvm2-quickinstall.xml 1>/dev/null
Missing value for key raid+lvm
Missing value for key raid+lvm
Missing value for key raid+lvm
Missing value for key raid+lvm
Missing value for key raid+lvm
Missing value for key raid+lvm


Enjoy!
Comment 7 Jose Luis Rivero (yoswink) (RETIRED) gentoo-dev 2008-04-11 21:02:50 UTC
Thanks for the help neysx and sorry about spending too much time on this.

I was playing with some kind of caching systems but, after some time, I found that our xpath parser can be quick enough to check all the files in the repo (looking for includes) in a reasonable time so I leave the caching system for the future.

A first early version is in -9999 but I want to recieve feedback about how it works and how slow it is.

BTW, some of the files in our repo are complaining about missing values:
gorg < handbook-sparc.xml --param full 1 1>/dev/null
Missing value for key /boot
Missing value for key /boot
 
@neysx: do you think it would be very difficult to include the offender file in the error message? Something like: "Missing value for key /boot in file hb-install-system.xml" It could help us to know where the errors come from. I was looking at inserts.xsl but my xsl knowledge is not too poor.
Comment 8 Xavier Neys (RETIRED) gentoo-dev 2008-04-13 08:08:18 UTC
(In reply to comment #7)
> I was playing with some kind of caching systems but, after some time, I found
> that our xpath parser can be quick enough to check all the files in the repo
> (looking for includes) in a reasonable time so I leave the caching system for
> the future.

looking for includes *and* parsing conditionals?

> BTW, some of the files in our repo are complaining about missing values:
> gorg < handbook-sparc.xml --param full 1 1>/dev/null
> Missing value for key /boot
> Missing value for key /boot

<body test="func:keyval('/boot')">

Sparc does not have one on purpose.

> @neysx: do you think it would be very difficult to include the offender file in
> the error message? 

Yes
Comment 9 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-07-31 03:07:28 UTC
removed