Results 1 to 3 of 3

Thread: Redirecting APT to New Repository

  1. #1
    Join Date
    May 2008
    Beans
    1,029

    Question Redirecting APT to New Repository

    Is it possible to redirect apt-get to a new repository from an old one. Say, I had a repo at http://myoldrepo.com/apt and now I have one at http://mynewrepo.com/apt. Is there a way to get all calls to myoldrepo.com redirected to mynewrepo.com?

    ----- EDIT -----

    I tried making http://myoldrepo.com/apt into an HTML file and putting a 302 redirect in it, but apt-get doesn't follow it.
    PHP Code:
    <html>
    <
    head>

    <
    script type="text/javascript">
      <!--
      
    window.location.href='http://mynewrepo.com/apt';
      -->
    </script>

    </head>

    <body>
      This repository has moved to http://mynewrepo.com/apt

    </body>
    </html> 
    I also tried putting the new repo location in the Filename field of the Packages file:
    Code:
    Filename: http://mynewrepo.com/apt/pool/main/m/myfile/myfile.deb
    But then it looked for the file in http://myoldrepo/apthttp://mynewrepo.com/apt/pool/main/m/myfile/myfile.deb.

    ----- EDIT -----

    Was my question clear? I want to move my repository to a new location but leave the old URL usable for people who don't know about the move.
    Last edited by dodle; December 11th, 2011 at 03:34 PM.

  2. #2
    Join Date
    May 2008
    Beans
    1,029

    Re: Redirecting APT to New Repository

    *bump*

  3. #3
    Join Date
    Oct 2007
    Beans
    19

    Re: Redirecting APT to New Repository

    Old question, I know, but still high up on google search.

    The answer is that since version 0.7.21, apt does support redirects.
    I had to do this with openmolar.com/debian when I moved my site to a django design.

    I doubt very much, however, that apt supports javascript, which is where I suspect your method fails.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •