Re: [really solved] Re: aptitude: set all packages auto-installed except given list?

2011-01-16 Thread Florian Kulzer
On Sun, Jan 16, 2011 at 02:27:50 +0200, Andrei Popescu wrote:
 On Du, 16 ian 11, 01:00:50, Javier Barroso wrote:
  When you invoke aptitude unmarkauto ... aptitude has all your packages
  with auto mark, so aptitude will want to delete these unused packages
  *before* it start with your operation (unmarkauto in this case). I
  think it make sense
 
 Well, '(un)mark' seems to be doing more than just (un)marking packages 
 which is a bit counter-intuitive to me...

I have the impression that the modification of auto flags prompts
aptitude to search for unused packages and to schedule them for removal
at the very least, if not to remove them right away. The persistence of
scheduled actions would explain why aptitude tries to remove these
packages when you invoke it a second time, even though you then mark
them as non-auto. 

Another solution might be to use keep-all before unmarkauto.

-- 
Regards,|
  Florian   | http://www.florian-kulzer.eu


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20110116090621.GA6083@isar.localhost



Re: [really solved] Re: aptitude: set all packages auto-installed except given list?

2011-01-16 Thread Andrei Popescu
On Du, 16 ian 11, 10:06:21, Florian Kulzer wrote:
 
 Another solution might be to use keep-all before unmarkauto.

keep-all at that stage has an interesting effect:

root@think:~# aptitude search '~i' | wc -l # just for reference
1578
root@think:~# aptitude -o Aptitude::Delete-Unused=false markauto ~i
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
 
root@think:~# aptitude search '~i!~M' | wc -l # check that it worked
0
root@think:~# aptitude keep-all
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
 
root@think:~# aptitude search '~i!~M' | wc -l
1463

At this point it obviously doesn't make sense to continue with 
'unmarkauto'.

Regards,
Andrei
-- 
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic


signature.asc
Description: Digital signature


Re: [really solved] Re: aptitude: set all packages auto-installed except given list?

2011-01-15 Thread Andrei Popescu
On Sb, 15 ian 11, 19:42:26, Andrei Popescu wrote:
 
 Actually this only helps cleaning the system of unneeded packages, but 
 still leaves me with a lot of packages not marked auto, so I had to 
 apply Javier's hack after all.

Ok, this looks like the best version so far:

Backup:
aptitude --disable-columns -F %p search '~i!~M'  $PKG_LIST
(in case you're wondering, my list currently has 177 packages)

Restore (as root):
aptitude -o Aptitude::Delete-Unused=false markauto ~i
aptitude -o Aptitude::Delete-Unused=false unmarkauto $(cat $PKG_LIST | tr \n 
 )
aptitude keep-all

I still don't understand why 'Delete-Unused=false' is necessary with 
'unmarkauto' and an additional 'keep-all' is needed, but at least it 
works.

Regards,
Andrei
-- 
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic


signature.asc
Description: Digital signature


Re: [really solved] Re: aptitude: set all packages auto-installed except given list?

2011-01-15 Thread Javier Barroso
On Sat, Jan 15, 2011 at 9:41 PM, Andrei Popescu
andreimpope...@gmail.com wrote:
 On Sb, 15 ian 11, 19:42:26, Andrei Popescu wrote:

 Actually this only helps cleaning the system of unneeded packages, but
 still leaves me with a lot of packages not marked auto, so I had to
 apply Javier's hack after all.

 Ok, this looks like the best version so far:

 Backup:
 aptitude --disable-columns -F %p search '~i!~M'  $PKG_LIST
 (in case you're wondering, my list currently has 177 packages)

 Restore (as root):
 aptitude -o Aptitude::Delete-Unused=false markauto ~i
 aptitude -o Aptitude::Delete-Unused=false unmarkauto $(cat $PKG_LIST | tr 
 \n  )
 aptitude keep-all

 I still don't understand why 'Delete-Unused=false' is necessary with
 'unmarkauto' and an additional 'keep-all' is needed, but at least it
 works.
When you invoke aptitude unmarkauto ... aptitude has all your packages
with auto mark, so aptitude will want to delete these unused packages
*before* it start with your operation (unmarkauto in this case). I
think it make sense

Regards,


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/aanlktin3pvvpesel6nfqmbd9sn-qtdgia4qlveydp...@mail.gmail.com



Re: [really solved] Re: aptitude: set all packages auto-installed except given list?

2011-01-15 Thread Andrei Popescu
On Du, 16 ian 11, 01:00:50, Javier Barroso wrote:
 When you invoke aptitude unmarkauto ... aptitude has all your packages
 with auto mark, so aptitude will want to delete these unused packages
 *before* it start with your operation (unmarkauto in this case). I
 think it make sense

Well, '(un)mark' seems to be doing more than just (un)marking packages 
which is a bit counter-intuitive to me...

Regards,
Andrei
-- 
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic


signature.asc
Description: Digital signature