ruaur 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ruaur/aur.rb +4 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b01098013dd9ed59fccce23da82483847e996f0bb1a7c97f628bbc9f9dcacaf8
4
- data.tar.gz: 31c06195d3623e8e9dbe1c0bb81474541f3a827c058cc26d2482883f58f61c78
3
+ metadata.gz: feb49a7f9a5bcca519511f9f1f2fabbc8d657e3b1b915356cb46e043eab64a35
4
+ data.tar.gz: 5ffea6768d4352f1cfaf6f1c175178689633d1de5b50b0e60fa79cd05700bdb3
5
5
  SHA512:
6
- metadata.gz: d67993b378e92f3ce5722202bd0f314922b89b71032700679f6053cc35acf8582ca9c3d018043323eded941deed8021bb0d5da25d3fe3ccc211a79aeef4ae614
7
- data.tar.gz: ac9a1bbe13af4575d50fcea0ae677fbf4ce98cacd767b61a5b308846cd7fc43985692019aa5c6764d1bf9d73b6942955f045a6bcb441af0a6cf35a44104153aa
6
+ metadata.gz: 1447d30080a31fe70cf00fb1d89e01d0b48c29130bb4fd315acb1c00b207227ff5edce1e3a1785368ef2a0d78262f672f2828fc56b92c21e2044d140a7c068b6
7
+ data.tar.gz: 3f79408826332cbdf4036b3978db1a69543bab984e3bff1f2def6a0b901b758dbbb07a05bf1991a92cbda2057780a43f854dffb313b3494e4d4be3f533784f1c
data/lib/ruaur/aur.rb CHANGED
@@ -133,7 +133,10 @@ class RuAUR::AUR
133
133
  def get_dependencies(package)
134
134
  deps = Array.new
135
135
  Dir.chdir("#{@cache}/#{package.name}") do
136
- %x(makepkg --printsrcinfo).each_line do |line|
136
+ system("chown -R nobody:nobody .") if (Process.uid == 0)
137
+ cmd = "su -s /bin/sh nobody -c \"makepkg --printsrcinfo\""
138
+ cmd = "makepkg -sr" if (Process.uid != 0)
139
+ %x(#{cmd}).each_line do |line|
137
140
  line.match(/depends\s*\=\s*([^>=:\n]+)/) do |m|
138
141
  deps.push(m[1])
139
142
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruaur
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Whittaker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-02 00:00:00.000000000 Z
11
+ date: 2018-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake