You are not logged in.

#1 2008-10-04 15:35:43

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 1,946
Website

Backing up 'installed packages/deps' lists.. explicit dependencies?

Hi,
I'm looking for a good, clean and clear way to backup a list of installed packages, so that i can replicate/restore a setup on another box.
I've found an approach on http://wiki.archlinux.org/index.php/Pac … re_Restore
There, the command 'pacman -Qqe > pkglist' is recommended.  If i understand man pacman correctly, this will create a list of explicitly installed packages (not dependencies), without version information.
I don't mind the lack of version information, I'm using the latest packages anyway I want that on my other boxes too.

However, for the 'no dependencies'.  In one way this is good, because we want the dependencies to be automatically installed if needed on the other box, and not be installed explicitly as if we would explicitly want those packages.
But, it happens sometimes that you need to install stuff manually, and where you need to install packages yourself using 'pacman -Sy --asdeps' (Eg
http://wiki.archlinux.org/index.php/Ins … _on_Arch64 but there are more examples).  In this case, the packages are installed as deps but 'pacman -Qqe > pkglist'  won't pick them up and they won't be restored if we reinstall from the package list, even though we need them.

How could we solve this problem?  One way would be to have "perfect" packages for everything so we never need the '--asdeps' option, but let's face the real world: there will always be exceptional cases.
Another possibility would be to invent a new type called "explicit dependencies" (which would be a compromise between a dependency and an explicit package) and install these packages as such.  (basically, installing as explicit dependency would then be the new way of installing as dependency, --asdeps would be for users who 'really know what they are doing')
Then we would need also a way to export this information with 'pacman -Q' and separate the explicit packages from the explicit dependencies.
We could also keep on using the normal '--asdeps' flag, but to list these packages, we would need a new option to list orphans, and then you would need to separate real orphans from fake ones manually anyway so I think the other approach would be best....

What's your opinion on this?

Last edited by Dieter@be (2008-10-04 15:47:33)


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#2 2008-10-04 23:09:39

carlocci
Member
From: Padova - Italy
Registered: 2008-02-12
Posts: 368

Re: Backing up 'installed packages/deps' lists.. explicit dependencies?

for the example you posted, you should have ndiswrapper explicitly installed which should bring in the dependencies by itself.

But I see your point, that is my point, that is an important piece of information gets lost along the way as new packages are installed and old ones removed.

In my opinion pacman should log the command line by which it is invoked by, that way we could do much more with pacman.log: we could do what you ask, we could restore the packet database completely and so on.
Too bad pacman.log lines depend on the program you use, so it wouldn't be that reliable...

Of course I was advertising for my feature request: http://bugs.archlinux.org/task/11452

Offline

#3 2008-10-05 08:32:35

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 1,946
Website

Re: Backing up 'installed packages/deps' lists.. explicit dependencies?

Hmm, I like your idea, but more for debugging purposes.  I think it has several disadvantages for 'backup-restore' scenarios.  (see my reply on your ticket)
I think one needs just an - up to date -  snapshot of the installed packages, with all information in it (explicit + explicit dependencies) to do backup&restores.


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#4 2008-10-05 16:18:33

carlocci
Member
From: Padova - Italy
Registered: 2008-02-12
Posts: 368

Re: Backing up 'installed packages/deps' lists.. explicit dependencies?

yeah, he could simply use the two lists of packages, didn't think of that possibility.

Offline

Board footer

Powered by FluxBB