[Apt-offline-devel] URIs from aptitude, via multiple steps

Ritesh Raj Sarraf rrs at researchut.com
Sun Mar 7 07:19:23 UTC 2010


Hello Howard,

I gave aptitude a 2nd shot and have some data for which I want your review.

The initial command that you suggested (aptitude search -F '%p' ~aupgrade) 
gives me the list of packages where as I need the complete URI. I found that a 
mix of apt-get and aptitude helps me.

11:47:31 rrs at champaran:~ $ sudo apt-get -qq --print-uris install `aptitude 
search -F '%p' ~aupgrade`
'http://qt-kde.debian.net/debian/pool/main/k/kdemultimedia/kdemultimedia-
dbg_4.4.1-0rc1_amd64.deb' kdemultimedia-dbg_4%3a4.4.1-0rc1_amd64.deb 12760004 
SHA256:cf0db5e9ad26a76aed23fa9546a6d67740c816b4dad030439a99dc1e8c254e68



Same goes if a release is specified. We just need to instruct both apt-get and 
aptitude about the particular release.

11:54:13 rrs at champaran:~ $ sudo apt-get -qq --print-uris -t experimental 
install `aptitude search -t experimental -F '%p' ~ainstall gnome-terminal`
'http://ftp.debian.org/debian/pool/main/s/sgml-data/sgml-data_2.0.4_all.deb' 
sgml-data_2.0.4_all.deb 284366 
SHA256:191db4168eb952eb3eb7654e5ce1582685b5bcd85e5fc9c0ce3be8daac1f3259
'http://ftp.debian.org/debian/pool/main/d/docbook-xml/docbook-
xml_4.5-7_all.deb' docbook-xml_4.5-7_all.deb 344994 
SHA256:6109f6e7d0a10e43ddf7854d9ee178e156aa66a7b93cacc7446facaf1c7ac91e
'http://ftp.debian.org/debian/pool/main/libx/libxslt/xsltproc_1.1.26-2_amd64.deb' 
xsltproc_1.1.26-2_amd64.deb 114250 
SHA256:626b3bf57d034dbdce60ebcc28b363e43b5a410d1c3a78a9526d37ba2d21d830
......snipped......



But here's a weird problem. (maybe related to our last conversation of why I 
wasn't seeing any output)


12:10:16 rrs at champaran:~ $ sudo aptitude search -t experimental-snapshots -F 
'%p %v' ~aupgrade

No result.....

12:10:35 rrs at champaran:~ $ 
12:10:35 rrs at champaran:~ $ sudo aptitude -t experimental-snapshots upgrade
W: The "upgrade" command is deprecated; use "safe-upgrade" instead.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Reading extended state information      
Initializing package states... Done
Reading task descriptions... Done  
Resolving dependencies...
Resolving dependencies...
Resolving dependencies...
Resolving dependencies...
Resolving dependencies...
Resolving dependencies...
The following NEW packages will be installed:
  apt-xapian-index{a} autopoint{a} emacsen-common{a} libbind9-60{a} 
libdns64{a} libdrm-radeon1{a} 
  libgraphite3{a} libgupnp-igd-1.0-3{a} libisc60{a} libisccc60{a} 
libisccfg60{a} liblocale-ruby1.8{a} 
  liblog4cxx10{a} liblwres60{a} liborc-0.4-0{a} libruby{a} python-xapian{a} 
ttf-sil-gentium{a} 
  ttf-sil-gentium-basic{a} 
The following packages will be REMOVED:
  ant-gcj{u} ghostscript-x{u} gs{u} libcelt0{u} libgupnp-igd-1.0-2{u} 
liblzma1{u} libpolkit-dbus2{u} 
  libpolkit-grant2{u} libpolkit-qt0{u} libpolkit2{u} rhino{u} 
The following packages will be upgraded:
  acpi-support acpi-support-base ant ant-optional ant-optional-gcj apt-
listbugs aptitude aptitude-doc-en 
  bind9-host busybox console-setup consolekit coreutils cpp-4.3 cscope cups 
cups-bsd cups-client 
.....snipped......
daemon wicd-gtk wpasupplicant 
  xdelta3 xterm xulrunner-1.9.1 zenity 
The following packages are RECOMMENDED but will NOT be installed:
  libatm1 radeontool 
223 packages upgraded, 19 newly installed, 11 to remove and 0 not upgraded.
Need to get 380MB/389MB of archives. After unpacking 69.6MB will be used.
Do you want to continue? [Y/n/?] 


Hmmm!! This gave me a big list.

Aren't both the commands executed above the same ???
Can you please explain here ?




Another trick I was thinking of was to print both the package name and the 
version and then pass it on to apt-get.

12:11:54 rrs at champaran:~ $ aptitude search -t experimental -F '%p %V' 
~ainstall gnome-terminal
autopoint                                                                                          
0.17-10   
emacsen-common                                                                                     
1.4.19    
gnome-terminal                                                                                     
2.29.6-1  
gnome-terminal-data                                                                                
2.29.6-1  
......snipped.....



And then pass it to apt-get with the version number.

12:13:16 rrs at champaran:~ $ sudo apt-get -qq --print-uris install gnome-
terminal=2.29.6-1
E: Broken packages

It break because apt is confused about the dependencies which are support to 
be pulled-in from the default repo (which would be testing/unstable).

I think, here, if we pass all the packages along with the verison, apt-get 
will be clean.





But then there are many things which confuse me about aptitude.

Take this for example.

12:35:00 rrs at champaran:~ $ sudo aptitude search -t unstable -F '%p %V' 
~ainstall gource
autopoint                                                                                          
0.17-10   
emacsen-common                                                                                     
1.4.19    
gource                                                                                             
0.24-2    
libbind9-60                                                                                        
1:9.7.0.df
libdns64                                                                                           
1:9.7.0.df
libdrm-radeon1                                                                                     
2.4.18-2  
libgraphite3                                                                                       
1:2.3.1-0.
libgupnp-igd-1.0-3                                                                                 
0.1.6-1   
libisc60                                                                                           
1:9.7.0.df
libisccc60                                                                                         
1:9.7.0.df
libisccfg60                                                                                        
1:9.7.0.df
liblog4cxx10                                                                                       
0.10.0-1.1
liblwres60                                                                                         
1:9.7.0.df
liborc-0.4-0                                                                                       
0.4.3-5   
libruby                                                                                            
4.2       
python-xapian                                                                                      
1.0.18-1  
ttf-sil-gentium                                                                                    
20081126:1
ttf-sil-gentium-basic                                                                              
1.1-2     
12:35:07 rrs at champaran:~ $ sudo aptitude -t unstable install gource
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 will be upgraded:
  gource 
1 packages upgraded, 0 newly installed, 0 to remove and 224 not upgraded.
Need to get 158kB of archives. After unpacking 16.4kB will be used.
Do you want to continue? [Y/n/?] ^C


Why does aptitude have to pull so many packages ?

Also how do we instruct aptitude about commands like "dist-upgrade" and "safe-
upgrade" ?


Regards,
Ritesh



On Tuesday 08 Dec 2009 06:50:22 you wrote:
> Hello Ritesh,
> 
> In mail on Re: URIs from aptitude, via multiple steps, Ritesh wrote:
> > > maybe some lack of marking as packages "to be upgraded" in aptitude
> > > itself?
> > 
> > Hmmm!! So, by "To Be Upgraded", do you mean the packages that are marked
> > ? Just like it used to be done in the good old days with dselect ?
> 
> Very similar, yes.
> 
> > Are they auto-marked ? I just ran aptitude in interactive mode
> 
> I am not sure on the 1st invocation of aptitude.  There is an option
> in the preferences to "Automatically upgrade installed packages".  I
> have it turned off, but I don't know the default.
> 
> You can select them to be upgradeable, as per: Aptitude Online Help:
>   "U":          Mark all upgradable packages to be upgraded.
> 
> Also possibly the problem is some dependency preventing the upgrade,
> even if they are marked for upgrade.
> 
> You can do at command line:
> hostname# aptitude --simulate install
> It will let you know what would be installed with the current marked
> selections.
> 
> That way you can confirm if the issue is really getting aptitude to
> output what needs to be installed, or just getting aptitude to want
> install something.
> 
> Enjoy your vacation,
> Howard

-- 
Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.alioth.debian.org/pipermail/apt-offline-devel/attachments/20100307/c349cac6/attachment.pgp>


More information about the Apt-offline-devel mailing list