You are not logged in.

#1 2018-09-07 23:54:18

rasputin
Member
Registered: 2018-07-23
Posts: 14
Website

[SOLVED] How to properly remove a custom pacman database.

I'm using aurutils because I liked the idea of making my own custom database for AUR packages I trust.  I followed all the steps in the manpage for aurutils, and I set up a custom database named "aur".

Everything up to this point was working.  I then decided to blow away the database and start fresh because I wanted to.  So I deleted everything I thought was connected to the custom repo, which was everything inside "/var/cache/pacman/aur".  I then decided to make my new database have the same name as the old one.  Followed the same steps, and here is the output of "pacman -Sy":

error: could not register 'aur' database (database already registered)
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
error: failed to update aur (no servers configured for repository)
error: failed to synchronize all databases

I checked here for some answers, but I don't think I'm having the same issue as the other guy had.  I'll put the pacman configuration files down below.

Is there a more proper way to remove a database from pacman?  It has to be looking somewhere for the database files, but where?

/etc/pacman.conf:

#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives

[options]
HoldPkg     = pacman glibc
CleanMethod = KeepCurrent
Architecture = auto

Color
TotalDownload
CheckSpace
VerbosePkgLists

# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel    = Required DatabaseOptional
LocalFileSigLevel = Optional

# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Arch Linux
# packagers with `pacman-key --populate archlinux`.

#
# REPOSITORIES
#   - can be defined here or included from another file
#   - pacman will search repositories in the order defined here
#   - local/custom mirrors can be added here or in separate files
#   - repositories listed first will take precedence when packages
#     have identical names, regardless of version number
#   - URLs will have $repo replaced by the name of the current repo
#   - URLs will have $arch replaced by the name of the architecture
#
# Repository entries are of the format:
#       [repo-name]
#       Server = ServerName
#       Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#

[core]
Include = /etc/pacman.d/mirrorlist

[extra]
Include = /etc/pacman.d/mirrorlist

[community]
Include = /etc/pacman.d/mirrorlist

[aur]
Include = /etc/pacman.d/aur

# An example of a custom package repository.  See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs

/etc/pacman.d/aur: (to the best of my knowledge, this should be the same config I had before & after the wipe)

[options]
CacheDir = /var/cache/pacman/pkg
CacheDir = /var/cache/pacman/aur
CleanMethod = KeepCurrent

[aur]
SigLevel = Optional TrustAll
Server = file:///var/cache/pacman/aur

Last edited by rasputin (2018-09-08 01:34:22)


Russia's greatest love macine
===============================
PGP Fingerprint: 55A0 40FD A46B DADB
gitlab

Offline

#2 2018-09-08 00:49:32

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: [SOLVED] How to properly remove a custom pacman database.

ls /var/lib/pacman/sync/

"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2018-09-08 01:09:31

rasputin
Member
Registered: 2018-07-23
Posts: 14
Website

Re: [SOLVED] How to properly remove a custom pacman database.

I just checked there, and the only files there pertain to the core, extra, and community repos.

$  ls /var/lib/pacman/sync
community.db community.files core.db core.files extra.db extra.files

Last edited by rasputin (2018-09-08 01:09:59)


Russia's greatest love macine
===============================
PGP Fingerprint: 55A0 40FD A46B DADB
gitlab

Offline

#4 2018-09-08 01:22:54

Morganamilo
Package Maintainer (PM)
Registered: 2017-12-05
Posts: 77

Re: [SOLVED] How to properly remove a custom pacman database.

You have [aur] in your pacman.conf and again in /etc/pacman.d/aur. Think of include as a copy and paste, you effectively have.

[aur]
[options]
CacheDir = /var/cache/pacman/pkg
CacheDir = /var/cache/pacman/aur
CleanMethod = KeepCurrent

[aur]
SigLevel = Optional TrustAll
Server = file:///var/cache/pacman/aur

Offline

#5 2018-09-08 01:27:40

rasputin
Member
Registered: 2018-07-23
Posts: 14
Website

Re: [SOLVED] How to properly remove a custom pacman database.

Morganamilo wrote:

You have [aur] in your pacman.conf and again in /etc/pacman.d/aur. Think of include as a copy and paste, you effectively have.

You sir, are a saint!  Thank you so much for the answer.

EDIT: okay now it works, but I'm getting some other warnings.  Should I be worried about this?

warning: config file /etc/pacman.d/aur, line 1: directive 'CacheDir' in section 'aur' not recognized.
warning: config file /etc/pacman.d/aur, line 2: directive 'CacheDir' in section 'aur' not recognized.
warning: config file /etc/pacman.d/aur, line 3: directive 'CleanMethod' in section 'aur' not recognized.
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 aur is up to date

EDIT #2: okay after looking at it some more, and some file changes, it doesn't appear to be affecting my system at all.  I'll just start another thread if this needs fixing.

Last edited by rasputin (2018-09-08 01:34:07)


Russia's greatest love macine
===============================
PGP Fingerprint: 55A0 40FD A46B DADB
gitlab

Offline

#6 2018-09-08 01:39:13

Morganamilo
Package Maintainer (PM)
Registered: 2017-12-05
Posts: 77

Re: [SOLVED] How to properly remove a custom pacman database.

Just to be sure. To fix it you did remove the [aur] from pacman.conf and not the include right? I could see those errors happening if you removed it from the include. Not worth a whole new thread if it's just that.

Offline

#7 2018-09-08 02:17:38

rasputin
Member
Registered: 2018-07-23
Posts: 14
Website

Re: [SOLVED] How to properly remove a custom pacman database.

I took it one step further and deleted /etc/pacman.d/aur entirely.  Now my pacman.conf file looks like this:

[core]
Include = /etc/pacman.d/mirrorlist

[extra]
Include = /etc/pacman.d/mirrorlist

[community]
Include = /etc/pacman.d/mirrorlist

[aur]
Server = file:///var/cache/pacman/aur

The warnings aren't showing up now.


Russia's greatest love macine
===============================
PGP Fingerprint: 55A0 40FD A46B DADB
gitlab

Offline

#8 2018-09-09 08:31:12

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED] How to properly remove a custom pacman database.

The Include directive is as Morganamilo said, just like a C preprocessor #include directive. It does *not* reset the local scope to [options], so when you list option values inside the [aur] section, errors occur...

Also see the pacman-conf utility, which renders the configuration file including directives, into one file -- thus letting you see what pacman sees.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB