[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#639859: apt-build fails to build packages ; it conflicts with apt



Package: apt-build
Version: 0.12.38
Severity: grave
Tags: sid wheezy patch
Justification: renders package unusable

Trying to install a package with apt-build, for example:
# apt-build install hello
it fails with:
>W: Failed to fetch file:/var/cache/apt-build/repository/dists/apt-build/Release  Unable to find expected entry 'main/binary-amd64/Packages' in Release file (Wrong sources.list entry or malformed file)
>
>E: Some index files failed to download. They have been ignored, or old ones used instead.
>Reading package lists... Done
>E: The value 'apt-build' is invalid for APT::Default-Release as such a release is not available in the sources

Subsequently, 'apt-get update' gives:
W: Failed to fetch file:/var/cache/apt-build/repository/dists/apt-build/Release  Unable to find expected entry 'main/binary-amd64/Packages' in Release file (Wrong sources.list entry or malformed file)

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

I erased "/var/cache/apt-build" and applied the following patch to get rid
of this problem:
---------------------------------------------------------------------------
diff -Naur apt-build-0.12.38.orig/apt-build apt-build-0.12.38/apt-build
--- apt-build-0.12.38.orig/apt-build	2008-07-01 08:29:43.000000000 +0200
+++ apt-build-0.12.38/apt-build	2011-08-30 23:55:39.000000000 +0200
@@ -101,9 +101,9 @@
   update-source     - Update all sources and rebuild them
   remove            - Remove packages
   build-repository  - Rebuild the repository
-  clean-sources     - Clean up all object files in source directories
   clean-build       - Erase downloaded packages and temporary build files
-  clean-repository  - Erase downloaded packages and temporary build files
+  clean-repository  - Erase built packages
+  clean-sources     - Clean up all object files in source directories
   world             - Rebuild and reinstall all packages on your system
   info              - Build-related package information
 
@@ -337,10 +337,10 @@
     chdir $conf->repository_dir;
     my $arch = $_config->get("APT::Architecture");
     
-    system "ln -s . main" unless -e "main";
-    system "ln -s . apt-build" unless -e "apt-build";
-    system "ln -s . dists" unless -e "dists";
-    system "ln -s . binary-$arch" unless -e "binary-$arch";
+    system "mkdir dists" unless -e "dists";
+    system "mkdir dists/apt-build" unless -e "dists/apt-build";
+    system "mkdir dists/apt-build/main" unless -e "dists/apt-build/main";
+    system "ln -s ../../.. dists/apt-build/main/binary-$arch" unless -e "dists/apt-build/main/binary-$arch";
     make_release_file() unless -e "Release";
     
     system "apt-ftparchive packages . | gzip -9 > Packages.gz";
diff -Naur apt-build-0.12.38.orig/debian/postinst apt-build-0.12.38/debian/postinst
--- apt-build-0.12.38.orig/debian/postinst	2011-03-13 16:55:00.000000000 +0100
+++ apt-build-0.12.38/debian/postinst	2011-08-31 01:19:41.000000000 +0200
@@ -79,13 +79,8 @@
 
 	# Create repository_dir
 	if [ ! -e "$repository_dir" ]; then
-	    mkdir -p "$repository_dir"
-	    cd "$repository_dir"
-	    ln -s . stable
-	    ln -s . dists
-	    ln -s . apt-build
-	    ln -s . main
-	    ln -s . binary-`dpkg --print-architecture`
+	    mkdir -p "$repository_dir"/dists/apt-build/main
+	    ln -s ../../.. "$repository_dir"/dists/apt-build/main/binary-`dpkg --print-architecture`
 	fi
 	
 	sed s/__arch__/`dpkg --print-architecture`/ /usr/share/apt-build/Release > "$repository_dir/Release"

---------------------------------------------------------------------------

Unfortunately, it doesn't solve the problem.
"apt-get update" keeps saying:
E: The value 'apt-build' is invalid for APT::Default-Release as such a release is not available in the sources

Maybe an apt bug rather than an apt-build bug ?

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (800, 'testing'), (750, 'stable'), (500, 'oldstable'), (50, 'experimental'), (50, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.0.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.utf-8, LC_CTYPE=fr_FR.utf-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages apt-build depends on:
ii  apt                           0.8.15.6   Advanced front-end for dpkg
ii  apt-utils                     0.8.15.6   APT utility programs
ii  debconf [debconf-2.0]         1.5.40     Debian configuration management sy
ii  devscripts                    2.11.0     scripts to make the life of a Debi
ii  dpkg-dev                      1.16.0.3   Debian package development tools
ii  g++                           4:4.6.1-2  GNU C++ compiler
ii  gcc                           4:4.6.1-2  GNU C compiler
ii  libappconfig-perl             1.56-2     Perl module for configuration file
ii  libapt-pkg-perl               0.1.24+b2  Perl interface to libapt-pkg
ii  libc6                         2.13-16    Embedded GNU C Library: Shared lib
ii  perl                          5.12.4-4   Larry Wall's Practical Extraction 

Versions of packages apt-build recommends:
ii  build-essential               11.5       Informational list of build-essent
ii  fakeroot                      1.17-1     tool for simulating superuser priv

apt-build suggests no packages.

-- debconf information excluded



Reply to: