[sysadmin/neon-tooling] lib/apt: KEYRINGS_DIR is a single constant
Carlos De Maine <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 7f8303b0258125607521a4fd5c8e3e630282f455 by Carlos De Maine.
Committed on 19/07/2026 at 02:38.
Pushed by carlosdem into branch 'master'.
KEYRINGS_DIR is a single constant
M +3 -3 lib/apt/key.rb
https://invent.kde.org/sysadmin/neon-tooling/-/commit/7f8303b0258125607521a4fd5c8e3e630282f455
diff --git a/lib/apt/key.rb b/lib/apt/key.rb
index 30f05d9d..08f3fb7d 100644
--- a/lib/apt/key.rb
+++ b/lib/apt/key.rb
@@ -25,7 +25,7 @@ require 'securerandom'
module Apt
# Apt key management replacing deprecated apt-key binary
class Key
- KEYRING_DIR = '/etc/apt/keyrings'
+ KEYRINGS_DIR = '/etc/apt/keyrings'
class << self
# apt-key has been deprecated so we now wrap gpg to handles basic key management
@@ -70,9 +70,9 @@ module Apt
def save_dearmored_key(raw_data, base_name)
clean_name = base_name.gsub(/[^a-zA-Z0-9.\-_]/, '_')
clean_name += '.gpg' unless clean_name.end_with?('.gpg')
- target_path = File.join(KEYRING_DIR, clean_name)
+ target_path = File.join(KEYRINGS_DIR, clean_name)
- FileUtils.mkdir_p(KEYRING_DIR)
+ FileUtils.mkdir_p(KEYRINGS_DIR)
IO.popen(['gpg', '--dearmor', '-o', target_path], 'w') do |io|
io.write(raw_data)