apt-build generates en error message in update-manager

Bug #1268120 reported by Kenneth Wrede
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
apt-build (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I had made some new findings, and am rewriting the description accordingly. I'm not a developer and don't know how it works behind the surface. I'm using “trial and error” and tries find things out.
Please change anything according to your skills and needs.

WHERE IS THE BUG FOUND?
I think it is best to start here.

I have found this bug using Xubuntu, I guess the other flavors are affected in the same way.
I have found it in Xubuntu 12.04.3 Precise, and in 13.10 Saucy. Both 64-bit. It is likely that it affects Quantal and Raring likewise.

It do affect amd64 systems. It does not seem to affect i386. I tried at Lubuntu Saucy 32-bit as well, not problem. I can not explain why.

PROBLEM
In a fresh install av Xubuntu I have installed apt-build and its dependencies. During the installation it asks some questions. One of them is what architecture I want to build my applications for. I choose “native”, there is also generic and a couple of specified. Another question is about putting a line in the sources list, wich should be necessary if you want to install the compiled packages with apt. I accepted. (Sadly, I don't remember the exact words, it might be important. English is not my primary language.)
I have disabled proposed and backport repos, and after this I have updated the sources cache with the update-manager-GUI. It then showed this error message:
------------
"W:Failed to fetch file:/var/cache/apt-build/repository/dists/apt-build/main/binary-i386/Packages File not found
, E:Some index files failed to download. They have been ignored, or old ones used instead."
-----------
Note that the path in the error message point at a i386-folder! (The machine is amd64.)
If I inspect the file /etc/apt/sources.list, there is nothing related to the path mentioned in the error message. It seems untouched. This means that apt-build did not add a line there, it added the line somewhere else. I do not know where. It is visible in the sources-manager-GUI, and can be checked and unchecked. (Unchecked it does not generate this error.)

If I use the terminal and am running apt-get update I face the same problem. In the output, there is two error messages.
–---------------
user@computer:~$ sudo apt-get update
[sudo] password for user:
Ign file: apt-build InRelease
Ign file: apt-build Release.gpg
Get:1 file: apt-build Release [107 B]
Err file: apt-build/main i386 Packages
  File not found
Ign file: apt-build/main Translation-en_US
Ign file: apt-build/main Translation-en

[...]
Ign http://ubuntu.mirror.su.se saucy-security/multiverse Translation-en_US
Ign http://ubuntu.mirror.su.se saucy-security/universe Translation-en_US
W: Failed to fetch file:/var/cache/apt-build/repository/dists/apt-build/main/binary-i386/Packages File not found
E: Some index files failed to download. They have been ignored, or old ones used instead.
user@computer:~$ sudo apt-get update > /home/user/upgrade.txt
W: Failed to fetch file:/var/cache/apt-build/repository/dists/apt-build/main/binary-i386/Packages File not found
E: Some index files failed to download. They have been ignored, or old ones used instead.
---------------

By now it is obvious that the problem is not related to the GUI.

Note that in all error messages it is asked for an i386 folder. But the line I can see in update-manager only specifies "file:/var/cache/apt-build/repository", nothing about either i386 or amd64. That direction is chosen somewhere else. And that seems to be whats going wrong!

FOLDER STRUCTURE
If I am looking in the folder "file:/var/cache/apt-build/repository", it looks like this:
-----ls output-------
dists [folder]
gthumb_3.0.2-0ubuntu3+aptbuild1_amd64.deb
gthumb-data_3.0.2-0ubuntu3+aptbuild1_all.deb
gthumb-dbg_3.0.2-0ubuntu3+aptbuild1_amd64.deb
gthumb-dev_3.0.2-0ubuntu3+aptbuild1_amd64.deb
Packages.gz
Release
----------------------
If I continue down the path according to the error messages, I find a folder: “/var/cache/apt-build/repository/dists/apt-build/main/binary-amd64/” This is likely to be the correct path.

CONCLUSION
Either apt-build, or the update programs is getting something wrong. I can't tell wish of them.

Apt-get is correctly creating a local repository for the chosen architecture, but does not seem able to communicate it to the update programs. Or, it might as well bu that is informed correctly, but the update programs is reading it wrong.

WORKAROUND
My previous workaround did remove the error messages, but did not solve the problem. Therefore removed. It was wrong.

description: updated
Revision history for this message
Jörg Frings-Fürst (jff-de) wrote :

Hello Kenneth,

we need some more data about your bug.

From a terminal window please run:

apport-collect 1268120

attach the output of

dpkg --get-selections

and then change the status of the bug to 'Confirmed'.

Jörg

Changed in update-manager (Ubuntu):
status: New → Incomplete
description: updated
Revision history for this message
Kenneth Wrede (kennethwrede) wrote : CurrentDmesg.txt.txt

apport information

tags: added: apport-collected saucy
description: updated
Revision history for this message
Kenneth Wrede (kennethwrede) wrote : Dependencies.txt

apport information

Revision history for this message
Kenneth Wrede (kennethwrede) wrote : DpkgHistoryLog.txt.txt

apport information

Revision history for this message
Kenneth Wrede (kennethwrede) wrote : DpkgTerminalLog.txt.txt

apport information

Revision history for this message
Kenneth Wrede (kennethwrede) wrote : ProcEnviron.txt

apport information

Revision history for this message
Kenneth Wrede (kennethwrede) wrote :

And the output of "dpkg --get-selections" goes here.

I'm using the Raring kernel, it's seems more stable to me. But i think that doesn't matter in this case.

/Kenneth

Changed in update-manager (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Kenneth Wrede (kennethwrede) wrote :

For the sake if the thing I tried it with the regular saucy kernel as well. The result was identical.
Kernel 3.11.0-15

So even with the vanilla LTS-kernel 3.10.26.

Revision history for this message
Kenneth Wrede (kennethwrede) wrote :

Output of "sudo apt-get update" ends with this:

[...]
Ign http://ubuntu.mirror.su.se saucy-security/multiverse Translation-en_US
Ign http://ubuntu.mirror.su.se saucy-security/universe Translation-en_US
W: Failed to fetch file:/var/cache/apt-build/repository/dists/apt-build/main/binary-i386/Packages File not found

E: Some index files failed to download. They have been ignored, or old ones used instead.
lemone@Lisa:~$ sudo apt-get update > /home/lemone/upgrade.txt
W: Failed to fetch file:/var/cache/apt-build/repository/dists/apt-build/main/binary-i386/Packages File not found

E: Some index files failed to download. They have been ignored, or old ones used instead.

Revision history for this message
Kenneth Wrede (kennethwrede) wrote :

Affects LTS as well, and outside GUI

I tried it with a clean install of of latest Xubuntu LTS. 12.04.3. The same thing happened.

1) I instelled a comman line environment from the Xubuntu LTS.
2) Installed apt-build, aind installed xubuntu-desktop with "apt-build install xubuntu-desktop"
3) Restarted, logged in and updated the sources.

Revision history for this message
Kenneth Wrede (kennethwrede) wrote :

I checked this at both versions, saucy & precise. It might be correct, but maybe not. But to me it seems to be something wrong with the folder structure, or where in it the program are looking.

Ind the sources-manager I can find the row "file:/var/cache/apt-build/repository". (Is mentioned before.)

I looked in the folder manually. ther i found this

-----ls output-------
dists [folder]
gthumb_3.0.2-0ubuntu3+aptbuild1_amd64.deb
gthumb-data_3.0.2-0ubuntu3+aptbuild1_all.deb
gthumb-dbg_3.0.2-0ubuntu3+aptbuild1_amd64.deb
gthumb-dev_3.0.2-0ubuntu3+aptbuild1_amd64.deb
Packages.gz
Release
----------------------

But the error message was complaining about this folder "/var/cache/apt-build/repository/dists/apt-build/main/binary-i386/Packages"

And that's correct! THAT folder doesn't exist. The real structyre goes like this at my amd-64 machine. (The folder structure seems to be looped, linked back to a parent folder.)

/var/cache/apt-build/repository/dists/apt-build/main/binary-amd64/dists/apt-build/...

In his new light I have to conclude that the error message itself is correct. The bug is that it is looking in the wrong folder. There is nothing there to find. The update programs is not to blame anymore.

SOLUTIONS

I can se some different solutions. But im not a developer so some of them might be useless, or create new problems elsewere. My suggests is:

1) Configure apt-build to always put the files in the same folder, and link to that one in sources.list. (Easy fix?)
2) Configure apt-build to always update sources.list with the right path. (Better fix?)

Revision history for this message
Kenneth Wrede (kennethwrede) wrote :

According to comment #11 the source of the problem have changed. It's caused by a bad behavior from the installation process of apt-build. It is (correctly in my case) creating a amd-64 folder tree in the /var/cache. But it wrongly puts a i386-line in sources.list. Those to MUST be identical.

affects: update-manager (Ubuntu) → apt-build (Ubuntu)
Revision history for this message
Kenneth Wrede (kennethwrede) wrote :

Have been rewriting the description according to the new findings. I hardly think I can do much more now. But I hope to have saved some time for the developer. Dont hessitate to ask if you need something more.

/Kenneth

description: updated
Revision history for this message
Ish Sookun (coffee-bar) wrote :

Hello,

Replacing the below line from the file /etc/apt/sources.list.d/apt-build.list:

deb file:/var/cache/apt-build/repository apt-build main

to

deb [arch=amd64] file:/var/cache/apt-build/repository apt-build main

I installed apt-build via command line and I have no reason to believe the installation could have been tampered. I however continued getting errors during "sudo apt-get update". So, it might be coming from the apt-build package itself.

Revision history for this message
Kenneth Wrede (kennethwrede) wrote :

Ish Sookun

Your workaround works! (And they look exactly the same in the software sources gui.)

Looks like a tiny thing to solve for the particular developers.

Revision history for this message
Kenneth Wrede (kennethwrede) wrote :

(The bugg affects even Trusty, btw.)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.