FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 11-05-2008, 04:11 PM
"Brian McKee"
 
Default Install matching set of software while preserving aptitude auto/manual install info

Hi All,

I'd like to 'clone' the installed software on a machine. I can find
lots of references to this procedure
> Backup installed package list on current machine
> dpkg --get-selections > selections.txt
> move selections.txt to the new machine Set package list on new machine and install packages
> dpkg --set-selections < selections.txt
> apt-get update
> apt-get upgrade

What I can't find, but I know I've seen, is a way to do it using
aptitude that preserves aptitude's knowledge of what was installed
manually vs automatically.
Can someone throw me a link (or a cluestick)

Brian


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 11-05-2008, 04:13 PM
"Robert Caruso"
 
Default Install matching set of software while preserving aptitude auto/manual install info

Get me off this fucking list asap.


Robert Caruso
President/Owner
Mitigation Online Consultants
818-501-1520 Main Office
818-501-1524 Direct Office
310-709-7157 Cell
310-997-3677 Fax
rob@mitigationonlineconsultants.com
www.mitigationonlineconsultants.com
AIM: robmodelinla


-----Original Message-----
From: Brian McKee [mailto:brian.mckee@gmail.com]
Sent: Wednesday, November 05, 2008 9:12 AM
To: List Debian User
Subject: Install matching set of software while preserving aptitude
auto/manual install info

Hi All,

I'd like to 'clone' the installed software on a machine. I can find
lots of references to this procedure
> Backup installed package list on current machine dpkg --get-selections
> > selections.txt move selections.txt to the new machine Set package
> list on new machine and install packages dpkg --set-selections <
> selections.txt apt-get update apt-get upgrade

What I can't find, but I know I've seen, is a way to do it using aptitude
that preserves aptitude's knowledge of what was installed manually vs
automatically.
Can someone throw me a link (or a cluestick)

Brian


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact
listmaster@lists.debian.org



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 11-05-2008, 04:34 PM
Eduardo M KALINOWSKI
 
Default Install matching set of software while preserving aptitude auto/manual install info

Robert Caruso escreveu:
> Get me off this fucking list asap.
>

You're only in this list because you asked to. And if you want to leave,
see the bottom of every e-mail. There are instructions there.

--
Eduardo M Kalinowski
eduardo@kalinowski.com.br


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 11-05-2008, 04:47 PM
Johannes Wiedersich
 
Default Install matching set of software while preserving aptitude auto/manual install info

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert Caruso wrote:
> Get me off this ******* list asap.


To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact
listmaster@lists.debian.org

Hope this helps more than cursing.

Johannes


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkR3D0ACgkQC1NzPRl9qEVJWQCfXrpWJxj4qX vISXdoEMH5yDn3
Jt0An1aeD8+539eDwfN9l++kEAWjL5XK
=V0Xg
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 11-05-2008, 04:58 PM
"Douglas A. Tutty"
 
Default Install matching set of software while preserving aptitude auto/manual install info

On Wed, Nov 05, 2008 at 12:11:55PM -0500, Brian McKee wrote:
> I'd like to 'clone' the installed software on a machine. I can find
> lots of references to this procedure
> > Backup installed package list on current machine
> > dpkg --get-selections > selections.txt
> > move selections.txt to the new machine Set package list on new machine and install packages
> > dpkg --set-selections < selections.txt
> > apt-get update
> > apt-get upgrade
>
> What I can't find, but I know I've seen, is a way to do it using
> aptitude that preserves aptitude's knowledge of what was installed
> manually vs automatically.
> Can someone throw me a link (or a cluestick)

Just take a list of packages that aptitude knows are installed manually:

aptitude search '~i!~M'

You'd then want to tidy up this list so that it is just a list of
package names which could be passed to aptitude. Then edit the list
into a script that runs

aptitude install <followed by the list of packages>

Remember to escape the newlines with

I forget what the maximum command-line length is; it may be an issue
depending on how many packages you manually installed.

You could make the package list with one package per line and use xargs
to pipe it through aptitude (may take longer).

Or you can just use the aptitude user interface on the new box and
manually mark the packages off the list. For a one-off, this may be the
fastest way.

It all depends on how automated you want the process to be.

Doug.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 11-05-2008, 08:46 PM
"Brian McKee"
 
Default Install matching set of software while preserving aptitude auto/manual install info

On Wed, Nov 5, 2008 at 3:30 PM, green <greenfreedom10@gmail.com> wrote:
> On Wed, 2008.11.05, 310, Brian McKee wrote:
>> I'd like to 'clone' the installed software on a machine. I can find
>> lots of references to this procedure
>> > Backup installed package list on current machine
>> > dpkg --get-selections > selections.txt
>> > move selections.txt to the new machine Set package list on new machine and install packages
>> > dpkg --set-selections < selections.txt
>> > apt-get update
>> > apt-get upgrade
>>
>> What I can't find, but I know I've seen, is a way to do it using
>> aptitude that preserves aptitude's knowledge of what was installed
>> manually vs automatically.
>> Can someone throw me a link (or a cluestick)
>
> If you want to preserve auto-install information, use aptitude only, not dpkg
> or apt-get.
>
> Note that I have almost never actually restored the package selections using
> the commands under [restore] but the [save] ones are run with each backup.
> Understand what the [restore] commands do before you use them. And if this
> works, maybe someone could put it on the wiki.
>
> [save]
> # Save a list of all installed packages
> aptitude -F "%?p" --disable-columns search ~i >| installed-all
> # Save a list of all installed packages with their versions
> aptitude -F "%?p=%?V" --disable-columns search ~i >| installed-all-ver
> # Save a list of all automatically installed packages
> aptitude -F "%?p" --disable-columns search ~i~M >| installed-auto
>
> [restore]
> # Install all essential, important, required, or standard packages
> aptitude -R --schedule-only install $( aptitude -F "%?p" search !~i?or(~E,~pimportant,~prequired,~pstandard) )
> # Mark as manually installed all essential, important, required, or standard priority packages
> aptitude -R --schedule-only unmarkauto $( aptitude -F "%?p" search ~i?or(~E,~pimportant,~prequired,~pstandard) )
> # Mark as automatically installed all packages that are not essential, important, required, or standard priority
> aptitude --schedule-only markauto $( aptitude -F "%?p" search ~i!~E!~pimportant!~prequired!~pstandard )
> # Install all the packages in the installed package list (manual + automatic)
> aptitude -R --schedule-only install $( cat installed-all )
> # Mark as automatically installed all packages in that list
> aptitude --schedule-only markauto $( cat installed-auto )
>

Thanks for that. I'm not sure of the implications of marking
'essential, important, required, or standard priority packages' as
manually installed and the rest as automatically installed. I mean,
how did I get to that spot - from the install disc I'm assuming. Is
that a manual or automatic install?. If I look at initscripts say,
it's required, but automatic right now. If I follow your logic
correctly, you'd be marking it manual.

I also wonder about too many arguments if I do
> aptitude -R --schedule-only install $( cat installed-all )
with a lot of packages on that list.

I like the idea of creating the lists as a cron job - thanks for that thought.
Florian's suggestion looks simpler at the moment.

Food for thought for sure.

Brian


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 11-06-2008, 10:35 PM
"Douglas A. Tutty"
 
Default Install matching set of software while preserving aptitude auto/manual install info

On Thu, Nov 06, 2008 at 10:57:12PM +0200, Andrei Popescu wrote:
> On Wed,05.Nov.08, 12:58:42, Douglas A. Tutty wrote:
>
> > aptitude install <followed by the list of packages>
> >
> > Remember to escape the newlines with
> >
> > I forget what the maximum command-line length is; it may be an issue
> > depending on how many packages you manually installed.
> >
> > You could make the package list with one package per line and use xargs
> > to pipe it through aptitude (may take longer).
> >
> > Or you can just use the aptitude user interface on the new box and
> > manually mark the packages off the list. For a one-off, this may be the
> > fastest way.
> >
> > It all depends on how automated you want the process to be.
>
> Or you could just feed the list to 'dpkg --get-selections'


Do you mean dpkg --set-selections?

I suppose that would work because aptitude should then install those,
with the dependancies and mark things appropriately.

Doug.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 03:20 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org