From owner-freebsd-questions@FreeBSD.ORG Sat Sep 13 17:23:31 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79DB0E45; Sat, 13 Sep 2014 17:23:31 +0000 (UTC) Received: from mail-qg0-x22f.google.com (mail-qg0-x22f.google.com [IPv6:2607:f8b0:400d:c04::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 279FB178; Sat, 13 Sep 2014 17:23:31 +0000 (UTC) Received: by mail-qg0-f47.google.com with SMTP id i50so2154892qgf.34 for ; Sat, 13 Sep 2014 10:23:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=MovRpyO84FTS5JAL5pLqtGhKs1V/ZwmXlpLZ5EwsuX8=; b=m8MBoHUZSlAbQkqFE+ODh27msU329u2sdoQngSQ7nMfzIrrbFPDhMKXvN2h6RIKP8L AhJF9gUpMR3xebV7FMW5COfwfksUpJa1RmVSFkYXYfeHJF7VghjjAf1XJeHmoN2yiiAV yFbdS9BIrwdcJX9LnspMssp7uZkcrJ75LIL1JzC3y8WN4xqp9LMZ9Scg9jnfhMQtmtD0 atbDuTrPGImd1b5LFnsmGJoq0X0Dc3BLzRd7mGo0Pp7EJES8tsZ9MSwBlqI5dIw//YoT XkIfQ707KS6tAFkkwd1GIMHynYXlMUlAj2mAbWr/We+pugj/jQ2OOs3lz4RqA6FohzYl sGcw== MIME-Version: 1.0 X-Received: by 10.224.130.7 with SMTP id q7mr23830557qas.42.1410629010066; Sat, 13 Sep 2014 10:23:30 -0700 (PDT) Received: by 10.224.10.198 with HTTP; Sat, 13 Sep 2014 10:23:30 -0700 (PDT) In-Reply-To: <54141881.20600@FreeBSD.org> References: <54141881.20600@FreeBSD.org> Date: Sat, 13 Sep 2014 12:23:30 -0500 Message-ID: Subject: Re: Repository Search Order From: Dan Lists To: Matthew Seaman Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: freebsd-questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 17:23:31 -0000 On Sat, Sep 13, 2014 at 5:12 AM, Matthew Seaman wrote: > > Can you open an issue on github concerning this please? > https://github.com/freebsd/pkg/issues > I don't have an account, but I can create one. > Bonus points if you can generate a pull request. > [clip] > While changing the order that the repo configuration files load seems to > be a useful approach, I think that it works, if at all, by chance. It > will be fragile in the sense that an unrelated change elsewhere in > dependency solving could easily destroy any effect from the order that > config files are processed. > In my testing, a package will be pulled from the first repository listed by pkg -vv *if* the versions are the same. My thought was to use that to prefer local packages compiled with custom options. That would in theory remove the need for annotations and make the repository preference automatic. The problem is that a newer version of a package will be pulled from a repository later in the list of repositories, ignoring the ordering. That is not the desired behavior in cases where you need specific options. For example if you have a local package of postfix compiled with mysql support you would not want the one from the FreeBSD repository pulled in even if it is newer. With the current way of choosing which package to install, it seems like annotations are still required. That makes sorting the repositories less of an issue, though I could still see wanting to prefer local repositories when available. Did I read that pkg install/upgrade ignores version specifications and always installs the newest version? I can see times when you would want a specific version. This seems related (at least tangentially). Pkg is always choosing the newest package regardless of other factors. > Repository data is downloaded and processed into a number of sqlite > databases each named after the tag in the repo.conf -- it strikes me > that imposing some preference ordering based on the repository tag at > the point that data about available packages is pulled out of the repo > databases would be a more robust approach. > I think using the file order makes sense and is easier to control. In my tests I was using numbers at the beginning of the file names to put the repositories in the order I want them, regardless of name. > Cheers, > > Matthew > > > -- > Dr Matthew J Seaman MA, D.Phil. > PGP: http://www.infracaninophile.co.uk/pgpkey > > >