Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 610708 - app-portage/repoman-9999 - bogus warning: portage/repository/config.py:176: UserWarning: repos.conf: sync-depth is deprecated, use clone-depth instead
Summary: app-portage/repoman-9999 - bogus warning: portage/repository/config.py:176: U...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2017-02-23 16:12 UTC by Coacher
Modified: 2017-02-25 00:29 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Coacher 2017-02-23 16:12:40 UTC
Hello.

With portage-9999/repoman-9999 @ 246373bbe repoman shows a warning on each invocation:
$ repoman -x
/usr/lib64/python3.4/site-packages/portage/repository/config.py:176: UserWarning: repos.conf: sync-depth is deprecated, use clone-depth instead
  warnings.warn(_("repos.conf: sync-depth is deprecated,"

RepoMan scours the neighborhood...

Note: use --include-dev (-d) to check dependencies for 'dev' profiles

RepoMan sez: "If everyone were like you, I'd be out of business!"


Portage doesn't produce this warning when I use it normally (emerge --sync, emerge -av foo, etc.). The most interesting thing is that I don't have 'sync-depth' setting anywhere:
$ grep -q depth /etc/portage/repos.conf/* || echo 'Nope'
Nope


Please fix.
Comment 1 Zac Medico gentoo-dev 2017-02-23 21:19:14 UTC
I can't reproduce it. What repository are you running repoman in? Do you have PORTDIR_OVERLAY set in make.conf, maybe by sourcing a layman config?
Comment 2 Coacher 2017-02-24 08:06:28 UTC
(In reply to Zac Medico from comment #1)
> I can't reproduce it. What repository are you running repoman in? Do you
> have PORTDIR_OVERLAY set in make.conf, maybe by sourcing a layman config?
I run it in a local testing overlay. This overlay doesn't have a corresponding entry in repos.conf. I have it for years and never did any layman/repoman configuration to use it.
Comment 3 Coacher 2017-02-24 08:07:06 UTC
PORTDIR_OVERLAY is not set in any place I am aware of.
Comment 4 Coacher 2017-02-24 20:46:08 UTC
Steps to reproduce from scratch here:
coacher@Photon ~ $ mkdir testrepo
coacher@Photon ~ $ mkdir -p testrepo/profiles
coacher@Photon ~ $ mkdir -p testrepo/metadata
coacher@Photon ~ $ echo 'testrepo' > testrepo/profiles/repo_name
coacher@Photon ~ $ echo 'repo-name = testrepo' >> testrepo/metadata/layout.conf
coacher@Photon ~ $ echo 'masters = gentoo' >> testrepo/metadata/layout.conf
coacher@Photon ~ $ echo 'thin-manifests = true' >> testrepo/metadata/layout.conf
coacher@Photon ~ $ cd testrepo/
coacher@Photon ~/testrepo $ repoman -x
/usr/lib64/python3.4/site-packages/portage/repository/config.py:176: UserWarning: repos.conf: sync-depth is deprecated, use clone-depth instead
  warnings.warn(_("repos.conf: sync-depth is deprecated,"

RepoMan scours the neighborhood...
RepoMan sez: "If everyone were like you, I'd be out of business!"
coacher@Photon ~/testrepo $
Comment 5 Brian Dolbec (RETIRED) gentoo-dev 2017-02-24 22:32:02 UTC
it looks like repos.conf is getting a default setting for sync-depth when there is not a repos.conf file defined?

Just to confirm, that repo is not defined in repos.conf or make.conf PORTDIR_OVERLAY???
Comment 6 Coacher 2017-02-24 22:40:09 UTC
(In reply to Brian Dolbec from comment #5)
> it looks like repos.conf is getting a default setting for sync-depth when
> there is not a repos.conf file defined?
> 
> Just to confirm, that repo is not defined in repos.conf or make.conf
> PORTDIR_OVERLAY???
No, it's not defined. The steps above are the only steps required. No extra configuration was made.
Comment 7 Mike Gilbert gentoo-dev 2017-02-24 23:00:04 UTC
It looks like this is caused by the following code in pym/portage/sync/modules/git/__init__.py. 

    def check_depth(self):
        for attr in ('clone_depth', 'sync_depth'):
            self._check_depth(attr)

    def _check_depth(self, attr):
        d = getattr(self.repo, attr)
        # default
        setattr(self.repo, attr, 1)

If sync_depth is unset, the setattr call defaults it to 1. If I comment out that setattr() call, the problem goes away.
Comment 9 Zac Medico gentoo-dev 2017-02-25 00:29:31 UTC
Fixed in the master branch now:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=58e8b280794af7396115ea76747f0cc5fc5ab013