<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>31590</bug_id>
          
          <creation_ts>2015-12-03 21:29:51 +0300</creation_ts>
          <short_desc>apt-shell aborts if apt-get update was called in the meantime</short_desc>
          <delta_ts>2020-08-19 14:02:50 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>apt</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ivan Zakharyaschev">imz</reporter>
          <assigned_to name="Ivan Zakharyaschev">imz</assigned_to>
          <cc>boyarsh</cc>
    
    <cc>glebfm</cc>
    
    <cc>imz</cc>
    
    <cc>ldv</cc>
    
    <cc>placeholder</cc>
    
    <cc>vt</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>154138</commentid>
    <comment_count>0</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2015-12-03 21:29:51 +0300</bug_when>
    <thetext>apt-0.5.15lorg2-alt52

How to reproduce -- with an uninstalled package which changed between the apt-get-updates:

apt-get remove tmux
apt-repo rm sisyphus &amp;&amp; apt-repo add p6 &amp;&amp; apt-get update

Start apt-shell (in another terminal) and don&apos;t close it.

apt-repo add sisyphus &amp;&amp; apt-repo rm p6 &amp;&amp; apt-get update

In apt-shell, do:

install tmux
commit

It aborts like this:

apt&gt; install tmux
apt&gt; commit
The following NEW packages will be installed:
  tmux
0 upgraded, 1 newly installed, 0 removed and 4 not upgraded.
apt-shell: rpm/rpmhandler.cc:119: virtual std::__cxx11::string RPMFileHandler::Directory(): Assertion `HeaderP != __null&apos; failed.
Aborted


A solution would be either for apt-shell to lock APT&apos;s data preventing any other instances re-writing it (but not reading it), or for apt-shell to re-read the data if it has changed.

Another case -- out of curiosity -- if the package list hasn&apos;t changed at all between the apt-get-updates:

Start apt-shell (and leave it running).

[root@ovicaa apt]# rm /var/cache/apt/*.bin /var/lib/apt/lists/*ftp.alt*  -vi
rm: remove regular file ‘/var/cache/apt/pkgcache.bin’? y
removed ‘/var/cache/apt/pkgcache.bin’
rm: remove regular file ‘/var/cache/apt/srcpkgcache.bin’? y
removed ‘/var/cache/apt/srcpkgcache.bin’
rm: remove regular file ‘/var/lib/apt/lists/ftp.altlinux.org_pub_distributions_ALTLinux_Sisyphus_noarch_base_pkglist.classic’? y
removed ‘/var/lib/apt/lists/ftp.altlinux.org_pub_distributions_ALTLinux_Sisyphus_noarch_base_pkglist.classic’
rm: remove regular file ‘/var/lib/apt/lists/ftp.altlinux.org_pub_distributions_ALTLinux_Sisyphus_noarch_base_release’? y
removed ‘/var/lib/apt/lists/ftp.altlinux.org_pub_distributions_ALTLinux_Sisyphus_noarch_base_release’
rm: remove regular file ‘/var/lib/apt/lists/ftp.altlinux.org_pub_distributions_ALTLinux_Sisyphus_noarch_base_release.classic’? y
removed ‘/var/lib/apt/lists/ftp.altlinux.org_pub_distributions_ALTLinux_Sisyphus_noarch_base_release.classic’
rm: remove regular file ‘/var/lib/apt/lists/ftp.altlinux.org_pub_distributions_ALTLinux_Sisyphus_x86%5f64_base_pkglist.classic’? y
removed ‘/var/lib/apt/lists/ftp.altlinux.org_pub_distributions_ALTLinux_Sisyphus_x86%5f64_base_pkglist.classic’
rm: remove regular file ‘/var/lib/apt/lists/ftp.altlinux.org_pub_distributions_ALTLinux_Sisyphus_x86%5f64_base_release’? y
removed ‘/var/lib/apt/lists/ftp.altlinux.org_pub_distributions_ALTLinux_Sisyphus_x86%5f64_base_release’
rm: remove regular file ‘/var/lib/apt/lists/ftp.altlinux.org_pub_distributions_ALTLinux_Sisyphus_x86%5f64_base_release.classic’? y
removed ‘/var/lib/apt/lists/ftp.altlinux.org_pub_distributions_ALTLinux_Sisyphus_x86%5f64_base_release.classic’
rm: remove regular file ‘/var/lib/apt/lists/ftp.altlinux.org_pub_distributions_ALTLinux_Sisyphus_x86%5f64-i586_base_pkglist.classic’? y
removed ‘/var/lib/apt/lists/ftp.altlinux.org_pub_distributions_ALTLinux_Sisyphus_x86%5f64-i586_base_pkglist.classic’
rm: remove regular file ‘/var/lib/apt/lists/ftp.altlinux.org_pub_distributions_ALTLinux_Sisyphus_x86%5f64-i586_base_release’? y
removed ‘/var/lib/apt/lists/ftp.altlinux.org_pub_distributions_ALTLinux_Sisyphus_x86%5f64-i586_base_release’
rm: remove regular file ‘/var/lib/apt/lists/ftp.altlinux.org_pub_distributions_ALTLinux_Sisyphus_x86%5f64-i586_base_release.classic’? y
removed ‘/var/lib/apt/lists/ftp.altlinux.org_pub_distributions_ALTLinux_Sisyphus_x86%5f64-i586_base_release.classic’
[root@ovicaa apt]# apt-get update

In apt-shell, do:

apt&gt; install tmux
apt&gt; commit 
The following NEW packages will be installed:
  tmux
0 upgraded, 1 newly installed, 0 removed and 1602 not upgraded.
Need to get 0B/232kB of archives.
After unpacking 608kB of additional disk space will be used.
Do you want to continue? [Y/n] n
E: Operation cancelled.
apt&gt; 

It doesn&apos;t abort.

Another case is a curious one, too -- what if the lists change, but the wanted package doesn&apos;t:

apt-repo rm sisyphus &amp;&amp; apt-repo add p7 &amp;&amp; apt-get update

Start apt-shell.

apt-repo rm p7 &amp;&amp; apt-repo add t7 &amp;&amp; apt-get update

In apt-shell, do:

apt&gt; install tmux
apt&gt; commit 
The following NEW packages will be installed:
  tmux
0 upgraded, 1 newly installed, 0 removed and 173 not upgraded.
apt-shell: rpm/rpmhandler.cc:119: virtual std::__cxx11::string RPMFileHandler::Directory(): Assertion `HeaderP != __null&apos; failed.
Aborted


So, the change of the package is not essential. (http://packages.altlinux.org/en/Sisyphus/srpms/tmux tells us that tmux is the same in p7 and t7.)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>