Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

duplicating a system & dpkg error [SOLVED]

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
User avatar
ramack
Posts: 499
Joined: 2008-01-28 15:31
Location: Centennial, CO
Has thanked: 6 times

duplicating a system & dpkg error [SOLVED]

#1 Post by ramack »

I am downgrading one of my Sid boxes to Testing. I've finished the install and now duplicating the system for installed packages.

Before I started, to get a list of installed packages

Code: Select all

sudo dpkg --get-selections > package.txt
Now when I try to duplicate the installed packages

Code: Select all

 sudo dpkg --set-selections < package.txt
I receive over 1000 lines with the message:

Code: Select all

dpkg: warning: package not in database at line wxyz
I've searched the web, but haven't found anything as of yet.
I did try

Code: Select all

 dpkg --configure -a
without any effect.

Is this just a diffence between the Sid package database and the Testing database?

Rich
Last edited by ramack on 2012-05-06 02:02, edited 2 times in total.
homemade AMD64, Acer AspireOne 150, Asus eeePC 900, i386; Testing
i386,Dell Vostro 1000 AMD64, Dell Inspiron 1100; Sid
XFCE on all.

emariz
Posts: 2901
Joined: 2008-10-17 07:59

Re: duplicating a system dpkg error

#2 Post by emariz »

How are we supposed to know what is at that line? You are the one who has the package list, why do you not check it and see if it actually is an absent package in Testing?

User avatar
ramack
Posts: 499
Joined: 2008-01-28 15:31
Location: Centennial, CO
Has thanked: 6 times

Re: duplicating a system dpkg error

#3 Post by ramack »

Here's a specific example, and yes it should be in Testing

dpkg: warning: package not in database at line 1118: zip
homemade AMD64, Acer AspireOne 150, Asus eeePC 900, i386; Testing
i386,Dell Vostro 1000 AMD64, Dell Inspiron 1100; Sid
XFCE on all.

emariz
Posts: 2901
Joined: 2008-10-17 07:59

Re: duplicating a system dpkg error

#4 Post by emariz »

What are your sources list? If more than a thousand packages cannot be found, the main area of the archive must be missing.

User avatar
ramack
Posts: 499
Joined: 2008-01-28 15:31
Location: Centennial, CO
Has thanked: 6 times

Re: duplicating a system dpkg error

#5 Post by ramack »

/etc/apt/sources.list

Code: Select all

deb http://ftp.us.debian.org/debian/ testing main contrib non-free
deb-src http://ftp.us.debian.org/debian/ testing main contrib non-free
#deb-src http://security.debian.org/ testing/updates main contrib non-free
#deb http://security.debian.org/ testing/updates main contrib non-free
deb http://download.virtualbox.org/virtualbox/debian squeeze non-free
deb http://www.debian-multimedia.org testing main non-free 
homemade AMD64, Acer AspireOne 150, Asus eeePC 900, i386; Testing
i386,Dell Vostro 1000 AMD64, Dell Inspiron 1100; Sid
XFCE on all.

User avatar
ramack
Posts: 499
Joined: 2008-01-28 15:31
Location: Centennial, CO
Has thanked: 6 times

Re: duplicating a system dpkg error

#6 Post by ramack »

I copied the first few lines of the file created by

Code: Select all

 sudo dpkg --get-selections > package.txt

2mandvd                                         install
2mandvd-data                                    install
a2ps                                            install
accountsservice                                 deinstall
acl                                             install
acpi-support-base                               install
acpid                                           install
acroread-debian-files                           deinstall
adduser                                         install
akonadi-backend-mysql                           install
akonadi-server                                  install
alarm-clock-applet                              install
alien                                           install
alsa-base                                       install
alsa-tools                                      install
alsa-tools-gui                                  deinstall
alsa-utils                                      install
anacron                                         install
ant                                             install
ant-optional                                    install
antlr                                           install
apg                                             deinstall

Code: Select all

sudo dpkg --set-selections < package3.txt 
[sudo] password for ramack: 
dpkg: warning: package not in database at line 1: 2mandvd
dpkg: warning: package not in database at line 1: 2mandvd-data
dpkg: warning: package not in database at line 2: accountsservice
dpkg: warning: package not in database at line 5: acroread-debian-files
dpkg: warning: package not in database at line 6: akonadi-backend-mysql
dpkg: warning: package not in database at line 6: akonadi-server
dpkg: warning: package not in database at line 6: alarm-clock-applet
dpkg: warning: package not in database at line 6: alien
dpkg: warning: package not in database at line 7: alsa-tools
dpkg: warning: package not in database at line 7: alsa-tools-gui
dpkg: warning: package not in database at line 11: antlr
dpkg: warning: package not in database at line 11: apg
12 common packages out of the 22 are reported not to be in the database.
homemade AMD64, Acer AspireOne 150, Asus eeePC 900, i386; Testing
i386,Dell Vostro 1000 AMD64, Dell Inspiron 1100; Sid
XFCE on all.

emariz
Posts: 2901
Joined: 2008-10-17 07:59

Re: duplicating a system dpkg error

#7 Post by emariz »

Did you update the package list (aptitude update) after editing the sources list?

What are the outputs of these two commands?

Code: Select all

apt-cache policy 2mandvd
aptitude --simulate install 2mandvd

User avatar
ramack
Posts: 499
Joined: 2008-01-28 15:31
Location: Centennial, CO
Has thanked: 6 times

Re: duplicating a system dpkg error

#8 Post by ramack »

Yes, the package list was updated. I was also able to individually install the packages that dpkg issued warnings for with apt-get install without errors.

I needed the box working and printing, so I've started restoring an image I made just before the downgrade from Sid to Testing. I'll have to try the downgrade again when I have more time to troubleshoot.
homemade AMD64, Acer AspireOne 150, Asus eeePC 900, i386; Testing
i386,Dell Vostro 1000 AMD64, Dell Inspiron 1100; Sid
XFCE on all.

jackyohh
Posts: 1
Joined: 2012-05-01 18:00

Re: duplicating a system dpkg error

#9 Post by jackyohh »

i ran into the same problem some minutes ago. you have updated the wrong frontend. instead of apt you need to update dselect database via "dselect update". maybe you have to install and configure dselect too.

Code: Select all

apt-get install dselect
#configure repos
dselect access
#update dselect database
dselect update
now there should be less warnings and finally

Code: Select all

apt-get dselect-upgrade

to reinstall/restore packages

User avatar
ramack
Posts: 499
Joined: 2008-01-28 15:31
Location: Centennial, CO
Has thanked: 6 times

Re: duplicating a system dpkg error

#10 Post by ramack »

jackyohh wrote:i ran into the same problem some minutes ago. you have updated the wrong frontend. instead of apt you need to update dselect database via "dselect update". maybe you have to install and configure dselect too.

Code: Select all

apt-get install dselect
#configure repos
dselect access
#update dselect database
dselect update
now there should be less warnings and finally

Code: Select all

apt-get dselect-upgrade

to reinstall/restore packages

Sweet!!! I may wait until this weekend, unless I get ambitious this evening, ha. Is this error the difference between the Sid and Testing dedatabases? And dselect updates the database that dpgk uses? Thanks for the very helpful first post!!!

Rich
homemade AMD64, Acer AspireOne 150, Asus eeePC 900, i386; Testing
i386,Dell Vostro 1000 AMD64, Dell Inspiron 1100; Sid
XFCE on all.

User avatar
ramack
Posts: 499
Joined: 2008-01-28 15:31
Location: Centennial, CO
Has thanked: 6 times

Re: duplicating a system & dpkg error

#11 Post by ramack »

Last night, I decided to try out the code above. Although all looked like it was going well, after all was completed, my package list is still not recognized. I receive the same warnings from dpkg.

Down grading by changing /etc/apt/sources.list and pinning to Testing is looking better.
homemade AMD64, Acer AspireOne 150, Asus eeePC 900, i386; Testing
i386,Dell Vostro 1000 AMD64, Dell Inspiron 1100; Sid
XFCE on all.

User avatar
ramack
Posts: 499
Joined: 2008-01-28 15:31
Location: Centennial, CO
Has thanked: 6 times

Re: duplicating a system & dpkg error

#12 Post by ramack »

Just to review what I have done, am I missing or skipping something obvious?

On Sid box to be downgraded I

Code: Select all

dpkg --get-selections > package.txt
I create a CloneZilla image and with rsync, back up my complete home/username/ directory on a USB drive.

Then I install a fresh copy of Testing on the former Sid box. Once the install is complete, I remove the display manager so I can boot to the CLI. I don't need to but I reboot and login to my daily user.

I initially forgot to add to this post, this step in my process of the downgrade, upon rebooting

Code: Select all

sudo apt-get update
I mount the USB drive that has the backup of /home/username/ and cd into the directory containing package.txt

Here if I

Code: Select all

sudo dpkg --set-selections < package.txt
I receive the dpkg database warnings, ie:

Code: Select all

dpkg: warning: package not in database at line 1: 2mandvd
So as previously suggested I enter the following:

Code: Select all

sudo apt-get install dselect
#configure repos
sudo dselect access
#update dselect database
sudo dselect update
No problems so far, so I continue with

Code: Select all

apt-get dselect-upgrade
Many packages are to be installed( I should have noted which or cut/paste into a file, but didn't).

From this I expected to have most or all the packages from my Sid box now installed on the new Testing box, however many are not. And if I try to set the selections with my Sid generated package list:

Code: Select all

sudo dpkg --set-selections < package.txt
I receive the dpkg database warnings still.

Code: Select all

dpkg: warning: package not in database at line 1: 2mandvd
It is installable with if I:

Code: Select all

sudo apt-get install 2mandvd
I have done this same proceedure by using only the first couple of steps, many times with similar forks, ie Sid to Sid, Testing to Testing and Stable to Stable boxes, but this is the first time with different forks. Am I running into problems because of the dissimaliar forks? From what I've found on the web, this is the suggested and better(?) way to downgrade from one fork to another.

So far, it appears my only option left is to change /etc/apt/sources.list from Sid to Testing and use preferences to pin to Testing.
Last edited by ramack on 2012-05-03 00:35, edited 2 times in total.
homemade AMD64, Acer AspireOne 150, Asus eeePC 900, i386; Testing
i386,Dell Vostro 1000 AMD64, Dell Inspiron 1100; Sid
XFCE on all.

kmathern
Posts: 603
Joined: 2011-02-05 19:20

Re: duplicating a system & dpkg error

#13 Post by kmathern »

I think you need to do the "dpkg --set-selections < package.txt" step and probably run an "apt-get update" before doing the "apt-get dselect-upgrade" step.

So the last couple steps where you're duplicating the other system from the package.txt file would be:

Code: Select all

su -c 'dpkg --set-selections < package.txt'

Code: Select all

su -c 'apt-get update'

Code: Select all

su -c 'apt-get dselect-upgrade'
{I can't stand sudo}

User avatar
ramack
Posts: 499
Joined: 2008-01-28 15:31
Location: Centennial, CO
Has thanked: 6 times

Re: duplicating a system & dpkg error

#14 Post by ramack »

kmathern wrote:I think you need to do the "dpkg --set-selections < package.txt" step and probably run an "apt-get update" before doing the "apt-get dselect-upgrade" step.
I do and receive the dpkg warnings. I also run apt-get update upon rebooting (I forgot to include that step, but have since edited and added the step).
homemade AMD64, Acer AspireOne 150, Asus eeePC 900, i386; Testing
i386,Dell Vostro 1000 AMD64, Dell Inspiron 1100; Sid
XFCE on all.

User avatar
ramack
Posts: 499
Joined: 2008-01-28 15:31
Location: Centennial, CO
Has thanked: 6 times

Re: duplicating a system dpkg error

#15 Post by ramack »

jackyohh wrote:i ran into the same problem some minutes ago.
Have you successfully downgraded? I'm running into the same problems in doing the downgrade from Sid to Testing in my Vbox with Sid installed, trying to downgrade it to Testing.
homemade AMD64, Acer AspireOne 150, Asus eeePC 900, i386; Testing
i386,Dell Vostro 1000 AMD64, Dell Inspiron 1100; Sid
XFCE on all.

User avatar
ramack
Posts: 499
Joined: 2008-01-28 15:31
Location: Centennial, CO
Has thanked: 6 times

Re: duplicating a system & dpkg error

#16 Post by ramack »

I was not able to sucessfully duplicate my system in downgrading by installing a fresh Testing and copying my /home/user. Some conflicts and differences between something that I didn't really ever nail down, but what I ended up doing was changing /etc/apt/sources.list and pinning to Testing. I had a really hard time with cups and my HP printer, but after installing hplip and configuring via hp-setup, the printer worked as expected.

Althought the dpkg error was not solved, I'm marking this thread as solved since my goal was to downgrade from Sid to Testing.

Thanks for all your inputs.

Rich
homemade AMD64, Acer AspireOne 150, Asus eeePC 900, i386; Testing
i386,Dell Vostro 1000 AMD64, Dell Inspiron 1100; Sid
XFCE on all.

rjmx
Posts: 6
Joined: 2007-09-06 00:26
Location: Brockton, Massachusetts, USA

Re: duplicating a system & dpkg error [SOLVED]

#17 Post by rjmx »

Try this:

# Idea cribbed from http://www.debianadmin.com/clone-your-u ... ation.html
# On old box:
# Get a list of installed packages
dpkg --get-selections | sed -e '/\s\+install$/!d' -e 's/\s\+.*//' > selections

# Copy file to new box, then
# Use aptitude to install them
cat selections | xargs aptitude install

noahy
Posts: 1
Joined: 2012-10-26 21:29

Re: duplicating a system & dpkg error [SOLVED]

#18 Post by noahy »

According to the dpkg man page:

You might transfer this file to another computer, and install it there with:
dpkg --clear-selections
dpkg --set-selections <myselections

When running these two commands together, it works. Then dselect, install

zumbi
Posts: 1
Joined: 2014-09-16 20:19

Re: duplicating a system & dpkg error [SOLVED]

#19 Post by zumbi »

One needs to sync available packages, from dctrl-tools package run
sync-available

Reference: https://lists.debian.org/debian-devel/2 ... 00555.html

Post Reply