Your message dated Fri, 5 Feb 2016 20:14:09 +0000
with message-id 
<CAPQ4b8k3QmeEhduea=jvyy_z14okpjantbunpttuw5dj_6d...@mail.gmail.com>
and subject line Re: aptitude: REQUEST: operator to version order test in 
"aptitude search" query syntax.
has caused the Debian Bug report #812444,
regarding aptitude: REQUEST: operator to version order test in "aptitude 
search" query syntax.
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
812444: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=812444
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: aptitude
Version: 0.7.2-1
Severity: normal

Package: aptitude
Version: 0.7.2-1
Severity: normal

I have Debian and Kali origins. Kali based on Debian stable.

So Kali follow Debian package naming schema but differ in version numbers.

They also respect Debian version numbering.

So it is possible to make queries to list difference between Debian and Kali
with "aptitude search".

For example to find command packages with same version:

  $ aptitude search '?narrow(?origin(Kali),?origin(Debian))'
  ...

To find packages that in Kali but not in Debian:

  $ aptitude search '?origin(Kali),!?origin(Debian)'
  ...

I would like to find packages that have newer version in Kali than in Debian.

Docs:

  https://www.debian.org/doc/manuals/aptitude/ch02s04s05.html

say nothing about direct version comparing.

Some indirect comparing possible via ?upgradable and setting priorities in
debootstrap'ed environment and chrooting and installing packages.

'?narrow' is equal operator for package version.

I need a strict greater operator:

  aptitude search '?gt(?origin(Kali),?origin(Debian))'

- any package version that greater.

Origins of my question come from (Russian text):

  http://permalink.gmane.org/gmane.linux.debian.user.russian/123271

--- End Message ---
--- Begin Message ---
2016-02-03 23:40 GMT+00:00 Oleksandr Gavenko <[email protected]>:
> On 2016-02-03, Manuel A. Fernandez Montecelo wrote:
>
>> I think that indeed the way to get this list of newer packages Kali than
>> in Debian is using ?upgradable, if pinning of the repositories (man
>> apt_preferences) is done correctly and if Kali's versions indeed show
>> higher numbers than Debian.  Is this not working properly?
>>
> I know about pinning solution. Just keep text short.
>
> This require modifying system files in order to make desired query.
>
> Doing so in chroot environments after debootstrap also looks complicated.

It just needs to write a file with the priority, it can be done
programmatically.

If one does not modify priorities, the behaviour of aptitude and apt
when doing e.g. "dist-upgrades" might be wrong.

On the other hand, if the repos of the second distro always have
"higher versions" of the packages, and the priority is the same,
"?upgradable" should work.


> But anyway I don't know easy way to display and process list of packages with
> versions. "apt-cache policy" output is not in machine readable format.

Maybe this helps (substituting ~i for a more interesting pattern)?

  aptitude -F '%p %V' versions ~i

> "aptitude" formatting is not so rich to show several versions for single
> package:
>
>   https://www.debian.org/doc/manuals/aptitude/ch02s05s01.en.html

It can show "current" and "candidate" version of the package, which is
essentially another manifestation of the pin-priorities: aptitude and
apt are mostly concerned with keeping the system up-to-date with
simple commands, so they often only pay attention to the current and
most-desired version available.


> I think that request should be closed. Any advanced querying should be done
> with "python-apt" or other programming interfaces.

OK, I will close it then.


Cheers.
-- 
Manuel A. Fernandez Montecelo <[email protected]>

--- End Message ---
_______________________________________________
Aptitude-devel mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/aptitude-devel

Reply via email to