Bug 1172912

Summary: bbdb database migrate from v6 to v7 fails on databases with only two ;; on the version line
Product: [Fedora] Fedora Reporter: John Heidemann <johnh>
Component: emacs-bbdbAssignee: Göran Uddeborg <goeran>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 21CC: goeran
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: emacs-bbdb-3.1.2-2.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-12-25 05:33:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
be more forgiving on the version update none

Description John Heidemann 2014-12-11 04:49:38 UTC
Created attachment 967052 [details]
be more forgiving on the version update

Description of problem:
emacs-bbdb-3.1.2-1.fc21 will automatically upgrade the bbdb database
from format 6 to 7 on startup.
However, if the format line in the file looks like:

;; file-format: 6

instead of what it expects, 3 semi-colons:

;;; file-format: 6

Then it will upgrade the database contents but not change the version number.

Hilarity ensues, with bbdb failing  on the first record when it next starts.


Version-Release number of selected component (if applicable):
emacs-bbdb-3.1.2-1.fc21

How reproducible:
every time

Steps to Reproduce:
1. start with a version 6 database file with only two semicolons on the version line
2. start emacs
3. exit emacs, saving the databse.
4. restart emacs
5. inovke bbdb (M-x bbdb-search-name or something similar)


Actual results:

Error message on reload.  
   wrong type arguement: sequencp,
on the first record

Expected results:
no errors


Additional info:
It's possible I manually removed the 3rd semi-colon.  Hard to say since the database is many years old.


Patch to fix will be provided.

Comment 1 John Heidemann 2014-12-11 23:26:52 UTC
(Btw, I have sent this upstream to the current FSF maintainer as well.)

Comment 2 John Heidemann 2014-12-12 17:28:31 UTC
I am told that upstream will pick up this patch.

Comment 3 Göran Uddeborg 2014-12-14 22:57:27 UTC
Excellent bug reports!  Clear bug description, patch, and upstreams report, all provided. :-)

I'm building new rawhide packages right now.  It's getting late in my timezone though, so I'll do the F21 ones tomorrow.

Comment 4 Fedora Update System 2014-12-15 09:25:15 UTC
emacs-bbdb-3.1.2-2.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/emacs-bbdb-3.1.2-2.fc21

Comment 5 Fedora Update System 2014-12-17 04:45:15 UTC
Package emacs-bbdb-3.1.2-2.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing emacs-bbdb-3.1.2-2.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-17080/emacs-bbdb-3.1.2-2.fc21
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2014-12-25 05:33:56 UTC
emacs-bbdb-3.1.2-2.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.