synaptic: ‘Lock Version’ is broken; use dpkg hold
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | synaptic |
Confirmed
|
Unknown
|
||
| | synaptic (Ubuntu) |
Low
|
Unassigned | ||
Bug Description
‘Lock Version’ in Synaptic uses apt_preferences(5) (“pinning”). This is never recognized by non-Apt tools, e.g. dpkg. Also, as these settings are stored in a file private to Synaptic, other Apt tools do not recognize them either.
This feature is to be removed. In its place implement support for dpkg holds which are handled properly by all Apt and Dpkg tools.
* Original Description
this is minor annoyance. but I figured, this might as well be a bug which might need to be fixed bf dapper comes out. I mean, I'm pretty sure I'll be pinning fx 1.5 in Dapper, when fx 2.0 comes out...
here is the problem:
I have fx 1.5.0.2 thus don't need the 1.0.8 update. I pinned it (and its friend, shown below) to 1.0.7 using synaptic's packages>lock version, but when I do apt-get upgrade, it still wants to upgrade firefox. synaptic is just fine, it doesn't prompt me to update fx. here is the output for your viewing pleasure:
Code:
:~$ sudo apt-get -s upgrade
Reading package lists...
Done Building dependency tree...
Done
The following packages will be upgraded:
firefox firefox-
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Inst firefox-
Inst firefox [1.0.7-0ubuntu20] (1.0.8-0ubuntu5.10 Ubuntu:
Conf firefox (1.0.8-0ubuntu5.10 Ubuntu:
Conf firefox-
both of these were supposed to be pinned by synaptic...
Here is my cat /var/lib/
-------------
Package: firefox
Pin: version 1.0.7-0ubuntu20
Pin-Priority: 1001
Package: firefox-
Pin: version 1.0.7-0ubuntu20
Pin-Priority: 1001
--------------
I don't have a /etc/apt/
Thanks.
|
|
#1 |
|
|
#2 |
Hi, I'm not sure I understand Martin's suggestions, but if the situation
is that synaptic doesn't use /var/lib/
packages because users were confused by apt-get being influenced by
synaptic so synaptic got its own file storing locked packages, please
consider this message as a wish to make optional using either the global
APT file or a synaptic-specific one.
I usually assume that a synaptic feature that has an effect equivalent
to an APT feature will be "compatible" with the APT feature, but the
current behavior of synaptic for locking breaks this expectation.
this is minor annoyance. but I figured, this might as well be a bug which might need to be fixed bf dapper comes out. I mean, I'm pretty sure I'll be pinning fx 1.5 in Dapper, when fx 2.0 comes out...
here is the problem:
I have fx 1.5.0.2 thus don't need the 1.0.8 update. I pinned it (and its friend, shown below) to 1.0.7 using synaptic's packages>lock version, but when I do apt-get upgrade, it still wants to upgrade firefox. synaptic is just fine, it doesn't prompt me to update fx. here is the output for your viewing pleasure:
Code:
:~$ sudo apt-get -s upgrade
Reading package lists...
Done Building dependency tree...
Done
The following packages will be upgraded:
firefox firefox-
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Inst firefox-
Inst firefox [1.0.7-0ubuntu20] (1.0.8-0ubuntu5.10 Ubuntu:
Conf firefox (1.0.8-0ubuntu5.10 Ubuntu:
Conf firefox-
both of these were supposed to be pinned by synaptic...
Here is my cat /var/lib/
-------------
Package: firefox
Pin: version 1.0.7-0ubuntu20
Pin-Priority: 1001
Package: firefox-
Pin: version 1.0.7-0ubuntu20
Pin-Priority: 1001
--------------
I don't have a /etc/apt/
Thanks.
| Sebastian Heinlein (glatzor) wrote : | #4 |
Thanks for reporting. But solving this bug would require deeper code changes. Please be patient.
| Changed in synaptic: | |
| assignee: | nobody → mvo |
| status: | Unconfirmed → Confirmed |
| towsonu2003 (towsonu2003) wrote : | #5 |
thanks. is there anything I can do to help? I'm no programmer, and I'm using dial up (read: don't make me download stuff :) ), but anything else?
| Sebastian Heinlein (glatzor) wrote : | #6 |
no sorry. i will nag michael vogt, the current lead developer of apt about this bug. it is around for years.
| towsonu2003 (towsonu2003) wrote : | #7 |
is there a workaround? I checked out the apt howto and a couple of other documents, but the pinning howtos do not mention package specific pinning...
any pointer would be extremely nice. I just don't wanna upgrade by mistake -thanks.
| Michael Vogt (mvo) wrote : | #8 |
The workaround would be to create a symlink from /var/lib/
I guess in the future I could add a option in synaptic preferences:
[ ] Apply pkg-hold systemwide
or something like this.
Cheers,
Michael
I think this is solved to _some degree_ in Dapper (I don't have the workaround symlink). I have gaim (2beta) pinned via synaptic and apt doesn't suggest to upgrade them...
now the problem is, before I was posting this message, I unpinned the packages via synaptic, closed synaptic, issued apt-get update and:
~$ sudo apt-get -s upgrade
Reading package lists... Done
Building dependency tree... Done
The following packages have been kept back:
gaim
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
now apt won't upgrade it :)
| Changed in synaptic: | |
| status: | Unknown → Unconfirmed |
| rasz (citizenr) wrote : | #10 |
still not working with the newest patched build of synaptics from : https:/
| Changed in synaptic: | |
| importance: | Unknown → Undecided |
| status: | Unconfirmed → Confirmed |
| importance: | Undecided → Medium |
| Changed in synaptic: | |
| status: | Confirmed → Unconfirmed |
| Changed in synaptic: | |
| importance: | Unknown → Undecided |
| Tormod Volden (tormodvolden) wrote : | #11 |
Is this still a problem in 7.04 (and now that bug #67146 is fixed)?
| Changed in synaptic: | |
| status: | Confirmed → Needs Info |
| Jean-Yves Lefort (jylefort) wrote : | #12 |
Yes it is.
| Changed in synaptic: | |
| status: | Needs Info → Confirmed |
| Old_Soldier (charles.davis) wrote : | #13 |
still exists in 8.04
| Changed in synaptic: | |
| status: | Confirmed → Triaged |
| Arnaud Soyez (weboide) wrote : | #14 |
Bug confirmed and reproduceable in Hardy 8.04.1
Still broken in Intrepid 8.10 ..
| Tiva (ugkbunb) wrote : | #16 |
Still broken ni Jaunty. Easy to reproduce.
| mtron (mtron) wrote : | #17 |
still broken in kamic. Follow instructions above to reproduce
| tags: | added: pinning |
| Jonathon Fernyhough (jfernyhough) wrote : | #18 |
Still broken in Lucid.
Workaround is only partial as it ignores /etc/apt/
$ sudo rm /var/lib/
$ sudo ln -s /etc/apt/
(might need to
$ sudo touch /etc/apt/
if it doesn't already exist)
| David Clayton (dcstar) wrote : | #19 |
I have used aptitude to "pin" the packages I don't want changed whenever an "Upgrade" notice appears in the Update Manager - I hope that this stops my packages from being forcefully updated by this method.
| emarkay (mrk) wrote : | #20 |
Also (or related), "Recovery Console's", "Fix Broken Packages" also ignores any "Pinned" packages.
For example: I have Avidemux 2.4.4 Pinned in Synaptic to not upgrade, but this tool (in recovery menu) ignores that and automatically assigns the upgrade to Avidemux.
Since there are no options to select or deselect, this renders the entire tool unusable in this case.
| Gabriel C. Stabel (gstabel) wrote : | #21 |
Still broken in Ubuntu 10.10 (Maverick).
The partial Jonathon`s workaround (above) still working:
$ sudo rm /var/lib/
$ sudo ln -s /etc/apt/
I got an unexpect server error this morning (openerp server freezes, and about ten people stop working) because my colegue administrator updates de server using apt-upgrade after I locked packages in Synaptic...
For me this is a bug, not a feature. "Everbody" treat Synaptic as GUI for apt.
| Changed in synaptic (Ubuntu): | |
| assignee: | Michael Vogt (mvo) → nobody |
| importance: | Medium → Low |
| steubens (steubens) wrote : | #22 |
this recently made a bit of a mess on a new install (i add natty repos, pin at 50, then pull firefox from natty) where the file sharing dialogue and some other auto-foo installed natty packages, ignoring /etc/preference
make synaptic read /etc/preference
| emarkay (mrk) wrote : | #23 |
FWIW the last few posts confirm this could cause loss of work via unintended or unwanted action on a part of Ubuntu, yet it's been demoted in priority. This isn't a cosmetic or "fluff" issue, it relates to a fundamental concept that is flawed; intentionally protecting something by marking "pinned" it is ignored by the program in question.
Can this priority be elevated or at least reviewed?
| hawran (hawran.diskuse) wrote : | #24 |
I was about to report a new bug and found a couple of similar ones here:
As there's a plethora of Firefox's upgrades nowadays (and of Thunderbird's of course) I've locked a version within my Synaptic.
I expected the version being locked would not be upgraded without my explicit action.
However, I got my FF 8 upgraded to FF 9 when I run sudo apt-get upgrade/update.
What's wrong?
Does Synaptic lock packages on its own and the lower-level apps do not know about it?
PS
10.04 LTS - the Lucid Lynx
Linux ... 2.6.32-
GNOME gnome-about 2.30.2
| hawran (hawran.diskuse) wrote : | #25 |
Not to mention this:
https:/
| Benjamin Bach (benjaoming) wrote : | #26 |
This is very confusing. It is not clearly mentioned that locking a package in Synaptic does not lock it in dpkg.
How to properly lock/freeze/hold a package:
echo "package-name hold" | dpkg --set-selection
How to release a package for updates:
echo "package-name install" | dpkg --set-selection
Why can synaptic not simply invoke the same interface? Is it because it locks the package database? And if so, then I think Synaptic should be liable to also lock packages properly.
| Daniel Hartwig (wigs) wrote : | #27 |
Aptitude also has private holds that apt is unaware of, and receives a lot of bugs about this issue. Based on the large number of reports over the years, has the time come to update aptitude and synaptic to use these global apt holds?
Michael, I am glad to take on this task in synaptic also, if you are open to it. Does synaptic use pinning for this feature because APT was unaware of /var/lib/
| B Bobo (yout-bobo123) wrote : | #28 |
According to the first comment (bug #42178#bug-branches-
However, I think synaptic is actually much more confusing because of that change! It confsued me, and I wasted time trying to deal with it and filing bug #1166568. I agree with what Daniel Hartwig wrote in comment #27. I too would like to see the 2004 change reverted, so that synaptic uses the global preferences file in future. It seems better and more logical to do it that way.
| Daniel Hartwig (wigs) wrote : Re: [Bug 42178] Re: apt-get doesn't use the same pinning as synaptic | #29 |
On 31 May 2013 15:46, B Bobo <email address hidden> wrote:
> According to the first comment (bug #42178#bug-branches-
> synaptic was changed to use /var/lib/
> global preferences file /etc/apt/
>
> However, I think synaptic is actually much more confusing because of
> that change! It confsued me, and I wasted time trying to deal with it
> and filing bug #1166568. I agree with what Daniel Hartwig wrote in
> comment #27. I too would like to see the 2004 change reverted, so that
> synaptic uses the global preferences file in future. It seems better and
> more logical to do it that way.
>
Actually this would not be reverting that change. Synaptic uses the
apt-preferences system, and the referenced change only concerns which
file stored those. Preferences is not ideal for holding packages, so
we will change synaptic to use the dpkg holds system which is
available to all dpkg and apt tools.
This would be an interesting task for someone who wants to learn
apt/synaptic development. Otherwise I will tackle it shortly as it is
important to have all these tools using the same system for holds.
| summary: |
- apt-get doesn't use the same pinning as synaptic + synaptic: ‘Lock Version’ is broken; use dpkg hold |
| description: | updated |
| Changed in synaptic: | |
| status: | New → Confirmed |


On Fri, Oct 15, 2004 at 03:00:11PM +0200, martin f krafft wrote:
> Package: synaptic
> Version: 0.53.4-5
> Severity: minor
Thanks for your bugreport.
> I assume the 'hold' you refer to in README.Debian is the 'locking' preference instead. I wonder why,
> of a version in the interface's package menu. Well, I tried to lock
> APT to 0.5.26 for testing purposes, then installed a package and
> quit the programme. Subsequently, APT tried to update to APT 0.5.27
> from the command line.
>
> I noticed how you use ~/.synaptic/
> but in any case... could you either
>
> - make synaptic use the global preferences file to incorporate it
> with the rest of the system, or
> - document that it uses pinning, but only internally. you might
> just leave that out since the it just does not matter and is of
> no interest.
I'll probably go with the second suggestion. Synaptic used to use the dist-upgrade. They filed bugs against apt about it.
global preferences file, but I removed this feature. The problem was,
that people got confused that locking inside synaptic broke there
apt-get upgrade/
thanks,
Michael
> -- System Information: en_GB.UTF- 8 pkg-libc6. 2-3-2 Not found. +2.10-glibc2. 2 1:2.95.4-11woody1 The GNU stdc++ library
> Debian Release: 3.1
> APT prefers testing
> APT policy: (600, 'testing'), (98, 'unstable'), (1, 'experimental')
> Architecture: i386 (i686)
> Kernel: Linux 2.6.8-cirrus
> Locale: LANG=en_GB.UTF-8, LC_CTYPE=
>
> Versions of packages synaptic depends on:
> pn hermes1 Not found.
> pn libapt-
> ii libc6 2.3.2.ds1-17 GNU C Library: Shared libraries an
> ii libjpeg62 6b-9 The Independent JPEG Group's JPEG
> pn libpng2 Not found.
> ii libstdc+
> pn libtiff3g Not found.
> ii libungif4g 4.1.3-1 shared library for GIF images (run
> pn libwraster2 Not found.
> ii xlibs 4.3.0.dfsg.1-8 X Window System client libraries m
> ii zlib1g 1:1.2.2-1 compression library - runtime
>
> --
> Please do not CC me when replying to lists; I read them!
>
> .''`. martin f. krafft <email address hidden>
> : :' : proud Debian developer, admin, and user
> `. `'`
> `- Debian - when you have better things to do than fixing a system
>
> Invalid/expired PGP subkeys? Use subkeys.pgp.net as keyserver!
--
The first rule of holes is: when you find yourself in one, stop digging. - PJ
Linux is not The Answer. Yes is the answer. Linux is The Question. - Neo