Re: Aptitude oddity

2008-08-10 Thread Shachar Or
On Sunday 10 August 2008 11:56, Bob Cox wrote:
> Gabriel - thank you very much for your extremely useful reply.  It all
> worked perfectly and having now successfully applied the patch, I can
> confirm that I cannot reproduce the bug.

Ahuh! Great. This is what we are made of. 

Very good job everyone!
-- 
Shachar Or | שחר אור
http://ox.freeallweb.org/


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Aptitude oddity

2008-08-10 Thread Bob Cox
On Sun, Aug 10, 2008 at 09:11:18 +0200, Sven Joachim ([EMAIL PROTECTED]) wrote: 

> On 2008-08-10 01:41 +0200, Daniel Burrows wrote:
> 
> >   Aha.  The aptitude resolver isn't touching those packages at all, but
> > think maybe I see what *is* happening.  The code that I wrote to use the
> > apt resolver as a fallback option is accidentally resetting every hold
> > state in the database.  Does this patch help?
> 
> Works for me. :-)

And it does for me as well.  Many thanks.

-- 
Bob Cox.  Stoke Gifford, near Bristol, UK.
Registered user #445000 with the Linux Counter - http://counter.li.org/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Aptitude oddity

2008-08-10 Thread Bob Cox
On Sun, Aug 10, 2008 at 04:46:36 -0300, Gabriel Parrondo ([EMAIL PROTECTED]) 
wrote: 

> Come on, the debian people made patching software a children game. These
> are the simple steps you should follow:
> As root:
> aptitude install build-essential fakeroot
> apt-get build-dep aptitude
> 
> As normal user:
> apt-get source aptitude
> cd aptitude-(version)
> patch -p1 < thepatchhesent.patch
> dpkg-buildpackage -rfakeroot
> cd ..
> 
> As root:
> dpkg -i *.deb
> 
> 
> There, the patched aptitude is already installed and all you have to do
> is try to reproduce the bug. Luckily, you won't be able to.

Gabriel - thank you very much for your extremely useful reply.  It all
worked perfectly and having now successfully applied the patch, I can
confirm that I cannot reproduce the bug.

> If you want to know more about each command, the man pages are a good
> starting point.

Yes indeed, man pages are wonderful things.

-- 
Bob Cox.  Stoke Gifford, near Bristol, UK.
Registered user #445000 with the Linux Counter - http://counter.li.org/


signature.asc
Description: Digital signature


Re: Aptitude oddity

2008-08-10 Thread Gabriel Parrondo
El dom, 10-08-2008 a las 07:35 +0100, Bob Cox escribió:
> On Sat, Aug 09, 2008 at 16:41:40 -0700, Daniel Burrows ([EMAIL PROTECTED]) 
> wrote: 
> 
> > On Sat, Aug 09, 2008 at 10:56:22AM -0700, Daniel Burrows <[EMAIL 
> > PROTECTED]> was heard to say:
> > >   No, it'll spew large amounts of debugging information to your
> > > terminal which you can then paste into a mail to me. :-)
> > 
> >   Aha.  The aptitude resolver isn't touching those packages at all, but
> > think maybe I see what *is* happening.  The code that I wrote to use the
> > apt resolver as a fallback option is accidentally resetting every hold
> > state in the database.  Does this patch help?
> 
> [snip patch]
> 
> Sorry Daniel, but this is way out of my depth.  I'm happy to learn, but
> I really do not know what to do with your patch file.
> 
> So long as I am careful when I (rarely) attempt to upgrade more than once
> every few days then it should not be a problem.
> 


Come on, the debian people made patching software a children game. These
are the simple steps you should follow:
As root:
aptitude install build-essential fakeroot
apt-get build-dep aptitude

As normal user:
apt-get source aptitude
cd aptitude-(version)
patch -p1 < thepatchhesent.patch
dpkg-buildpackage -rfakeroot
cd ..

As root:
dpkg -i *.deb


There, the patched aptitude is already installed and all you have to do
is try to reproduce the bug. Luckily, you won't be able to.

If you want to know more about each command, the man pages are a good
starting point.


-- 
Gabriel Parrondo
GNU/Linux User #404138
GnuPG Public Key ID: BED7BF43
JID: [EMAIL PROTECTED]

"The only difference between theory and practice is that, in theory,
there's no difference between theory and practice."


signature.asc
Description: Esta parte del mensaje está firmada	digitalmente


Re: Aptitude oddity

2008-08-10 Thread Sven Joachim
On 2008-08-10 01:41 +0200, Daniel Burrows wrote:

>   Aha.  The aptitude resolver isn't touching those packages at all, but
> think maybe I see what *is* happening.  The code that I wrote to use the
> apt resolver as a fallback option is accidentally resetting every hold
> state in the database.  Does this patch help?

Works for me. :-)

Thanks,
   Sven


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Aptitude oddity

2008-08-09 Thread Bob Cox
On Sat, Aug 09, 2008 at 16:41:40 -0700, Daniel Burrows ([EMAIL PROTECTED]) 
wrote: 

> On Sat, Aug 09, 2008 at 10:56:22AM -0700, Daniel Burrows <[EMAIL PROTECTED]> 
> was heard to say:
> >   No, it'll spew large amounts of debugging information to your
> > terminal which you can then paste into a mail to me. :-)
> 
>   Aha.  The aptitude resolver isn't touching those packages at all, but
> think maybe I see what *is* happening.  The code that I wrote to use the
> apt resolver as a fallback option is accidentally resetting every hold
> state in the database.  Does this patch help?

[snip patch]

Sorry Daniel, but this is way out of my depth.  I'm happy to learn, but
I really do not know what to do with your patch file.

So long as I am careful when I (rarely) attempt to upgrade more than once
every few days then it should not be a problem.

Bob

-- 
Bob Cox.  Stoke Gifford, near Bristol, UK.
Registered user #445000 with the Linux Counter - http://counter.li.org/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Aptitude oddity

2008-08-09 Thread Daniel Burrows
On Sat, Aug 09, 2008 at 10:56:22AM -0700, Daniel Burrows <[EMAIL PROTECTED]> 
was heard to say:
>   No, it'll spew large amounts of debugging information to your
> terminal which you can then paste into a mail to me. :-)

  Aha.  The aptitude resolver isn't touching those packages at all, but
think maybe I see what *is* happening.  The code that I wrote to use the
apt resolver as a fallback option is accidentally resetting every hold
state in the database.  Does this patch help?

  Daniel
diff -r aabbcab08cd3 src/cmdline/cmdline_upgrade.cc
--- a/src/cmdline/cmdline_upgrade.cc	Sat Aug 09 09:58:13 2008 -0700
+++ b/src/cmdline/cmdline_upgrade.cc	Sat Aug 09 16:41:07 2008 -0700
@@ -112,7 +112,10 @@
 	// Reset all the package states.
 	for(pkgCache::PkgIterator i=(*apt_cache_file)->PkgBegin();
 	!i.end(); ++i)
-	  (*apt_cache_file)->mark_keep(i, false, false, NULL);
+	  {
+	bool held = (*apt_cache_file)->get_ext_state(i).selection_state == pkgCache::State::Hold;
+	(*apt_cache_file)->mark_keep(i, false, held, NULL);
+	  }
   }
 
   // Use the apt 'upgrade' algorithm as a fallback against, e.g.,


Re: Aptitude oddity

2008-08-09 Thread Daniel Burrows
On Sat, Aug 09, 2008 at 06:17:47PM +0100, Bob Cox <[EMAIL PROTECTED]> was heard 
to say:
> On Sat, Aug 09, 2008 at 09:13:33 -0700, Daniel Burrows ([EMAIL PROTECTED]) 
> wrote: 
> 
> > On Sat, Aug 09, 2008 at 05:21:32PM +0200, Sven Joachim <[EMAIL PROTECTED]> 
> > was heard to say:
> > > It's a bug.  If "aptitude safe-upgrade" can't find any packages that are
> > > _not_ on hold (or forbidden), it will try to upgrade packages that you
> > > don't want to.  See http://bugs.debian.org/466228.
> > 
> >   That shouldn't happen now: the dependency resolver should refuse to
> > break holds unless you set Aptitude::ProblemResolver::Allow-Break-Holds
> > to true (it defaults to false).  There's one exception I know of, which
> > is that the greedy apt resolver will happily break holds (see #470035),
> > but that doesn't even apply in the case of safe-upgrade.  I would be
> > interested in adding "-o Aptitude::CmdLine::Resolver-Debug=true" to the
> > command line and seeing what you get.
> 
> I don't quite follow this Daniel, sorry.  Doing the above would start
> aptitude in interactive mode?  I'm afraid I only use it from the command
> line but can assure you that it is still trying to safe-upgrade two of
> my three held packages as per my original post.

  No, it'll spew large amounts of debugging information to your
terminal which you can then paste into a mail to me. :-)

$ aptitude -s -o "Aptitude::CmdLine::Resolver-Debug=true" safe-upgrade

  Actually, it would also be helpful if you could produce a resolver
trace:

$ aptitude -s -o "Aptitude::ProblemResolver::Trace-File=/tmp/somefilename"

  (pick a file that doesn't exist: aptitude will overwrite it)

 Thanks,
  Daniel


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Aptitude oddity

2008-08-09 Thread Bob Cox
On Sat, Aug 09, 2008 at 09:13:33 -0700, Daniel Burrows ([EMAIL PROTECTED]) 
wrote: 

> On Sat, Aug 09, 2008 at 05:21:32PM +0200, Sven Joachim <[EMAIL PROTECTED]> 
> was heard to say:
> > It's a bug.  If "aptitude safe-upgrade" can't find any packages that are
> > _not_ on hold (or forbidden), it will try to upgrade packages that you
> > don't want to.  See http://bugs.debian.org/466228.
> 
>   That shouldn't happen now: the dependency resolver should refuse to
> break holds unless you set Aptitude::ProblemResolver::Allow-Break-Holds
> to true (it defaults to false).  There's one exception I know of, which
> is that the greedy apt resolver will happily break holds (see #470035),
> but that doesn't even apply in the case of safe-upgrade.  I would be
> interested in adding "-o Aptitude::CmdLine::Resolver-Debug=true" to the
> command line and seeing what you get.

I don't quite follow this Daniel, sorry.  Doing the above would start
aptitude in interactive mode?  I'm afraid I only use it from the command
line but can assure you that it is still trying to safe-upgrade two of
my three held packages as per my original post.

Aptitude version 0.4.11.8-1 with lenny.

-- 
Bob Cox.  Stoke Gifford, near Bristol, UK.
Registered user #445000 with the Linux Counter - http://counter.li.org/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Aptitude oddity

2008-08-09 Thread Daniel Burrows
On Sat, Aug 09, 2008 at 05:21:32PM +0200, Sven Joachim <[EMAIL PROTECTED]> was 
heard to say:
> It's a bug.  If "aptitude safe-upgrade" can't find any packages that are
> _not_ on hold (or forbidden), it will try to upgrade packages that you
> don't want to.  See http://bugs.debian.org/466228.

  That shouldn't happen now: the dependency resolver should refuse to
break holds unless you set Aptitude::ProblemResolver::Allow-Break-Holds
to true (it defaults to false).  There's one exception I know of, which
is that the greedy apt resolver will happily break holds (see #470035),
but that doesn't even apply in the case of safe-upgrade.  I would be
interested in adding "-o Aptitude::CmdLine::Resolver-Debug=true" to the
command line and seeing what you get.

  Daniel


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Aptitude oddity

2008-08-09 Thread Bob Cox
On Sat, Aug 09, 2008 at 17:21:32 +0200, Sven Joachim ([EMAIL PROTECTED]) wrote: 

> On 2008-08-09 17:11 +0200, Bob Cox wrote:
> 
> > I have some packages on hold for a while and they have remained on hold
> > during several safe-upgrades.  Now, all of a sudden, aptitude wants to
> > upgrade two of them.

[...]

> It's a bug.  If "aptitude safe-upgrade" can't find any packages that are
> _not_ on hold (or forbidden), it will try to upgrade packages that you
> don't want to.  See http://bugs.debian.org/466228.

Thank you Sven.  I had already done a safe-upgrade earlier today so that
explains why I encountered this bug for the first time.  (I did look
through the list of outstanding bugs but missed yours because it was a
long way down the list!)

Thanks again.

-- 
Bob Cox.  Stoke Gifford, near Bristol, UK.
Registered user #445000 with the Linux Counter - http://counter.li.org/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Aptitude oddity

2008-08-09 Thread Sven Joachim
On 2008-08-09 17:11 +0200, Bob Cox wrote:

> I have some packages on hold for a while and they have remained on hold
> during several safe-upgrades.  Now, all of a sudden, aptitude wants to
> upgrade two of them.
>
> trantor:/home/bob# aptitude search ~ahold
> ih  iceweasel- lightweight web browser based on Mozilla
> ih  iceweasel-l10n-en-gb - English (Great Britain) language package for 
> Iceweasel
> ihA linux-image-2.6-686  - Linux 2.6 image on PPro/Celeron/PII/PIII/P4
>
> trantor:/home/bob# aptitude safe-upgrade
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> Reading extended state information
> Initializing package states... Done
> Reading task descriptions... Done
> The following packages have been kept back:
>   cupsys-driver-gutenprint libneon25
> The following packages will be REMOVED:
>   libmyspell3c2{u}
> The following packages will be upgraded:
>   iceweasel iceweasel-l10n-en-gb
> 2 packages upgraded, 0 newly installed, 1 to remove and 2 not upgraded.
> Need to get 0B/1268kB of archives. After unpacking 23.5MB will be freed.
> Do you want to continue? [Y/n/?]
>
> Does this look like a bug or am I missing something obvious?

It's a bug.  If "aptitude safe-upgrade" can't find any packages that are
_not_ on hold (or forbidden), it will try to upgrade packages that you
don't want to.  See http://bugs.debian.org/466228.

Sven


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Aptitude oddity

2008-08-09 Thread Bob Cox
I have some packages on hold for a while and they have remained on hold
during several safe-upgrades.  Now, all of a sudden, aptitude wants to
upgrade two of them.

trantor:/home/bob# aptitude search ~ahold
ih  iceweasel- lightweight web browser based on Mozilla
ih  iceweasel-l10n-en-gb - English (Great Britain) language package for 
Iceweasel
ihA linux-image-2.6-686  - Linux 2.6 image on PPro/Celeron/PII/PIII/P4

trantor:/home/bob# aptitude safe-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Reading task descriptions... Done
The following packages have been kept back:
  cupsys-driver-gutenprint libneon25
The following packages will be REMOVED:
  libmyspell3c2{u}
The following packages will be upgraded:
  iceweasel iceweasel-l10n-en-gb
2 packages upgraded, 0 newly installed, 1 to remove and 2 not upgraded.
Need to get 0B/1268kB of archives. After unpacking 23.5MB will be freed.
Do you want to continue? [Y/n/?]

Does this look like a bug or am I missing something obvious?

-- 
Bob Cox.  Stoke Gifford, near Bristol, UK.
Registered user #445000 with the Linux Counter - http://counter.li.org/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]