Ticket #337 (closed enhancement: fixed)

Opened 2 years ago

Last modified 3 months ago

Honor cachedir configuration for non-root users

Reported by: pghmcfc Assigned to: james
Priority: major Milestone:
Component: yum Version:
Keywords: Cc:

Description

I would like to be able to run repoclosure as a non-root user on lots of repositories, providing customised yum configuration files for each session. Currently the cachedir setting in these configuration files is ignored for non-root users, and a directory under /var/tmp is created and used instead. This leads to several gigabytes of data being cached there and tending to fill up my /var partition.

A workaround for this would be to move the cache directory from /var/tmp and replace it with a symlink to the target directory, which would work for a while since yum uses the same directory name until it gets removed, in which case it picks a new, unpredictable name.

Why is the cachedir directive not honored for non-root users, and can there please be provided some means of specifying this without having to resort to an ugly symlink hack?

Change History

(follow-up: ↓ 2 ) 11/16/09 20:14:29 changed by james

  • owner changed from skvidal to james.
  • status changed from new to assigned.

Note that when we talked about this, I mentioned creating a _new_ config. option, for usercachedir. Which would still default to /var/tmp/yum-* but could then be changed. Obeying cachedir for non-root is much more problematic.

(in reply to: ↑ 1 ) 11/16/09 21:09:23 changed by pghmcfc

Replying to james:

Note that when we talked about this, I mentioned creating a _new_ config. option, for usercachedir. Which would still default to /var/tmp/yum-* but could then be changed. Obeying cachedir for non-root is much more problematic.

That would be fine - I'm mainly interested in being able to specify where these files go. As someone not familiar with the inner workings of yum, having it honor cachedir seemed the most obvious thing to do but if there are problems with that, an additional directive is fine by me.

03/09/11 10:01:12 changed by pghmcfc

No movement on this?

As an aside, the use case I have for this involves custom yum.conf files being used by the non-root users, to do reposync and/or repoclosure. So the permissions issue with having non-root users honoring the cachedir option isn't actually an issue for me. Perhaps an alternative approach would be to honor the cachedir option if the specified cachedir was writable by the user?

03/09/11 14:32:42 changed by james

  • status changed from assigned to closed.
  • resolution set to fixed.

Actually it was kind of implemented, we honor TMPDIR now for where the non-root cachedir should go. It seemed better than having an entry in yum.conf.

In the latest upstream yum we also do locking for non-root users (based on cachedir location).