seduction
 Language:
Welcome, Guest. Please login or register.
Did you miss your activation email?
2019/12/15, 17:32:56


Help

Author [EN] [PL] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: (solved) how did I mess up my database of installed packages?  (Read 1122 times)

0 Members and 1 Guest are viewing this topic.

Offline michaa7

  • User
  • Posts: 2.126
I am confused:

my default system (on sdb1) and my experimental system (on sdc1) share the partition with the debian packages archiv on sda8 which is mounted on /var/cache/apt/archives depending on which system is booted. This is how I did it all the years.

Now, yesterday I d-u_ed my experimental system without problems. Today, while my default system is runing, I simulated a d-u. I expected about 1 GB of new packages. But to my surprise it seems apt uses the database of the updated sdc1 system, not sdb1. The d-u would be about 100MB only. Nothing removed. On my experimental system digikam got removed. Here on sdb1 digikam is still usuable,  but apt shows:
Quote
# apt-cache policy digikam
digikam:
  Installiert:           (keine)
  Installationskandidat: 4:4.4.0-1.1+b2
  Versionstabelle:
     4:4.4.0-1.1+b2 0
        500 http://httpredir.debian.org/debian/ unstable/main amd64 Packages
        100 /var/lib/dpkg/status
     4:2.6.0-1+deb7u1 0
        500 http://http.debian.net/debian/ wheezy/main amd64 Packages
which is wrong, obviously.

I am confused about what I did wrong.
« Last Edit: 2015/09/12, 13:52:29 by michaa7 »
Ok, you can't code, but you still might be able to write a bug report for Debian's sake

Offline michaa7

  • User
  • Posts: 2.126
Re: how did I mess up my database of installed packages?
« Reply #1 on: 2015/09/12, 12:30:17 »
ok, understood.

Both systems not only share sda8 on /var/cache/apt/archives. /var itself is a partition on its own, which I forgott about. I did this to be sure to keep my emails on my lokal mailserver in case I installed a new system.

Now I didn't pay attentention to this fact when I configured my experimental system. When I copied and edited the fstab I forgott about it. Therefore /var/cache/apt/pkgcache.bin  was shared, too.  >:(

So the problem and the reason for it is understood.

Consequenzes:

1)
My experimental system will become my default system, forcibly, because it is the only system with a valid package database. Thanks to god or the Debian maintainers, the d-u went well. I have to live with the fact that digikam will be uninstallable for a while.

2)
Is there a way to recreate the database for my old default system? It's now ready for experiments (after editing the fstab and unmount /var).

shit happens ...
« Last Edit: 2015/09/12, 12:35:48 by michaa7 »
Ok, you can't code, but you still might be able to write a bug report for Debian's sake

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 1.934
    • Land of the Buckeye
I don't know how you could read your installed package list and then make a database for apt.  But, if you know the approximate date of your last d-u on that system, you could set it to the debian archive repo for that date, and you could come close to a match.
Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO, 2@WD1003FZEX in BTRFS

Offline musca

  • Global Moderator
  • User
  • *****
  • Posts: 725
  • sid, fly high!
dibl, you meant http://snapshot.debian.org/ , didn't you?
„Es irrt der Mensch, solang er strebt.“  (Goethe, Faust)

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 1.934
    • Land of the Buckeye
dibl, you meant http://snapshot.debian.org/ , didn't you?


Yes, sorry that is exactly what I meant.  Thanks!
Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO, 2@WD1003FZEX in BTRFS

Offline michaa7

  • User
  • Posts: 2.126
The problem seem to be the files in /var/lib/dpkg/*, specially the status file which can't be recreated easily. Whereas the pkgcache.bin and srcpkgcache.bin could be deleted any time you want.

In this regard live would be much easier if there would be really some old status files, too. The status-old file isn't *old*, it is a duplicate of the current status file and presumably is a fallback file in case the status file gets currupted during an update.

So I give up on this system but keep it alive as is as long as digikam isn't installable on my new system.

Thanks for your suggestions.
Ok, you can't code, but you still might be able to write a bug report for Debian's sake

Offline ralul

  • User
  • Posts: 1.809
Yes, you cannot mix /var/lib/dpkg/
using two installations on that directory :(
Time to learn debootstrap to install on another partition!
experiencing siduction runs better than my gentoo makes me know I know nothing

Offline michaa7

  • User
  • Posts: 2.126
I don't know how you could read your installed package list and then make a database for apt.  But, if you know the approximate date of your last d-u on that system, you could set it to the debian archive repo for that date, and you could come close to a match.
Although I gave up on this system, out of curiosity, how is this supposed to work?

I set my debian.list to
Quote
#snapshot
deb http://http://snapshot.debian.org/archive/debian/20150731/ unstable main contrib non-free
and disabled all other repos. D-u then wants to install one new package, nothing else.
« Last Edit: 2015/09/13, 11:27:47 by michaa7 »
Ok, you can't code, but you still might be able to write a bug report for Debian's sake