emerge using proxy

I am trying to get emerge to you my proxy.

here is my /etc/make.conf

------------------------------------------------------------------------------
 # Modified Calculate-core 3.1.1
 # Processed template files:
 # /var/lib/layman/calculate/profiles/templates/3.1/3_ac_install_live/1-live/sys-apps/portage/make.conf
 # For modify this file, create /etc/make.conf.clt template.
#------------------------------------------------------------------------------

#-------------------
 # Basic build option
#-------------------
 # Valid license. Need to specify for such packages as:
 # net-wireless/broadcom-sta, dev-java/sun-jdk and others.
ACCEPT_LICENSE="*"

 # Alternative mirror updates repository. In case of problems with access
 # at the beginning try to update the overlay by running `eix-sync`.
#PORTAGE_BINHOST="http://95.108.197.242/calculate/CLD/grp/i686"
#PORTAGE_BINHOST="ftp://ftp.linux.kiev.ua/pub/Linux/Calculate/CLD/grp/i686"
#PORTAGE_BINHOST="http://mirror.cnet.kz/calculate/CLD/grp/i686"

 # Connecting overlays layman. You should not change this setting, as this may
 # disrupt the package manager.
source /var/lib/layman/make.conf

#-----------------
 # Compiler Options
#-----------------
 # Additional options passed to the compiler. The flag "-march=native"
 # Optimize the program by your hardware.
#CFLAGS="-O2 -march=native -pipe"
#CXXFLAGS="${CFLAGS}"

#-------------------
 # Faster Compilation
#-------------------
 # Number of parallel processes that run when you install.
MAKEOPTS="-j1"

 # The number of packets for simultaneous assembly.
#EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --jobs=4"

 # disrupt the package manager.
source /var/lib/layman/make.conf

#-----------------
 # Compiler Options
#-----------------
 # Additional options passed to the compiler. The flag "-march=native"
 # Optimize the program by your hardware.
#CFLAGS="-O2 -march=native -pipe"
#CXXFLAGS="${CFLAGS}"

#-------------------
 # Faster Compilation
#-------------------
 # Number of parallel processes that run when you install.
MAKEOPTS="-j1"

 # The number of packets for simultaneous assembly.
#EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --jobs=4"

http_proxy="http://localhost:8080"
ftp_proxy="http://localhost:8080"
RSYNC_PROXY="localhost:8080"

here is what I put in my /etc/wget/wgetrc file:

 # You can set the default proxies for Wget to use for http, https, and ftp.
 # They will override the value in the environment.
https_proxy = http://localhost:8080/
http_proxy = http://localhost:8080/
ftp_proxy = http://localhost:8080/

 # If you do not want to use proxy at all, set this to off.
use_proxy = on

I did env-update && source /etc/profile.
When I try to emerge --sync I get this error:

Starting git pull in /usr/portage...
fatal: Unable to look up git.calculate.ru (port 9418) (Name or service not known)
!!! git pull error in /usr/portage.

Portage and overlay updated from Git. To use a proxy, run:

echo "proxy : http://localhost:8080" >>/etc/layman/layman.cfg
git config --global http.proxy localhost:8080
sed -ri 's|(url = )git://|\1http://|' /var/lib/layman/calculate/.git/config
sed -ri 's|(url = )git://|\1http://|' /usr/portage/.git/config

when i run eix-sync i get this now:
eix-sync
Checking portage…
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
* Copying old database to /var/cache/eix/previous.eix
* Syncing all portage overlays

  • Running… # ( cd /var/lib/layman/calculate && /usr/bin/git pull )
    error: Unable to find dca23f2fcc1045502c1e066c665b5869de6e31ea under http://git.calculate.ru/calculate/overlay.git
    Cannot obtain needed blob dca23f2fcc1045502c1e066c665b5869de6e31ea
    while processing commit a441e53309d192b8aeae2c42db847b34d8914d78.
    error: Fetch failed.
    • Errors:

    • Failed to sync overlay “calculate”.
  • Error was: Syncing overlay “calculate” returned status 1!
  • * layman -S failed
    * Running emerge --sync
    !!! getaddrinfo failed for ‘rsync.gentoo.org’: [Errno -2] Name or service not known

Some how I lost my /usr/portage/.git/config

Remove /usr/portage, and execute in /usr

git clone http://git.calculate.ru/calculate/portage.git

After that remove /var/lib/layman/calculate and execute in /var/lib/layman

git clone http://git.calculate.ru/calculate/overlay.git calculate

I am able to successfully run emerge-webrsync.
I get this error when I run layman -s calculate:


    • Failed to sync overlay “calculate”.
  • Error was: Syncing overlay “calculate” returned status 1!

How do I fix this

Running
git clone http://git.calculate.ru/calculate/portage.git
Failed big time!!

Cloning into ‘portage’…
error: Unable to get pack index http://git.calculate.ru/calculate/portage.git/objects/pack/pack-4877a237cbd51027a1bf37d17f724e04fd28e7a6.idx

error: Unable to get pack file http://git.calculate.ru/calculate/portage.git/objects/pack/pack-e82e226410030bb6b51b1b81df88bba7d2f441fb.pack
transfer closed with 6061179 bytes remaining to read
error: Unable to find 6138c3d6b2ab4aa7cc8df8e65db5cb2c5ae043da under http://git.calculate.ru/calculate/portage.git
Cannot obtain needed commit 6138c3d6b2ab4aa7cc8df8e65db5cb2c5ae043da
while processing commit 1cac0b686d86801a2a337eebf4dbeba5dcf841da.
error: Fetch failed.

Fixed info/refs. Try again with proxy:

git clone http://git.calculate.ru/calculate/portage.git

Does the command work without proxy?

I Just did a fresh install.
My problem is running layman -S.
I would like to try again.
But how do I prevent layman -S from wiping out my portage.git directory
on faliure?

The source of all these failures seems to be:

error: Unable to get pack file

Does squid work on localhost?

Does command work?

wget http://git.calculate.ru/calculate/portage.git/objects/pack/pack-4877a237cbd51027a1bf37d17f724e04fd28e7a6.idx

This worked, but what do I do with it??
wget http://git.calculate.ru/calculate/portage.git/objects/pack/pack-4877a237cbd51027a1bf37d17f724e04fd28e7a6.idx

git clone http://git.calculate.ru/calculate/portage.git
Failed :
Cloning into ‘portage’…
error: Unable to get pack index http://git.calculate.ru/calculate/portage.git/objects/pack/pack-4877a237cbd51027a1bf37d17f724e04fd28e7a6.idx

error: Unable to find 36f73978570f70995a4d32da652e058552d953ce under http://git.calculate.ru/calculate/portage.git
Cannot obtain needed blob 36f73978570f70995a4d32da652e058552d953ce
while processing commit cddea86799ce26ba99d85a79d125e48decac525d.
error: Fetch failed.

Ok, I switched to a different proxy.
emerge --sync now works :slight_smile:
Now, my only problem is when I run layman -s calculate


    • Failed to sync overlay “calculate”.
  • Error was: Syncing overlay “calculate” returned status 1!

Is other proxy spcified by

git config --global http.proxy localhost:8080
echo "proxy : http://localhost:8080" >>/etc/layman/layman.cfg