View previous topic :: View next topic |
Author |
Message |
Windmill Tux's lil' helper
Joined: 21 Feb 2014 Posts: 105
|
Posted: Sun Mar 16, 2014 5:59 pm Post subject: SYNC variable |
|
|
HI, in the wiki it states:
The SYNC variable is deprecated in current versions of sys-apps/portage. See
user $
man 5 portage
section about "repos.conf" for up-to-date documentation on how to set repository URI.
But in the handbook it is written to set the SYNC variable in make.conf. So what's the correct way? |
|
Back to top |
|
|
John R. Graham Administrator
Joined: 08 Mar 2005 Posts: 10589 Location: Somewhere over Atlanta, Georgia
|
Posted: Sun Mar 16, 2014 7:45 pm Post subject: |
|
|
These documentation mismatches sometimes occur while the developers are working on an improvement. Deprecated though it may be, rest assured that the SYNC variable will continue to work long after the Handbooks are updated to reflect the new method, which is already documented in the Portage man page.
As far as what is the correct way, that's almost a metaphysical question. There are two things you can do:- Don't sweat it for now.
- Study the portage man page, which is what the Wiki told you to do. The documentation there does appear to be fairly complete and correct.
- John _________________ I can confirm that I have received between 0 and 499 National Security Letters. |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Sun Mar 16, 2014 8:02 pm Post subject: |
|
|
Windmill ...
Something like the following (obviously change the 'sync-uri' to reflect whatever rsync mirror your using) ...
/etc/portage/repos.conf/gentoo.conf
Code: | [DEFAULT]
main-repo = gentoo
[gentoo]
location = /usr/portage
sync-type = rsync
sync-uri = rsync://rsync.[REMOVED].gentoo.org/gentoo-portage |
You can then remove the SYNC var from make.conf ...
best ... khay |
|
Back to top |
|
|
Windmill Tux's lil' helper
Joined: 21 Feb 2014 Posts: 105
|
Posted: Mon Mar 31, 2014 7:48 am Post subject: |
|
|
Yes I already read the man page, I was just asking if I should set sync in repos.conf or make.conf since in the wiki it says that the sync variable is deprecated |
|
Back to top |
|
|
TobiSGD n00b
Joined: 14 Apr 2014 Posts: 36
|
Posted: Thu Apr 24, 2014 8:08 pm Post subject: |
|
|
Hi. I am trying to set up a private (not local) sync server and for that set up a repos.conf file like khayyam described, of course with sync-uri pointing to my server. Nonetheless a run of emerge --sync will connect to the default servers and sync with them.
Is there anything else I have to look after? |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Thu Apr 24, 2014 9:01 pm Post subject: |
|
|
TobiSGD wrote: | I am trying to set up a private (not local) sync server and for that set up a repos.conf file like khayyam described, of course with sync-uri pointing to my server. Nonetheless a run of emerge --sync will connect to the default servers and sync with them. Is there anything else I have to look after? |
TobiSGD ... not something I've done but I imagine repos.conf would then look like the following:
Code: | [DEFAULT]
main-repo = private
[private]
location = /usr/portage
sync-type = rsync
sync-uri = rsync://rsync.domain.tld/gentoo-portage |
... and yours?
HTH & best ... khay |
|
Back to top |
|
|
TobiSGD n00b
Joined: 14 Apr 2014 Posts: 36
|
Posted: Fri Apr 25, 2014 1:27 am Post subject: |
|
|
This is my config file: Code: | >>> cat /etc/portage/repos.conf/slackeee.conf
[DEFAULT]
main-repo = slackeee
[slackeee]
location = /usr/portage
sync-type = rsync
sync-uri = rsync://slackeee.de/gentoo
| A manual run of rsync against that uri works fine, it seems like Portage is just ignoring that file. |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Fri Apr 25, 2014 1:51 am Post subject: |
|
|
TobiSGD wrote: | A manual run of rsync against that uri works fine, it seems like Portage is just ignoring that file. |
TobiSGD ... as you're using a dir for repos.conf any other file will be read also (alphabetically), the above is the only file defing sync-uri? Also, you don't perhaps still have a SYNC variable in make.conf, and does /usr/portage/profiles/repo_name show "slackeee"?
Otherwise, I can't see what the issue is here, the above looks fine to me.
best ... khay |
|
Back to top |
|
|
TobiSGD n00b
Joined: 14 Apr 2014 Posts: 36
|
Posted: Fri Apr 25, 2014 2:47 am Post subject: |
|
|
Thanks for your help.
khayyam wrote: | as you're using a dir for repos.conf any other file will be read also (alphabetically), the above is the only file defing sync-uri? | Yes, that is the only file. I tried the same with removing the directory and use a single file named repos.conf with the same content as above, but with the same problem. Quote: | Also, you don't perhaps still have a SYNC variable in make.conf, | I have, but it is commented out. Quote: | and does /usr/portage/profiles/repo_name show "slackeee"? | No, the name was gentoo in that file. I changed it manually to slackeee and it synced from my server, but in that process the file was replaced with the original again and Portage complained that the repository name changed.
Any ideas how to fix that? |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Fri Apr 25, 2014 3:06 am Post subject: |
|
|
TobiSGD wrote: | khayyam wrote: | and does /usr/portage/profiles/repo_name show "slackeee"? |
No, the name was gentoo in that file. I changed it manually to slackeee and it synced from my server, but in that process the file was replaced with the original again and Portage complained that the repository name changed. Any ideas how to fix that? |
TobiSGD ... ok, that explains why it didn't want to pull from the sync-uri. To fix it you would either change the repo_name on 'slackeee' and have an /etc/portage/rsync_excludes to exclude that file from being sync'ed (and so maintain the repo_name) or a similar rsync_excludes on the client ...
/etc/portage/make.conf
Code: | PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes" |
... and rsync_excludes
... or simply keep the repo_name 'gentoo' but have the sync-uri point to slackeee.de.
best ... khay |
|
Back to top |
|
|
TobiSGD n00b
Joined: 14 Apr 2014 Posts: 36
|
Posted: Sun Apr 27, 2014 2:05 am Post subject: |
|
|
Again, thanks for your help.
Using an exclude would be more a work around instead of a real solution. Shouldn't the repos.conf file override the settings in the repo_name file?
I think I will file a bug report about this. |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Sun Apr 27, 2014 12:31 pm Post subject: |
|
|
TobiSGD wrote: | Again, thanks for your help. |
TobiSGD ... you're welcome.
TobiSGD wrote: | Using an exclude would be more a work around instead of a real solution. Shouldn't the repos.conf file override the settings in the repo_name file? |
Yes, its a workaround, but the file is part of the repo and it is the repo_name which allows portage to correlate the repo to definitions provided in repos.conf.
TobiSGD wrote: | I think I will file a bug report about this. |
I'm not seeing a bug here ... the repo is use by portage not just for locating where the repository is (ie, those defined in repos.conf), but from which repo a package was installed from ... which afaik is acquired by repo_name.
Code: | # cat /var/db/pkg/app-arch/bzip2-1.0.6-r6/repository
gentoo |
... I'm a bit groggy this morning so it may in fact be less than optimal that portage does this. IMO the current method of defining PORTDIR, PORTDIR_OVERLAY, etc, should be changed to a more consistent schema, but in my grogginess I'm not sure this has any baring on repo_name/repo.conf.
best ... khay |
|
Back to top |
|
|
TobiSGD n00b
Joined: 14 Apr 2014 Posts: 36
|
Posted: Sun Apr 27, 2014 4:05 pm Post subject: |
|
|
I filed a bug report and got the answer that using the main-repo option is deprecated and isn't used at all anymore for syncing. The solution was not to use that option and rename the section in my config file from [slackeee] to [gentoo].
Now it works without any problem. |
|
Back to top |
|
|
|