Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Hold back package from updating

  1. #1
    Join Date
    Aug 2006
    Beans
    417
    Distro
    Ubuntu 13.04 Raring Ringtail

    Hold back package from updating

    I've modified Unity to remove the workspace switcher by following these instructions:

    http://askubuntu.com/questions/38789...unity-launcher

    Works perfectly, except...the package manager knows that Unity has now been modified and will always attempt to update it with the copy in the repo.

    I have tried both locking and holding the package version, using all the methods on this page:

    http://askubuntu.com/questions/18654...ecific-package

    Unity is indicated with a lock icon in Synaptic but Update Manager still wants to update it. It doesn't even think there's a newer version, it just knows there's been a change:

    Code:
    Installed version: 5.10.0-0ubuntu6
    Available version: 5.10.0-0ubuntu6
    Is there anything I'm missing? Shouldn't this have worked?

    Thanks.

  2. #2
    Join Date
    Jun 2009
    Location
    0:0:0:0:0:0:0:1
    Beans
    5,169
    Distro
    Kubuntu

    Re: Hold back package from updating

    Code:
    echo "package hold" | sudo dpkg --set-selections
    should take care of updetes in teh command line
    marking it as locked in synaptic will take care of it in the update manager

    also that settings will have no effect on the package manager's package
    the only thing that will break that mod is a update that fixes the bug
    Last edited by pqwoerituytrueiwoq; May 5th, 2012 at 01:40 AM.
    Laptop: ASUS A54C-NB91 (Storage: WD3200BEKT + MKNSSDCR60GB-DX); Desktop: Custom Build - Images included; rPi Server
    Putting your Networked Printer's scanner software to shame PHP Scanner Server
    I frequently edit my post when I have the last post

  3. #3
    Join Date
    Aug 2006
    Beans
    417
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Hold back package from updating

    Quote Originally Posted by pqwoerituytrueiwoq View Post
    Code:
    echo "package hold" | sudo dpkg --set-selections
    should take care of updetes in teh command line
    marking it as locked in synaptic will take care of it in the update manager
    That command was in the link I posted and I did try it.

    However you got me to double-check. Turns out I did something stupid. When the directions said:

    Code:
    echo "package hold" | sudo dpkg --set-selections
    I literally typed "package hold". The command did not error out but

    Code:
    dpkg --get-selections
    showed that unity was still set to "install", not "hold".

    So I tried:

    Code:
    echo unity hold | sudo dpkg --set-selections
    And now unity is set to "hold", not "install".

    It's sort of working now, Unity still appears in Update Manager but it is unchecked and can't be rechecked. So I guess this means I won't be able to accidentally update it, which is good. It's just a little messy.

    Thank you.

  4. #4
    Join Date
    Aug 2006
    Beans
    417
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Hold back package from updating

    A little bump with some weirdness going on.

    On one of my computers this all seemed to work fine. On another computer also running 12.04:

    Code:
    sudo dpkg --set-selections
    hangs the terminal.

    Now they're both doing it, and now both will constantly try to update Unity. The only way I could get it to hold back was when dpkg --set-selections worked as explained in the last post. It now seems like

    Code:
    echo unity hold | dpkg --set-selections
    doesn't actually do anything.

    I'm a noob when it comes to bash commands, but I think this is just trying to place the text "unity hold" in the dpkg status area. If that's the case, why does it hang? What can I do to make it work?

    I suspect maybe automatic updates is interfering with dpkg?

  5. #5
    Join Date
    Sep 2009
    Beans
    8,874
    Distro
    Ubuntu Development Release

    Re: Hold back package from updating

    You can set a lock in synaptic on any package if you have synaptic installed. Tick on the actual package, then hit package you will see the lock version in the drop down.
    Attached Images Attached Images

  6. #6
    Join Date
    Aug 2006
    Beans
    417
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Hold back package from updating

    Thanks for the response!

    Quote Originally Posted by wilee-nilee View Post
    You can set a lock in synaptic on any package if you have synaptic installed. Tick on the actual package, then hit package you will see the lock version in the drop down.
    Yes, I have pinned/locked the packages this way. It doesn't seem to make any difference to the Update Manager, it wants to update them regardless.

    That is confusing, I thought they both used apt?

  7. #7
    Join Date
    Sep 2009
    Beans
    8,874
    Distro
    Ubuntu Development Release

    Re: Hold back package from updating

    Quote Originally Posted by Fraoch View Post
    Thanks for the response!



    Yes, I have pinned/locked the packages this way. It doesn't seem to make any difference to the Update Manager, it wants to update them regardless.

    That is confusing, I thought they both used apt?
    Are you sure, maybe what you are getting is actually a fix for the locked version, and not a upgrade.

  8. #8
    Join Date
    Aug 2006
    Beans
    417
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Hold back package from updating

    My first post shows the "upgrade" is the same version number as the one it's trying to replace. This is still the case.

    When it did work on my other machine, the entries were still there in the Update Manager but were unchecked and couldn't be re-checked. But the update versions were the same. It detects my modified package has been changed from the current package (even though the version numbers are the same) and is trying to update it.

    Edit: I just went into Update Manager to post the current version numbers:

    Code:
    Changes for the versions:
    Installed version: 5.12-0ubuntu1
    Available version: 5.12-0ubuntu1
    and amazingly it's sort of working now, the update is unchecked and can't be rechecked.

    <scratches head> OK I guess then? Weird.
    Last edited by Fraoch; May 17th, 2012 at 08:58 PM.

  9. #9
    Join Date
    Sep 2009
    Beans
    8,874
    Distro
    Ubuntu Development Release

    Re: Hold back package from updating

    Quote Originally Posted by Fraoch View Post
    My first post shows the "upgrade" is the same version number as the one it's trying to replace. This is still the case.

    When it did work on my other machine, the entries were still there in the Update Manager but were unchecked and couldn't be re-checked. But the update versions were the same. It detects my modified package has been changed from the current package (even though the version numbers are the same) and is trying to update it.

    Edit: I just went into Update Manager to post the current version numbers:

    Code:
    Changes for the versions:
    Installed version: 5.12-0ubuntu1
    Available version: 5.12-0ubuntu1
    and amazingly it's sort of working now, the update is unchecked and can't be rechecked.

    <scratches head> OK I guess then? Weird.
    May have to do with the cache having the update, and a new update run sets it straight.

    Ubuntu is sort of like this with updates and upgrades, it is a two way communication with the repos.

  10. #10
    Join Date
    Aug 2006
    Beans
    417
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Hold back package from updating

    Thanks for the help.

    I updated the package cache many, many times and the problem persisted. Not sure why it's working now...

    Sometimes you just have to be thankful it is working and not question why.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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