import/export installed packages list

Bug #162185 reported by nitrofurano
6
Affects Status Importance Assigned to Milestone
synaptic (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: synaptic

A feature would allow offline computers being package-syncronized without any further effort

From one computer, we export the installed packages list as a .txt file. On another we
import this list, and so Synaptic would ask for the .deb CDs or FTPs, just like we did
'Mark for Installation' - the goal is this list import would simplify having to read
this .txt file and do 'Mark for Installation' one by one instead. A remarkable feature
implement!

Btw, is the file '/var/backups/dpkg.status.0' or '/var/lib/dpkg/status' the one tells which are the installed packages? (which one do Synaptic uses? maybe there are some more accuraced file?)

Just guess a situation we ask some friend in another place of the world, by mail, asking
which packages is he/she having installed, and so we can have the same packages installed in
our computer - or some situation you may need to reinstall Ubuntu, or even you bought a new
computer and don't want to loose time for seeking all packages you have installed on the older
computer, and don't want to install all of the 23000 packages of the repository...

Revision history for this message
Andrew Frank (frank-geoinfo) wrote :

the menu items in synaptic 'generate package download script' seems to indicate that this would accomplish the above task. (the task is important, it is necessary any time one reinstalls ubuntu ).
i later understand that the menu 'generate package download script' requires the packages to be marked.

suggestion: either introduce a new menu item 'generate package download script for all installed packages' or provide a method to mark the installed packages and then the script can be produced.

thank you!

andrew

Revision history for this message
Tree MendUs (tree-mendus-deactivatedaccount) wrote :

This is still a bug as per Mon 18 Aug 2008 in Feisty.

I marked all installed packages for "reinstallation".
This then allowed the script generator to work.

But the script that it generated looked like ;

"
#!/bin/sh
wget -c
wget -c
wget -c
wget -c
wget -c
wget -c
wget -c
wget -c
wget -c
wget -c
"
[etc .....]

This doesn't look like it would install any package.

So that makes two problems.
1) Script generator needs a quirky work-around user manually input-ed procedure to work,
and
2) even then it doesn't work properly.

Note :
See an equivalent (but more successful) function for debian's dpkg at ;
http://ubuntuforums.org/showthread.php?t=261366

Revision history for this message
Paul Gevers (paul-climbing) wrote :

As mentioned in bug #33065 (and just confirmed by me) this requested feature is included in Synaptic, but under a different menu item.
Procedure:
In Status grouping select "Installed" packages
Select all packages (Ctrl-A)
In menu File -> Save Markings
In the pop-up be sure do select the tick-box next to "Save full state, not only changes", then save.

Done, import via File -> Read Markings

Could you please confirm that this procedure works for you?

Revision history for this message
Yahya (mfyahya) wrote :

Until this bug is resolved, this bash command line can be used to download the .deb files corresponding to installed packages:

dpkg --get-selections | awk '{ print $1};' | while read package; do apt-cache show "$package"| wget -c 'http://ae.archive.ubuntu.com/ubuntu/'`sed -ne '/^Filename/s/^Filename: //p'`; done

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.