Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg ugprade -F left database in broken state #1285

Closed
uqs opened this issue Jul 8, 2015 · 2 comments
Closed

pkg ugprade -F left database in broken state #1285

uqs opened this issue Jul 8, 2015 · 2 comments

Comments

@uqs
Copy link
Member

uqs commented Jul 8, 2015

This is mostly from memory, I might have forgotten some steps that I did, but what I remember:

  • I ran pkg upgrade, there was a long list, I aborted
  • I ran pkg upgrade -F and confirmed the download of all packages, they were downloaded
  • two days pass
  • I run pkg upgrade and it says there's nothing to be done:

root@coyote:# pkg --version
1.5.4
root@coyote:
# pkg upgrade
Updating acme repository catalogue...
acme repository is up-to-date.
All repositories are up-to-date.
Checking for upgrades (67 candidates): 100%
Processing candidates (67 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.

So let's try brute forcing this:

root@coyote:~# pkg install pkg info -aqo
Updating acme repository catalogue...
acme repository is up-to-date.
All repositories are up-to-date.
databases/db48 has no direct installation candidates, change it to db5? [Y/n]: Y
Assertion failed: (0), function pkg_jobs_try_remote_candidate, file
pkg_jobs.c, line 821.
Child process pid=60776 terminated abnormally: Abort trap
Exit 250

Using more force:

root@coyote:~# pkg upgrade -f db48
Updating acme repository catalogue...
acme repository is up-to-date.
All repositories are up-to-date.
db48 has no direct installation candidates, change it to db5? [Y/n]: y
pkg: sqlite error while executing UPDATE packages SET name=?1 WHERE
name=?2; in file pkg_jobs.c:1658: UNIQUE constraint failed:
packages.name
The following 1 package(s) will be affected (of 0 checked):

Installed packages to be UPGRADED:
db5: 4.8.30.0_2 -> 5.3.28_2

The process will require 37 MiB more space.
12 MiB to be downloaded.

Proceed with this action? [y/N]: y
Fetching db5-5.3.28_2.txz: 100% 12 MiB 6.4MB/s 00:02
Checking integrity...Assertion failed: (strcmp(uid, p->uid) != 0),
function pkg_conflicts_check_local_path, file pkg_jobs_conflicts.c,
line 368.
Child process pid=60922 terminated abnormally: Abort trap
Exit 250

the -debug output has nothing of interest that I can see.

pkg.txz is here:
https://drive.google.com/file/d/0B5xunOWhsIRfWDJCLXRORHpWTV9fb1otMkxKUzVtUVFrYzFv/view?usp=sharing

@uqs
Copy link
Member Author

uqs commented Jul 8, 2015

As per suggestion, I've now tried pkg upgrade -f (after I deleted some packages where it no longer found a candidate to update from/to, the list was rather short, luckily).

A pkg upgrade -f then reinstalled everything and things are looking somewhat normal again.

@bapt
Copy link
Member

bapt commented Nov 12, 2016

fixed

@bapt bapt closed this as completed Nov 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants