Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Use case for aptitude-{create,run}-state-bundle ?

34 views
Skip to first unread message

Rick Thomas

unread,
May 17, 2013, 9:30:01 PM5/17/13
to

Can anybody tell me when I might want to use aptitude-{create,run}-
state-bundle ?

Is it, for example, useful for cloning a machine configuration
following a re-install from scratch?

Thanks!

Rick


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/83DAFA05-E141-4542...@pobox.com

sp113438

unread,
May 17, 2013, 10:50:02 PM5/17/13
to
On Fri, 17 May 2013 18:24:21 -0700
Rick Thomas <rbth...@pobox.com> wrote:

>
> Can anybody tell me when I might want to use aptitude-{create,run}-
> state-bundle ?
>
> Is it, for example, useful for cloning a machine configuration
> following a re-install from scratch?
>
> Thanks!
>
> Rick
>
>

#!/bin/bash
datetag=$(date +%Y-%m-%d_-_%H:%M:%S)

dpkg --get-selections > /root/dpkglist-$datetag.txt

On second machine:
## dpkg --set-selections < /root/dpkglist-$datetag.txt
## apt-get dselect-upgrade

should do the cloning job.



--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/20130518043043.267d4ca5@fx4100

Rick Thomas

unread,
May 18, 2013, 3:20:02 AM5/18/13
to

On May 17, 2013, at 7:30 PM, sp113438 wrote:

> On Fri, 17 May 2013 18:24:21 -0700
> Rick Thomas <rbth...@pobox.com> wrote:
>
>>
>> Can anybody tell me when I might want to use aptitude-{create,run}-
>> state-bundle ?
>>
>> Is it, for example, useful for cloning a machine configuration
>> following a re-install from scratch?
>>
>> Thanks!
>>
>> Rick
>>
>>
>
> #!/bin/bash
> datetag=$(date +%Y-%m-%d_-_%H:%M:%S)
>
> dpkg --get-selections > /root/dpkglist-$datetag.txt
>
> On second machine:
> ## dpkg --set-selections < /root/dpkglist-$datetag.txt
> ## apt-get dselect-upgrade
>
> should do the cloning job.


That's interesting, and even useful. Thanks! It's something I didn't
know and have often wondered about.

Nevertheless, it still doesn't answer the first question: What useful
thing is done by aptitude-create-state-bundle ?

Enjoy!

Rick


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/EA9E9A6C-6413-43B2...@pobox.com

Andrei POPESCU

unread,
May 18, 2013, 4:00:02 AM5/18/13
to
On Sb, 18 mai 13, 00:13:42, Rick Thomas wrote:
> On May 17, 2013, at 7:30 PM, sp113438 wrote:
> >
> >#!/bin/bash
> >datetag=$(date +%Y-%m-%d_-_%H:%M:%S)
> >
> >dpkg --get-selections > /root/dpkglist-$datetag.txt
> >
> >On second machine:
> >## dpkg --set-selections < /root/dpkglist-$datetag.txt
> >## apt-get dselect-upgrade
> >
> >should do the cloning job.

Not quite. First, this sequence of commands only transfers the
'installed/uninstalled' state of a package, so it looses information.
This information may or may not be important to you, but it still isn't
"cloning".

Second, there has been a change in dpkg behaviour as of wheezy and AFAIR
additional steps are needed, you might want to look it up.

> That's interesting, and even useful. Thanks! It's something I
> didn't know and have often wondered about.
>
> Nevertheless, it still doesn't answer the first question: What
> useful thing is done by aptitude-create-state-bundle ?

I've only encountered those commands when aptitude maintainers were
asking for more information on difficult bugs, but as far as I can tell
from the man pages they should do what you think they do, including
information about manually/automatically installed and such.

You might be interested in apt-clone as well.

Kind regards,
Andrei
--
http://wiki.debian.org/FAQsFromDebianUser
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic
signature.asc

Erwan David

unread,
May 18, 2013, 5:00:02 AM5/18/13
to
Le 18/05/2013 04:30, sp113438 a écrit :
> On Fri, 17 May 2013 18:24:21 -0700
> Rick Thomas <rbth...@pobox.com> wrote:
>
>> Can anybody tell me when I might want to use aptitude-{create,run}-
>> state-bundle ?
>>
>> Is it, for example, useful for cloning a machine configuration
>> following a re-install from scratch?
>>
>> Thanks!
>>
>> Rick
>>
>>
> #!/bin/bash
> datetag=$(date +%Y-%m-%d_-_%H:%M:%S)
>
> dpkg --get-selections > /root/dpkglist-$datetag.txt
>
> On second machine:
> ## dpkg --set-selections < /root/dpkglist-$datetag.txt
> ## apt-get dselect-upgrade
>
> should do the cloning job.
It does not. You loose the information that some packages where
installed only as dependencies.


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/5197408...@rail.eu.org
0 new messages