Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian User (http://www.linux-archive.org/debian-user/)
-   -   how to give priority to local repository (http://www.linux-archive.org/debian-user/511090-how-give-priority-local-repository.html)

abdelkader belahcene 04-07-2011 07:39 AM

how to give priority to local repository
 
Hi,
Sometimes I have the same version of sofware* in my local repository and the remote repos,*
of course I want to install the soft from the local,*

plaease HOW TO tell this to apt-get .
thanks

regards
bela

Sven Hoexter 04-07-2011 08:05 AM

how to give priority to local repository
 
On Thu, Apr 07, 2011 at 09:39:27AM +0200, abdelkader belahcene wrote:
> Hi,
> Sometimes I have the same version of sofware in my local repository and the
> remote repos,
> of course I want to install the soft from the local,
>
> plaease HOW TO tell this to apt-get .

You can achieve that with pinning. You've to increase the priority for your
repository over the 500 default. See 'apt-cache policy' and
'man 5 apt_preferences' for the details.

Sven
--
And I don't know much, but I do know this:
With a golden heart comes a rebel fist.
[ Streetlight Manifesto - Here's To Life ]


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110407080517.GB2143@marvin">http://lists.debian.org/20110407080517.GB2143@marvin

abdelkader belahcene 04-07-2011 09:05 AM

how to give priority to local repository
 
Thanks for answer, I did it* but there is* an extra line
( the first**** 900 http://ftp.fr.debian.org/debian/ squeeze/main Translation-fr )
*how to remove it:


here is my file

cat /etc/apt/preferences
Package: *
Pin: origin ""
Pin-Priority: 900

Package: *
Pin: origin "localhost"
Pin-Priority: 600


Package: *
Pin: origin "ftp.fr.debian.org"
Pin-Priority: 500

Here is the output
100 /var/lib/dpkg/status
**** release a=now
*900 http://ftp.fr.debian.org/debian/ squeeze/main Translation-fr

*500 http://ftp.fr.debian.org/debian/ squeeze/non-free i386 Packages
**** release v=6.0.1,o=Debian,a=stable,n=squeeze,l=Debian,c=non-free
**** origin ftp.fr.debian.org

*500 http://ftp.fr.debian.org/debian/ squeeze/contrib i386 Packages
**** release v=6.0.1,o=Debian,a=stable,n=squeeze,l=Debian,c=con trib
**** origin ftp.fr.debian.org

*500 http://ftp.fr.debian.org/debian/ squeeze/main i386 Packages
**** release v=6.0.1,o=Debian,a=stable,n=squeeze,l=Debian,c=mai n
**** origin ftp.fr.debian.org

*600 ftp://localhost/extra6Bis/* Packages
**** origin localhost
*900 file:/opt/extra6/* Packages

thanks a lot

Sven Hoexter 04-07-2011 09:30 AM

how to give priority to local repository
 
On Thu, Apr 07, 2011 at 11:05:32AM +0200, abdelkader belahcene wrote:
> Thanks for answer, I did it but there is an extra line
> ( the first 900 http://ftp.fr.debian.org/debian/ squeeze/main
> Translation-fr )

Those are the translated package descriptions. That shoudn't have
any effect on the package selection process but you somehow hit them
with the empty origin definition.

Sven
--
And I don't know much, but I do know this:
With a golden heart comes a rebel fist.
[ Streetlight Manifesto - Here's To Life ]


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110407093041.GE2143@marvin">http://lists.debian.org/20110407093041.GE2143@marvin

Andrei Popescu 04-07-2011 09:50 PM

how to give priority to local repository
 
On Jo, 07 apr 11, 09:39:27, abdelkader belahcene wrote:
> Hi,
> Sometimes I have the same version of sofware in my local repository and the
> remote repos,
> of course I want to install the soft from the local,
>
> plaease HOW TO tell this to apt-get .

If the versions are identical it should be enough to list the local
repository first in sources.list.

Regards,
Andrei
--
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic


All times are GMT. The time now is 01:22 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.