Setting up your own APT repository with upload support

Posted by Steve on Sat 5 Nov 2005 at 16:04

We've previously covered setting up your own repository for the Debian's apt-get system, but we didn't cover managing automatic uploads. Thankfully this is a simple task with the reprepro, and dupload tools and a small amount of scripting.

The reprepro package is tool for creating an APT repository with a pool structure, the same type of structure the official Debian mirrors use.

The repository may:

  • Contain packages for multiple distributions:
    • Stable, Unstable, Testing, etc.
  • Contain packages for multiple architectures:
    • x86, sparc, all, etc.
  • Be managed quickly and easily.
Creating Your Repository

Installing the package is straightforward if you're using unstable, or etch, simply install it as you would install any other package:

apt-get install reprepro

Unfortunately the package contained within Debian's stable release, sarge, is a little outdated. For that reason I'd recommend that you install a back ported version. Thankfully this is readily available either from the projects homepage or elsewhere:

Once you've installed the software then we're ready to begin creating a repository. A new repository can be created in just a couple of steps:

  • Decide where you wish the archive to be located.
  • Create the configuration file.
  • Import your first package

Almost certainly you will wish to serve your repository via a webserver, so the location should be beneath your webservers root directory at a simple path.

I use http://steve.org.uk/apt as my repository root location so my archive will be located beneath /home/www/www.steve.org.uk/htdocs/apt - your location will obviously differ.

First of all create the directory, a subdirectory conf/ to contain the configuration file, and a directory incoming/ to which we'll later setup automatic upload processing:

mkdir -p /home/www/www.steve.org.uk/htdocs/apt
mkdir -p /home/www/www.steve.org.uk/htdocs/apt/conf
mkdir -p /home/www/www.steve.org.uk/htdocs/apt/incoming

Now that we have a directory to contain our repository we can look at creating the configuration file. The configuration file will specify which releases the repository will contain (sid, stable, etc) as well as the architectures. A sample configuration file will look like this:

Origin: Your Name
Label: Your own label
Suite: stable
Codename: sarge
Version: 3.1
Architectures: i386 all source
Components: main non-free contrib
Description: Your description

Here we've defined a repository which only contains packages for stable/sarge, which contains packages targeted to x86, or all. If you wish to contain both stable and unstable packages your configuration file will look like this:

Origin: Your Name
Label: Your own label
Suite: stable
Codename: sarge
Version: 3.1
Architectures: i386 all source
Components: main non-free contrib
Description: Your description

Origin: Your Name
Label: Your own label
Suite: unstable
Codename: sid
Architectures: i386 all source
Components: main non-free contrib
Description: Your description

Save your configuration to the file conf/distributions and you should now be ready to import a package.

You can either import a .deb file into the repository, or a .changes file which is produced by building a package from source.

From the main directory run:

reprepro -Vb . include sarge name_of_file

For example:

skx@lappy:~/apt$ reprepro -Vb . include sarge \ 
    /home/skx/debian/sarge/reprepro/reprepro_0.6-1sarge0_i386.changes 
Created directory "./db"
Created directory "./pool"
Created directory "./pool/main"
Created directory "./pool/main/r"
Created directory "./pool/main/r/reprepro"
db: 'reprepro' added to 'sarge|main|i386'.
db: 'reprepro' added to 'sarge|main|source'.
Created directory "./dists"
Created directory "./dists/sarge"
Created directory "./dists/sarge/main"
Created directory "./dists/sarge/main/binary-i386"
  writing to './dists/sarge/main/binary-i386/Packages.new'...
  writing to './dists/sarge/main/binary-i386/Packages.gz.new'...
Created directory "./dists/sarge/main/binary-all"
  writing to './dists/sarge/main/binary-all/Packages.new'...
  writing to './dists/sarge/main/binary-all/Packages.gz.new'...
Created directory "./dists/sarge/main/source"
  writing to './dists/sarge/main/source/Sources.gz.new'...
Created directory "./dists/sarge/non-free"
Created directory "./dists/sarge/non-free/binary-i386"
  writing to './dists/sarge/non-free/binary-i386/Packages.new'...
  writing to './dists/sarge/non-free/binary-i386/Packages.gz.new'...
Created directory "./dists/sarge/non-free/binary-all"
  writing to './dists/sarge/non-free/binary-all/Packages.new'...
  writing to './dists/sarge/non-free/binary-all/Packages.gz.new'...
Created directory "./dists/sarge/non-free/source"
  writing to './dists/sarge/non-free/source/Sources.gz.new'...
Created directory "./dists/sarge/contrib"
Created directory "./dists/sarge/contrib/binary-i386"
  writing to './dists/sarge/contrib/binary-i386/Packages.new'...
  writing to './dists/sarge/contrib/binary-i386/Packages.gz.new'...
Created directory "./dists/sarge/contrib/binary-all"
  writing to './dists/sarge/contrib/binary-all/Packages.new'...
  writing to './dists/sarge/contrib/binary-all/Packages.gz.new'...
Created directory "./dists/sarge/contrib/source"
  writing to './dists/sarge/contrib/source/Sources.gz.new'...

This has imported the package described in the file reprepro_0.6-1sarge0_i386.changes to the archive, creating the appropriate directories as required.

To have a less verbose output simply omit the -V flag, thusly:

skx@lappy:~/apt$ reprepro -b . include sarge \
    /home/skx/debian/sarge/reprepro/reprepro_0.6-1sarge0_i386.changes 
skx@lappy:~/apt$
Removing Packages

If you wish to remove a package from your repository you can do so with the remove command:

skx@lappy:~/apt$ reprepro -b . remove sarge reprepro
Deleting files no longer referenced...
deleting and forgetting pool/main/r/reprepro/reprepro_0.6-1sarge0_i386.deb
deleting and forgetting pool/main/r/reprepro/reprepro_0.6-1sarge0.dsc
deleting and forgetting pool/main/r/reprepro/reprepro_0.6.orig.tar.gz
deleting and forgetting pool/main/r/reprepro/reprepro_0.6-1sarge0.diff.gz

Note: you don't need to remove a package if you simply wish to replace an existing package with a newer version - this will be handled for you. When you import a newer version of a package contained in the archive already the older version will be removed.

Using Your Repository

Once your packages has been added to the archive they may be downloaded via apt-get, or aptitude, with the appropriate lines in your /etc/apt/sources.list file:

deb     http://example.com/apt  sarge main contrib non-free
deb-src http://example.com/apt  sarge main contrib non-free

If you're using two distributions simply repeat for each:

deb     http://example.com/apt  sarge main contrib non-free
deb-src http://example.com/apt  sarge main contrib non-free

deb     http://example.com/apt  sid main contrib non-free
deb-src http://example.com/apt  sid main contrib non-free

You should find that packages can be downloaded and installed as expected.

Configuring Package Uploads With dupload

dupload is a tool which is designed to allow you to upload packages to different repositories.

Once installed (via "apt-get install dupload") it may be configured either via the file /etc/dupload.conf or ~/.dupload.conf.

To configure uploads for your remote host then simply add a section such as this:

$cfg{'example'} = {
        fqdn => "example.com",
        login => "steve",
        method => "scpb",
        incoming => "/incoming/",
        # The dinstall on ftp-master sends emails itself
        dinstall_runs => 1,
};

This configuration :

  • Names the upload target 'example'.
  • Specifies that file uploads should be conducted using scp.
  • With the login name steve.
  • That packages should be uploaded into the directory /incoming.

You will certainly need to change the hostname, login name, and incoming directory. You might also wish to specify an alternative means of uploading, such as anonymous FTP. For more details of the available options please see "man dupload.conf".

Once you've configured the upload settings you should be able to upload a Debian package by executing:

dupload --to example \
   /home/skx/debian/sarge/reprepro/reprepro_0.6-1sarge0_i386.changes 

(Note that you should upload the .changes file, not the .deb file)

Once this command completes you'll find that you've successfully transferred the package to your incoming directory, beneath your apt root.

The next step is to allow reprepro to automatically add that package to the repository.

Importing Packages from an Incoming queue with reprepro

As a result of any dupload commands we'll expect to process the incoming files from the incoming/ directory. We've already seen that reprepro can handle the importing of packages via the .changes file.

So we simply need to write a small shell script which will locate each .changes file, import the package, then clean the directory afterwards.

(We must remove, or move, the files from the incoming directory to make sure we don't repeatedly try to re-add the same package.)

This is a sample script which does the job. It is based upon the one I use myself and should be easily usable elsewhere - simply change the incoming directory at the top of the script:

#!/bin/sh

INCOMING=/home/www/www.steve.org.uk/htdocs/apt/incoming

#
# Make sure we're in the apt/ directory
#
cd $INCOMING
cd ..

#
#  See if we found any new packages
#
found=0
for i in $INCOMING/*.changes; do
  if [ -e $i ]; then
    found=`expr $found + 1`
  fi
done


#
#  If we found none then exit
#
if [ "$found" -lt 1 ]; then
   exit
fi


#
#  Now import each new package that we *did* find
#
for i in $INCOMING/*.changes; do

  # Import package to 'sarge' distribution.
  reprepro -Vb . include sarge $i

  # Delete the referenced files
  sed '1,/Files:/d' $i | sed '/BEGIN PGP SIGNATURE/,$d' \
       | while read MD SIZE SECTION PRIORITY NAME; do
        
      if [ -z "$NAME" ]; then
           continue
      fi

      #
      #  Delete the referenced file
      #
      if [ -f "$INCOMING/$NAME" ]; then
          rm "$INCOMING/$NAME"  || exit 1
      fi
  done

  # Finally delete the .changes file itself.
  rm  $i
done

To use this simply setup a cronjob running every few minutes to process any new files in the incoming/ directory - something like this:

*/5 * *  *  * /usr/local/bin/import-new-packages.sh

 

 


Posted by JulienV (83.196.xx.xx) on Sun 6 Nov 2005 at 17:12
[ View Weblogs ]
Thank you Steve for this article that decided me to change from debpool (which seems to be unmaintained) to reprepro.

How do you operate for unattended gpg signing? Is gnupg-agent the only option?

Regarding the script, I would parse the changes file to catch the right distribution (if you have one incoming directory for several distributions):
-  reprepro -Vb . include sarge $i
+  DISTRIBUTION=$(cat $i | grep '^Distribution: ' | sed 's/Distribution: //')
+  reprepro -Vb . include $DISTRIBUTION $i

However, to use this, you have to invert "codename" and "suite" fields in the conf/distributions file.

I think the last bit is a typo from an adaptation:
-          rm "$INCOMING/$NAME" "$DESTINATION" || exit 1
+          rm "$INCOMING/$NAME" || exit 1


Cheers,


Julien

[ Parent | Reply to this comment ]

Posted by Steve (82.41.xx.xx) on Sun 6 Nov 2005 at 17:18
[ View Steve's Scratchpad | View Weblogs ]

Good catch on the rm problem - in my script rather than deleting the files I move them into an accepted/ directory - which is why there was a second argument left in there.

The idea of getting the distribution from the .changes file is a good one too - I honestly didn't think of that, but I guess you'd need to do that if you had more than one distribution available.

I'll leave that out of the script, since it might confuse people - but it will be available as a comment :)

Steve
--

[ Parent | Reply to this comment ]

Posted by Steve (82.41.xx.xx) on Sun 6 Nov 2005 at 17:20
[ View Steve's Scratchpad | View Weblogs ]

Oops I forgot about your question!

gnupg-agent appears to be the only option, yes. I've not explored anything else, other than making .bz2 indexes available.

Steve
--

[ Parent | Reply to this comment ]

Posted by pepo (200.55.xx.xx) on Thu 14 Sep 2006 at 09:49
Hi, How do I use gpg-agent with reprepro? I am using ask-passphrase but is ugly for many files.

Thanks

[ Parent | Reply to this comment ]

Posted by Steve (62.30.xx.xx) on Thu 14 Sep 2006 at 09:55
[ View Steve's Scratchpad | View Weblogs ]

I'm not sure. Right now I just have this in conf/distributions:

SignWith: apt@steve.org.uk

And it all works because my key is explicitly for that, and has no passphrase.

Steve

[ Parent | Reply to this comment ]

Posted by Anonymous (212.125.xx.xx) on Wed 9 Nov 2005 at 22:45
How do you handle .orig.tar.gz files in the repository

[ Parent | Reply to this comment ]

Posted by JulienV (83.196.xx.xx) on Thu 10 Nov 2005 at 06:19
[ View Weblogs ]
The first time you import a new upstream version into the repo, you have to include the orig.tar.gz file; if you don't, reprepro will complain and reject your package. Then, for new revisions of the Debian package, you don't need to include the orig.tar.gz (this is the normal behaviour with common building tools such as dbuild, pdebuild etc.). If you do include it, reprepro will complain and reject your package.
Cheers, Julien

[ Parent | Reply to this comment ]

Posted by Anonymous (82.135.xx.xx) on Fri 28 Jul 2006 at 14:33
What meens "you have to include the orig.tar.gz file;"? Copy it by hand?
Or is some more common way?

[ Parent | Reply to this comment ]

Posted by Anonymous (71.198.xx.xx) on Sun 12 Nov 2006 at 06:34
Pass -sa to dpkg-buildpackage to get it to include the source in the upload. Other build tools will probably have similar options.

[ Parent | Reply to this comment ]

Posted by Anonymous (24.98.xx.xx) on Sat 12 Nov 2005 at 13:58
Great article, Steve - using these instructions I was able to set up an apt repository in just under 30 minutes.

One small problem, though: I had to change the first line of dupload.conf to

$config::cfg{'example'} = {

since that's what dupload requires.

[ Parent | Reply to this comment ]

Posted by Anonymous (65.64.xx.xx) on Mon 21 Nov 2005 at 14:24
By the looks of, I can only add one package at a time? Is there any way I could add all my packages at once (like with a wildcard * or something)?

[ Parent | Reply to this comment ]

Posted by Steve (82.41.xx.xx) on Mon 21 Nov 2005 at 14:26
[ View Steve's Scratchpad | View Weblogs ]

Use a shell loop!

for i in *.changes; do
  reprepro -Vb . include sarge $i
done

Steve

[ Parent | Reply to this comment ]

Posted by Anonymous (69.109.xx.xx) on Tue 29 Nov 2005 at 10:44
Note: for anyone including a .deb file directly instead of a .changes file, use the following:
reprepro -Vb . includedeb sarge your_package.deb
('includedeb' instead of 'include')

Otherwise it will fail to add your package. HTH.

--sithender

[ Parent | Reply to this comment ]

Posted by Anonymous (67.81.xx.xx) on Sat 3 Dec 2005 at 22:21
Hello,

Was trying create a small repository with some old packages needed by another old program that we are using. I setup the repository etc. and tried adding in the package gtkscintilla_0.8.2-1_i386.deb. I can install the pacakge fine with the dpkg -i command but when I try to add in the package using the command

"reprepro -V -C contrib -A i386 includedeb etch gtkscintilla_0.8.2-1_i386.deb"

I get the following messages

tar: ./control: Not found in archive
tar: Error exit delayed from previous errors
Got no control information from .deb!
Error from tar: 2
There have been errors!

and the package is not added to the repository. Any ideas?

The package is available at http://www.muriquilinux.com.br/debian/pool/struct/php-gtk/gtkscin tilla_0.8.2-1_i386.deb

Thanks

[ Parent | Reply to this comment ]

Posted by peterhoeg (193.163.xx.xx) on Fri 24 Feb 2006 at 08:11

Steve, your loop that increments (and checks for the value of) $found is not necessary.

for f in *some_file_filter*; do
  # this will only be run if $f actually holds a value
  now do the actual processing...
done

You can simply remove this part:

#
#  See if we found any new packages
#
found=0
for i in $INCOMING/*.changes; do
  if [ -e $i ]; then
    found=`expr $found + 1`
  fi
done


#
#  If we found none then exit
#
if [ "$found" -lt 1 ]; then
   exit
fi

/peter

[ Parent | Reply to this comment ]

Posted by Anonymous (216.39.xx.xx) on Wed 30 Jul 2008 at 20:02
This is mostly true. Instead of this:
for f in *some_file_filter*; do
  # this will only be run if $f actually holds a value
  now do the actual processing...
done
you should do this:
for f in *some_file_filter*; do
  # if nothing matches the filter, the shell will return the filter string
  test -e "$f" || continue
  # this will only be run if $f actually holds a value
  now do the actual processing...
done
To witness this, issue this command:
echo *there_is_no_match*

[ Parent | Reply to this comment ]

Posted by El_Cubano (66.93.xx.xx) on Fri 17 Mar 2006 at 06:42
Steve,

I am curious as to how to handle more than one architecture. That is, I have both i386 and amd64 machines that I use and I would like to make the packages available for both architectures. I have a pbuilder running on an i386 machine and another on an amd64 machine. Can I just build them independently (say on the amd64 first) and then add the line for foo_0.0.0-0_i386.deb manually to the .changes file? Otherwise, I am thinking that reprepro won't know what to do if I hand it a .changes that only mentions one .deb along with two .debs.

Any ideas would be greatly appreciated. BTW, this is pretty nifty as it has made me reconsider my old manual approach (remember the article I submitted over a year ago now)? :-)

--
Roberto C. Sanchez
http://familiasanchez.net/~roberto

[ Parent | Reply to this comment ]

Posted by Steve (212.20.xx.xx) on Fri 17 Mar 2006 at 13:33
[ View Steve's Scratchpad | View Weblogs ]

Hmmm that is an interesting question.

I suspect you could build the package twice using the same orig.tar.gz, and a different .deb + changes for each and upload both. Since the .deb files would have different archs and the same version I think it would work out OK.

Here I think it would work because you can either import the .changes file or the .deb file. So import the .changes file for the x86 package - then afterwards import the x64 .deb file

Failing that hacking the .changes files manually to include both binary packages would presumably work, but would be more of a pain to apply since you'd need to resign the .changes file.

I guess the best thing to do is to try it and see!

Steve

[ Parent | Reply to this comment ]

Posted by Anonymous (132.230.xx.xx) on Thu 30 Mar 2006 at 10:22

Make a distribution with
Architecture: i386 amd64 source

then build your package on on of the architectures, for examples i386
with dpkg-buildpackage (if it is not ending with -0 or -1 and you do no
have the .orig.tar.gz already in the pool add a -sa to dpkg-buildpackage
so the changes file includes the .orig.tar.gz) and add that .changes
file to reprepro.

Then build the package on the other architecture, for example amd64
with the -B (upper case B) option, this will dpkg-buildpackage tell
to only generate the architecture specific packages, thus it will
create a .changes file only including _amd64.deb files. Then simply
tell reprepro to include this .changes file.

[ Parent | Reply to this comment ]

Posted by Anonymous (132.230.xx.xx) on Thu 30 Mar 2006 at 10:18
The Architecture: ... all ... line in your example is wrong.

Architecture-all packages are included in all architectures, especially in that
architecture "all", so Architecture: all packages are actually ending up there.
This is a bug in reprepro, that it handles "all" special, why not disallowing
architectures called this way. Adding packages works (to my supprise), but I am not sure if everything else will work. I strongly discourage it.

To get rid of it, remvoe the all from the Archtecture line and manually
remove the binary-all directories from your distdir. (reprepro does not yet
have any support for removing Packages files not longer needed)

[ Parent | Reply to this comment ]

Posted by dkg (216.254.xx.xx) on Fri 14 Jul 2006 at 21:46
[ View dkg's Scratchpad | View Weblogs ]
It looks like Anonymous (above) is right. This is now showing up as an error in the latest versions of reprepro. Steve, you might want to change it in your article.

[ Parent | Reply to this comment ]

Posted by Steve (62.30.xx.xx) on Sat 15 Jul 2006 at 10:00
[ View Steve's Scratchpad | View Weblogs ]

I don't often fix such changes retroactively, since they were correct at the time the article was written..

The comments should be sufficient to help people learn :)Steve

[ Parent | Reply to this comment ]

Posted by Anonymous (88.113.xx.xx) on Wed 19 Jul 2006 at 19:36
Thanks for the nice article Steve!

Does anyone have an idea how to move packages from one "component" to another using reprepro, for example from main to non-free ?

Thanks.

[ Parent | Reply to this comment ]

Posted by Steve (62.30.xx.xx) on Wed 19 Jul 2006 at 21:01
[ View Steve's Scratchpad | View Weblogs ]

Remove it from its old location. Rebuild with the correct section in the control file and re-upload?

Steve

[ Parent | Reply to this comment ]

Posted by Anonymous (212.131.xx.xx) on Tue 22 Aug 2006 at 10:42
Hi, this article is very useful for me, but I've a litte trouble.

I've a local partial mirror made with debmirror, and I want add my own packages into it. I've tried reprepro, but it recreate Packages(.gz and .bz2 too), with only new added packages, ignoring others in pool.

Is possible for reprepro to read the full pool and only update Packages file?

thanks a lot

[ Parent | Reply to this comment ]

Posted by ptecza (193.0.xx.xx) on Wed 20 Sep 2006 at 13:23
Hi Steve,

What about upload of an .orig.tar.gz file? The .changes file doesn't know
about it.

I would like to upload to my own repository a .deb file and full Debian
source package (.dsc, .orig.tar.gz and .diff.gz files).

What tool should I use to upload an .orig.tar.gz file? Where should I
put that file? Is incoming direcory good place?

P.

[ Parent | Reply to this comment ]

Posted by Steve (62.30.xx.xx) on Wed 20 Sep 2006 at 13:41
[ View Steve's Scratchpad | View Weblogs ]

It'll work just fine if you've uploaded the first revision of a package built with "-sa". (Since in that case the .orig.tar.gz file will be mentioned in the .changes file.)

For subsequent uploads don't include it as it will be already present.

Steve

[ Parent | Reply to this comment ]

Posted by ptecza (193.0.xx.xx) on Wed 20 Sep 2006 at 14:19
It works! You're great, Steve! I ran dupload again and it has
uploaded only .orig.tar.gz file :)

Thank you very much! You have a beer from me if I will be near
Edinburgh someday ;)

P.

[ Parent | Reply to this comment ]

Posted by Steve (62.30.xx.xx) on Wed 20 Sep 2006 at 14:30
[ View Steve's Scratchpad | View Weblogs ]

Well there is always Debconf next year which will be held here!

Steve

[ Parent | Reply to this comment ]

Posted by Anonymous (66.93.xx.xx) on Sun 22 Oct 2006 at 21:33
No need to set up a cron job and wait a few minutes on every upload. dput has a "post_upload_command" option for an upload target, which defines an arbitrary command to run after uploading a package. Just use this command to ssh to the machine in question and run reprepro with the appropriate options.

- Josh Triplett

[ Parent | Reply to this comment ]

Posted by Anonymous (200.87.xx.xx) on Fri 18 Apr 2008 at 19:36
Here I give you a link with a useful tip http://tips-debian.blogspot.com/2008/04/make-repository.html

[ Parent | Reply to this comment ]

Posted by Anonymous (130.155.xx.xx) on Tue 3 Mar 2009 at 00:02

When there's a new release of Debian, you may want to do a couple of things:
* edit conf/distributions, and
** add a set of lines for the new distribution
** update the Suite: lines, eg "stable" changes to "oldstable"
* reprepro -Vb . export # to update Packages and Release files
* reprepro -Vb . createsymlinks # to update symlinks, e.g. oldstable->etch

[ Parent | Reply to this comment ]

Posted by witus (79.13.xx.xx) on Mon 12 Oct 2009 at 11:24
[ View Weblogs ]
Do you know how can make a signed repository?

[ Parent | Reply to this comment ]

Posted by Anonymous (83.248.xx.xx) on Thu 12 Nov 2009 at 02:04
It looks like reprepro has had some changes recently. The previous parameter 'include' is changed for including debs to 'includedeb'.

[ Parent | Reply to this comment ]

Posted by didster (62.190.xx.xx) on Thu 1 Jul 2010 at 21:22
Hi,

Bit off topic but...

We use a local apt repository as a means to distribute our own
software. The software is not and will not ever be part of the
official Debian archives. Our software consists of 4 packages, 3 real
ones, lets call then package1, package2 and package3 and a overall
package that exists to bring in the three packages at a specific
version to make a overall version of our system - gets call that
package-system.

The local repository consists of many versions of each of the four
packages. When asking apt to install the very latest version of
package-system, everything works just as it should. But when asking
apt to install a specific older version of package-system (which we
sometimes need to do), apt complains and says the dependencies cannot
be met.

Assume we have

Package-system V2.0.2 which depends on
Package1 V2.1.99
Package2 V2.1.99
Pacakge3 V2.1.99

Package-system V2.0.1 which depends on
Package1 V2.1.88
Package2 V2.1.88
Pacakge3 V2.1.88

Then "apt-get install package-system" installs package-system 2.0.2
along with V2.1.99 of the three packages. But "apt-get install
package-system=2.0.1" fails as follows:

The following packages have unmet dependencies.
package-system: Depends: package1 (= 2.1.88) but 2.1.99 is to be installed
Depends: package2 (= 2.1.88) but 2.1.99 is to be installed
Depends: package3 (= 2.1.88) but 2.1.99 is to be installed
E: Broken packages

I could understand this if V2.1.88 of package1,2 & 3 were not
available, but they are

apt-get install package1=2.1.88
The following NEW packages will be installed
package1
0 upgraded, 1 newly installed, 0 to remove and 486 not upgraded.
Need to get 53.7MB/53.7MB of archives.
After this operation, 67.4MB of additional disk space will be used

Does anyone have any ideas? I am using apt v0.7.20.2+lenny1 and have
no apt pinnings in place. The control file for package-system that
looks like this:

Package: package-system
Version: XXX
Architecture: i386
Maintainer: XXX
Installed-Size: 76
Depends: package1 (= XXX), package2 (XXX), package3 (XXX)
Section: misc
Priority: extra

The Packages & Release files are generated with apt-ftparchive.

apt-cache policy shows this for package 1 (as per 2 and 3)

package1:
Installed: (none)
Candidate: 2.1.99
Version table:
2.1.99 0
1 http://apt.foocom ./ Packages
2.1.88 0
1 http://apt.foo.com ./ Packages

Many thanks

[ Parent | Reply to this comment ]

Posted by Anonymous (85.27.xx.xx) on Thu 15 Sep 2011 at 20:29
Hello, maybe that could be tweaked using pinning. On the apt_preferences man page, it says about apt priorities calculation : "Never downgrade unless the priority of an available version exceeds 1000.". See above man page for an example.

[ Parent | Reply to this comment ]

Sign In

Username:

Password:

[Register|Advanced]

 

Flattr

 

Current Poll

What do you use for configuration management?








( 232 votes ~ 0 comments )