Results 1 to 9 of 9

Thread: dpkg - how to mark all packages 'Hold'

  1. #1
    Member registered user
    Join Date
    Sep 2004
    Posts
    70

    dpkg - how to mark all packages 'Hold'

    Other than using dselect and marking each package individually, is there a way to mark all packages hold? Something that could be used in a script maybe?

  2. #2
    Senior Member registered user
    Join Date
    Feb 2003
    Location
    Germany
    Posts
    1,159
    If you set all on hold, you can't upgrade anything...

  3. #3
    Senior Member registered user
    Join Date
    Feb 2004
    Location
    Denmark
    Posts
    111
    deleted: didn't work as expected

  4. #4
    Member registered user
    Join Date
    Sep 2004
    Posts
    70
    Yep!, that's true. Hold will prohibit dselect from updating. It won't disallow me from overiding a hold for update on a package by package basis. All I have to do is mark the packages I want updated with +.

    Since I've been working with Knoppix V3.6 I've found that if the first thing I do in dselect is update, nothing in select, go to install, I get a list of about 20 new packages to install and 384 to be upgraded. The first few times I did this I thought okay, let it do what it thinks it should do. Boy, was I wrong. I could never get a good test boot after that. It would try to install mount and sysv-init and remove mount-aes and who knows what else.

    Now, the first thing I do is mark all packages hold. Then update so I can select a few packages I want (like aptitude) without interference from dselect update setting its own agenda of what packages I should have. My test boots now work consistently as I winnow the package list down smaller and smaller. Once I have a base package list, I'll selectivily update packages to latest versions.

    At this point I have most of the process in script except for setting all packages to hold. I am still doing this manually and would like to have it done for me from a script. Any ideas?

  5. #5
    Senior Member registered user
    Join Date
    Feb 2004
    Location
    Denmark
    Posts
    111
    Yeah. I actually wanted the same from a script so I fiddled around..

    # dpkg-query -W --showformat='echo ${Package} hold | dpkg --set-selections\n' > holdall
    # chmod 777 holdall
    # holdall

    This creates a script with all package names found with the query thing and append cmds to hold the package.

    --> It takes quite some time to finish.
    4 mins here.
    you can open another shell and write
    dpkg --get-selections
    and see how far its come down the list

    hope it helps

  6. #6
    Member registered user
    Join Date
    Sep 2004
    Posts
    70
    Brilliant!

    I looked and looked and didn't see that solution. man dpkg describes the option but not clearly enough for me.

    I changed the script and it ran on my system in about 1 second. Do you get the same?

    dpkg-query -W --showformat='${Package} hold\n' | dpkg --set-selections

    Thanks again metavoid

  7. #7
    Senior Member registered user
    Join Date
    Feb 2004
    Location
    Denmark
    Posts
    111
    >I changed the script and it ran on my system in about 1 second. Do you get the same?

    Well first time I was compiling and it took like 4 mins.

    Then I reran it agian to unhold all again and that took like 2-3 secs.

    Glad it worked for you.

    Ohh. A far more clever version
    Thanks. Im not good at bash yet.

    dpkg-query -W --showformat='${Package} hold\n' | dpkg --set-selections

    This one does the job in 1 sec !

  8. #8
    Member registered user
    Join Date
    Sep 2004
    Posts
    70
    I'm not all that great. One of the things I do early in creating a script is seperate the input and output to files so I can see what is being created at each stage. When I get it working I link them up with pipe.

    My first computers 20 years ago were unix and custom real-time operating systems. Oh, ya, there was a time I had everything Amiga. About 15 years ago I ended up on MS stuff doing database applications. I only started back into unix a month ago. Boy things have changed; except, at a basic level it is just as I remember when I started so many years ago. Catching up on all the new great stuff everybody is doing has my head spinning.

  9. #9
    Senior Member registered user
    Join Date
    Feb 2004
    Location
    Denmark
    Posts
    111
    Hehe. 20 years ago I had something called a power 3000. I had an 16 KB! extra memory module and it was really hardcore..
    Been using Windows since first beta. Started linux 2 years ago and
    suddenly found home. Im writing this inside a virtual pc running knoppix 3.6. It works great. When finsih fiddling with it, I partimage it to a real partition and use the image to nuke XP. After I found knoppix I felt at home. Its really powerfull and there is very little fiddling with hardware.

Similar Threads

  1. Using DPKG to install deb packages
    By kepler in forum General Support
    Replies: 0
    Last Post: 11-15-2004, 12:36 PM
  2. apt-get / dpkg error: unable to access dpkg status area
    By Nitromethane1261 in forum General Support
    Replies: 2
    Last Post: 09-15-2004, 12:09 AM
  3. Hold me tight...
    By nishtya in forum The Lounge
    Replies: 10
    Last Post: 08-24-2004, 03:32 AM
  4. Removing broken packages in dselect/dpkg
    By leecming in forum Hdd Install / Debian / Apt
    Replies: 1
    Last Post: 06-29-2004, 06:42 AM
  5. dpkg--create new packages file
    By CrashedAgain in forum Hdd Install / Debian / Apt
    Replies: 0
    Last Post: 06-08-2004, 03:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


IBM System X3850-X5 Server w/4x Intel  Xeon E7-4870 CPU , 512 GB DDR3 RAM,NO HDD picture

IBM System X3850-X5 Server w/4x Intel Xeon E7-4870 CPU , 512 GB DDR3 RAM,NO HDD

$1599.99



Unused IBM 09P0037 MAINBOARD For  RS/6000 7044-170 P-Series picture

Unused IBM 09P0037 MAINBOARD For RS/6000 7044-170 P-Series

$375.00



IBM 7915 AC1 M4 E27R704 Server Intel 2650V2 32GB RAM NO HDD w/ 2x 750w PSU picture

IBM 7915 AC1 M4 E27R704 Server Intel 2650V2 32GB RAM NO HDD w/ 2x 750w PSU

$225.00



IBM QRadar xx29 2x Xeon E5-2650v4 2x 900W PSU M5120 12x 3.5

IBM QRadar xx29 2x Xeon E5-2650v4 2x 900W PSU M5120 12x 3.5" Bay Server No RAM

$179.99



IBM Power 8 S822L Server 8247-22L POWER8 Enterprise 256GB RAM 2x 00KV626 CPU picture

IBM Power 8 S822L Server 8247-22L POWER8 Enterprise 256GB RAM 2x 00KV626 CPU

$999.99



IBM SYSTEM X3500 M3 SERVER 7380AC1 TOWER Server XEON E5620 8GB RAID SEE NOTES picture

IBM SYSTEM X3500 M3 SERVER 7380AC1 TOWER Server XEON E5620 8GB RAID SEE NOTES

$110.30



IBM System x3550 M3 1U Server 2x Xeon E5645, 192GB RAM, 2x 300GB HDD (7944-AC1) picture

IBM System x3550 M3 1U Server 2x Xeon E5645, 192GB RAM, 2x 300GB HDD (7944-AC1)

$150.00



IBM 02CL197 FLASH SYSTEM 840-900 LITHIUM ION SERVER BATTERY MODULE 990854 picture

IBM 02CL197 FLASH SYSTEM 840-900 LITHIUM ION SERVER BATTERY MODULE 990854

$225.00



IBM ADP Server Type 7870 AC1 NO HDD | 128GB RAM PC3L | 2 x Xeon  E5620 picture

IBM ADP Server Type 7870 AC1 NO HDD | 128GB RAM PC3L | 2 x Xeon E5620

$199.99



Lot of 4 IBM 52Y4089 POWER7 CPU Processor Modules Server CPUs picture

Lot of 4 IBM 52Y4089 POWER7 CPU Processor Modules Server CPUs

$49.99