upm 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/TODO.md +44 -1
- data/VERSION +1 -1
- data/bin/upm +1 -1
- data/lib/upm/tool.rb +5 -5
- data/lib/upm/tools/apt.rb +6 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c755b3ead00bb1808a980d25cf2a7eeaf9e21b0061749aa06b6be6c40eecd4f
|
4
|
+
data.tar.gz: f7a18d62933dae46ad1e005bf01478c13c198e500332bfe39ffb077f1c7ec977
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dab6d3ee5f5a2969f566ceda7414b7e9821cd9084123894bb3331949fed19ada5f4e9d68802b4c057db11422c56cc62740007033a1a4b6870b08e911a8033002
|
7
|
+
data.tar.gz: b7150c73d16573cc37626dfa40a6639c824ab6af1f1392b580dc6db7885631902bb5c3ca096b09a27afdc3579e1ab153b30e5f57e1438ddaaf43017fa4a502a2
|
data/TODO.md
CHANGED
@@ -9,6 +9,23 @@ Currently missing:
|
|
9
9
|
* OpenBSD
|
10
10
|
* SuSE
|
11
11
|
|
12
|
+
## Abbrev cmds
|
13
|
+
|
14
|
+
* eg: upm install => upm i => u i
|
15
|
+
|
16
|
+
## Dependency-fetching features
|
17
|
+
|
18
|
+
* Use upm to fetch dependencies for any library or script, across any language.
|
19
|
+
* Some kind of manifest file (or personifest, to be politically correct)
|
20
|
+
* This is a little like bundler, npm, etc., but for any type of package.
|
21
|
+
|
22
|
+
## Ability to install any package from any OS to the user's home directory
|
23
|
+
|
24
|
+
Slurps up the packages and their dependencies, then unpacks them into ~/.upm/{bin,lib} or something.
|
25
|
+
(Like nix?)
|
26
|
+
|
27
|
+
Related tool: intoli/exodus
|
28
|
+
|
12
29
|
## fzf
|
13
30
|
|
14
31
|
Use fzf for "list" output (or other commands that require selecting, like "remove")
|
@@ -21,6 +38,12 @@ Use fzf for "list" output (or other commands that require selecting, like "remov
|
|
21
38
|
|
22
39
|
* Make the `run` command able to grep the output while streaming the results to the screen.
|
23
40
|
* Make run pretend to be a tty, so I don't need `--color=always`.
|
41
|
+
* Use spawn, like so:
|
42
|
+
```
|
43
|
+
r,w = IO.pipe
|
44
|
+
spawn(*%w[echo hello world], out: w)
|
45
|
+
spawn(*%w[tr a-z A-Z], in: r)
|
46
|
+
```
|
24
47
|
|
25
48
|
## Figure out how to integrate language package managers
|
26
49
|
|
@@ -29,10 +52,30 @@ Use fzf for "list" output (or other commands that require selecting, like "remov
|
|
29
52
|
* Possibilites:
|
30
53
|
* upm install --ruby <pkg>
|
31
54
|
* upm install ruby:<pkg>,<pkg>
|
55
|
+
* upm --ruby search <query>
|
56
|
+
* upm ruby:search <query>
|
57
|
+
* upm search os:<query>
|
58
|
+
* Separate tool: `lpm search <query>` searches only language packages
|
32
59
|
* Add detectors for language-specific package-managers
|
33
60
|
* Help screen needs to display language-specific package managers
|
34
61
|
* `upm help --ruby` should show available ruby commands
|
35
62
|
|
63
|
+
## Give identical output on every platform
|
64
|
+
|
65
|
+
* Requires parsing the output of every command into a canonical format, or reading the package databases directly.
|
66
|
+
|
67
|
+
## apt: Integrate 'acs' wrapper script
|
68
|
+
|
69
|
+
## Evaluate UPM::Tool.new block in an instance of an anonymous subclass of UPM::Tool
|
70
|
+
|
71
|
+
This will allow tools to create classes and modules inside the UPM::Tool block without namespace collisions
|
72
|
+
|
73
|
+
## Themes?
|
74
|
+
|
75
|
+
Why not!
|
76
|
+
|
36
77
|
## Mirror Selector
|
37
78
|
|
38
|
-
|
79
|
+
Do a ping test on available mirrors, and use fzf to select.
|
80
|
+
|
81
|
+
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/bin/upm
CHANGED
data/lib/upm/tool.rb
CHANGED
@@ -17,7 +17,7 @@ module UPM
|
|
17
17
|
"search" => "using the fastest known API or service",
|
18
18
|
"list" => "list installed packages (or search their names if extra arguments are supplied)",
|
19
19
|
"info" => "show metadata about a package",
|
20
|
-
"sync
|
20
|
+
"update/sync" => "retrieve the latest package list or manifest",
|
21
21
|
"upgrade" => "install new versions of all packages",
|
22
22
|
"pin" => "pinning a package means it won't be automatically upgraded",
|
23
23
|
"rollback" => "revert to an earlier version of a package (including its dependencies)",
|
@@ -76,7 +76,7 @@ module UPM
|
|
76
76
|
@@tools[name] = self
|
77
77
|
end
|
78
78
|
|
79
|
-
def call_command(name, args)
|
79
|
+
def call_command(name, *args)
|
80
80
|
if block = (@cmds[name] || @cmds[ALIASES[name]])
|
81
81
|
block.call args
|
82
82
|
else
|
@@ -133,8 +133,6 @@ module UPM
|
|
133
133
|
raise "Error: command argument must be a String or an Array; it was a #{cmd.class}"
|
134
134
|
end
|
135
135
|
|
136
|
-
shell_command.unshift "sudo" if root
|
137
|
-
|
138
136
|
@cmds[name] = proc { |args| run(*shell_command, *args, paged: paged) }
|
139
137
|
end
|
140
138
|
end
|
@@ -145,7 +143,9 @@ module UPM
|
|
145
143
|
|
146
144
|
## Helpers
|
147
145
|
|
148
|
-
def run(*args, paged: false, grep: nil)
|
146
|
+
def run(*args, root: false, paged: false, grep: nil)
|
147
|
+
args.unshift "sudo" if root
|
148
|
+
|
149
149
|
if !paged and !grep
|
150
150
|
system(*args)
|
151
151
|
else
|
data/lib/upm/tools/apt.rb
CHANGED
@@ -4,7 +4,12 @@ UPM::Tool.new "apt" do
|
|
4
4
|
|
5
5
|
command "install", "apt install", root: true
|
6
6
|
command "update", "apt update", root: true
|
7
|
-
|
7
|
+
|
8
|
+
command "upgrade" do |args|
|
9
|
+
call_command("update")
|
10
|
+
run("apt", "upgrade", root: true)
|
11
|
+
end
|
12
|
+
|
8
13
|
command "remove", "apt remove", root: true
|
9
14
|
|
10
15
|
command "files", "dpkg-query -L", paged: true
|