----- Original Message -----
From: "Steve Gordon" <sgordon(a)redhat.com>
To: "For participants of the Documentation Project"
<docs(a)lists.fedoraproject.org>
Sent: Monday, February 6, 2012 10:10:41 AM
Subject: Re: How to deal with bogus entry in DB?
----- Original Message -----
> From: "alick" <alick9188(a)gmail.com>
> To: "For participants of the Documentation Project"
> <docs(a)lists.fedoraproject.org>
> Sent: Saturday, February 4, 2012 9:40:34 AM
> Subject: How to deal with bogus entry in DB?
>
> Hi docs folks,
>
> I think I have got a tough jouney to publish zh-CN translation of
> install guide.
>
> In the install-guide working directory, I want to install the book
> and
> get these error messages:
>
> (f16>)$ publican install_book --site_config ../web/homepage.cfg
> --lang
> zh-CN
>
> DEBUG: Publican: config loaded
> ERROR: bogus entry found in DB:
> zh-TW/Fedora/12/pdf/Installation_Quick_Start_Guide
> ERROR: bogus entry found in DB:
> zh-TW/Fedora/12/pdf/Virtualization_Guide
>
> Then I cd to my local copy of website dir, look into the directory
> `publish_html/zh-TW/Fedora/12/`. No pdf subdirectory there indeed,
> let
> alone the two guide mentioned in the error messages.
>
> I think the fedoradocs.db might need manual fix, so I create a
> 'fix-db'
> branch, and manually delete bogus entries in the db:
>
> (fix-db)$ sqlite3 fedoradocs.db
> SQLite version 3.7.7.1 2011-06-28 17:39:05
> Enter ".help" for instructions
> Enter SQL statements terminated with a ";"
> sqlite> select * from books where language = 'zh-TW' and version
> =
> 12
> and format = 'pdf' ;
> sqlite> delete from books where language = 'zh-TW' and version =
> 12
> and format = 'pdf' ;
> sqlite> .exit
>
> After that, a rerun of publican install_book seems fine.
>
> So am I right of the manual operation? I have skimmed the list
> archives
> and find the similar error reported and later fixed. But I don't
> know
> how it was fixed.
In my experience when you start getting the 'bogus entry' messages
from publican the only way around it is as you say, to check that
the entries in question definitely don't exist on the filesystem and
then manually remove them from the database.
Steve
Oh, I should say though - normally you should still be able to use publican to do the
delete rather than opening up sqlite itself:
publican update_db --del --lang="zh-TW" --version="12"
--formats="pdf"
Normally I would recommend being more specific using the --name and/or --product
arguments, but the above is equivalent to what you did in sqlite.
sTEVE