[pacman-dev] Suggestion: Move local db to a different location
Here's a quick suggestion - far too many times I've seen people blow away their entire /var/lib/pacman/ folder in hopes of getting rid some error message or another, only to realize that pacman ALSO stores its locally-installed info there too and that they're now, essentially, screwed as far as pacman is concerned. Can we put this local info in a different place, or at least separate it from the remote db info a little more clearly? Like, for example, instead of the current set up of /var/lib/pacman/local /var/lib/pacman/current /var/lib/pacman/extra etc... we have /var/lib/pacman/local/ /var/lib/pacman/remote/current /var/lib/pacman/remote/extra etc... This structure, to me, makes more sense, since the "local" repo is a totally different beast from the remote repo info. This also allows the creation of a sync-able 'local' repo, like [local] http://localhost:8080/path/to/local/repo in pacman.conf without conflicting names. If nobody has any objections, I suppose I could hack a patch into the files backend that would do this, and possibly move from the current structure to the new one if it detects the old structure. In addition, those adventurous souls who like rm -r can be told to just rm -r /var/lib/pacman/remote and that will get rid of all remote repo information, which can be freshly obtained with pacman -Sy. I'm not trying to make it idiot-proof, but a clearer boundary between the local info, which should never be touched at the command line unless you really know what you're doing, and the remote stuff, that you can screw over until the cows come home and, in the end, just run pacman -Sy to get it all back. -- Travis
On Thu, Aug 23, 2007 at 03:10:02PM -0400, Travis Willard wrote:
Here's a quick suggestion - far too many times I've seen people blow away their entire /var/lib/pacman/ folder in hopes of getting rid some error message or another, only to realize that pacman ALSO stores its locally-installed info there too and that they're now, essentially, screwed as far as pacman is concerned. Can we put this local info in a different place, or at least separate it from the remote db info a little more clearly?
Like, for example, instead of the current set up of
/var/lib/pacman/local /var/lib/pacman/current /var/lib/pacman/extra etc...
we have
/var/lib/pacman/local/ /var/lib/pacman/remote/current /var/lib/pacman/remote/extra etc...
This structure, to me, makes more sense, since the "local" repo is a totally different beast from the remote repo info. This also allows the creation of a sync-able 'local' repo, like
[local] http://localhost:8080/path/to/local/repo
in pacman.conf without conflicting names.
If nobody has any objections, I suppose I could hack a patch into the files backend that would do this, and possibly move from the current structure to the new one if it detects the old structure.
In addition, those adventurous souls who like rm -r can be told to just rm -r /var/lib/pacman/remote and that will get rid of all remote repo information, which can be freshly obtained with pacman -Sy. I'm not trying to make it idiot-proof, but a clearer boundary between the local info, which should never be touched at the command line unless you really know what you're doing, and the remote stuff, that you can screw over until the cows come home and, in the end, just run pacman -Sy to get it all back.
I like this idea. Just today again, on irc, an user had done that again, while trying to troubleshoot some problems.
On 8/23/07, Travis Willard <travis@archlinux.org> wrote:
we have
/var/lib/pacman/local/ /var/lib/pacman/remote/current /var/lib/pacman/remote/extra etc...
Wow, this makes a lot of sense. This shouldn't be too hard to implement and even make backward compatible for a bit. In essence all we have to do to make it backward compatible is delete the existing repo directories if it finds them, if we even want to do that. Hell, we can do that in an install script. Who wants to whip together a patch for this, which I think we can safely include in 3.1? -Dan
On Thu, 23 Aug 2007 20:52:39 -0400 "Dan McGee" <dpmcgee@gmail.com> wrote:
On 8/23/07, Travis Willard <travis@archlinux.org> wrote:
we have
/var/lib/pacman/local/ /var/lib/pacman/remote/current /var/lib/pacman/remote/extra etc...
Wow, this makes a lot of sense. This shouldn't be too hard to implement and even make backward compatible for a bit. In essence all we have to do to make it backward compatible is delete the existing repo directories if it finds them, if we even want to do that. Hell, we can do that in an install script.
Who wants to whip together a patch for this, which I think we can safely include in 3.1?
I can probably do it, it'll just take some time, since I've never used git and I've never really delved into the pacman code. I know where the backend is, and I imagine it'd be easy enough for me to patch in once I have a local pull. There was a thread on this ML about how to grab stuff from git IIRC... I wonder if I can find it again. Otherwise, if you wouldn't mind explaining to a complete git noob how to get started, I'd appreciate that too. ;) -- Travis
On 8/23/07, Travis Willard <travis@archlinux.org> wrote:
On Thu, 23 Aug 2007 20:52:39 -0400 "Dan McGee" <dpmcgee@gmail.com> wrote:
On 8/23/07, Travis Willard <travis@archlinux.org> wrote:
we have
/var/lib/pacman/local/ /var/lib/pacman/remote/current /var/lib/pacman/remote/extra etc...
Wow, this makes a lot of sense. This shouldn't be too hard to implement and even make backward compatible for a bit. In essence all we have to do to make it backward compatible is delete the existing repo directories if it finds them, if we even want to do that. Hell, we can do that in an install script.
Who wants to whip together a patch for this, which I think we can safely include in 3.1?
I can probably do it, it'll just take some time, since I've never used git and I've never really delved into the pacman code. I know where the backend is, and I imagine it'd be easy enough for me to patch in once I have a local pull.
There was a thread on this ML about how to grab stuff from git IIRC... I wonder if I can find it again. Otherwise, if you wouldn't mind explaining to a complete git noob how to get started, I'd appreciate that too. ;)
Quick guide I wrote a long time back: http://code.toofishes.net/git-guide.txt And this is the official URL for pacman source grabs: http://projects.archlinux.org/git/pacman.git -Dan
participants (3)
-
Dan McGee
-
Travis Willard
-
Xavier