X7ROOT File Manager
Current Path:
/usr/lib/rpm
usr
/
lib
/
rpm
/
📁
..
📄
alt-nodejs10-fixdep
(3.48 KB)
📄
alt-nodejs10-provide.sh
(70 B)
📄
alt-nodejs10-require.sh
(69 B)
📄
alt-nodejs10-symlink-deps
(4.92 KB)
📄
alt-nodejs10.prov
(1.92 KB)
📄
alt-nodejs10.req
(6.75 KB)
📄
alt-nodejs10_native.req
(70 B)
📄
alt-nodejs11_native.req
(70 B)
📄
alt-nodejs12_native.req
(70 B)
📄
alt-nodejs14-fixdep
(3.48 KB)
📄
alt-nodejs14-provide.sh
(70 B)
📄
alt-nodejs14-require.sh
(69 B)
📄
alt-nodejs14-symlink-deps
(4.92 KB)
📄
alt-nodejs14.prov
(1.92 KB)
📄
alt-nodejs14.req
(6.75 KB)
📄
alt-nodejs14_native.req
(70 B)
📄
alt-nodejs16-fixdep
(3.49 KB)
📄
alt-nodejs16-provide.sh
(70 B)
📄
alt-nodejs16-require.sh
(69 B)
📄
alt-nodejs16-symlink-deps
(4.93 KB)
📄
alt-nodejs16.prov
(1.93 KB)
📄
alt-nodejs16.req
(6.76 KB)
📄
alt-nodejs16_native.req
(40 B)
📄
alt-nodejs18_native.req
(40 B)
📄
alt-nodejs19_native.req
(39 B)
📄
alt-nodejs20_native.req
(40 B)
📄
alt-nodejs22_native.req
(40 B)
📄
alt-nodejs6_native.req
(64 B)
📄
alt-nodejs8_native.req
(68 B)
📄
alt-nodejs9_native.req
(68 B)
📄
brp-compress
(1.47 KB)
📄
brp-java-gcjcompile
(1.38 KB)
📄
brp-python-bytecompile
(3.78 KB)
📄
brp-python-hardlink
(632 B)
📄
brp-scl-compress
(1.77 KB)
📄
brp-scl-python-bytecompile
(3.04 KB)
📄
brp-strip
(428 B)
📄
brp-strip-comment-note
(741 B)
📄
brp-strip-shared
(706 B)
📄
brp-strip-static-archive
(494 B)
📄
check-buildroot
(1.25 KB)
📄
check-files
(1.02 KB)
📄
check-prereqs
(418 B)
📄
check-rpaths
(1.01 KB)
📄
check-rpaths-worker
(4.94 KB)
📄
config.guess
(43.13 KB)
📄
config.sub
(35.55 KB)
📄
debugedit
(46.57 KB)
📄
debuginfo.prov
(375 B)
📄
desktop-file.prov
(602 B)
📄
elfdeps
(16.38 KB)
📁
fileattrs
📄
find-debuginfo.sh
(19.58 KB)
📄
find-lang.sh
(8.04 KB)
📄
find-provides
(91 B)
📄
find-requires
(91 B)
📄
fontconfig.prov
(489 B)
📄
gstreamer1.prov
(954 B)
📄
javadoc.req
(1.94 KB)
📄
kabi.sh
(468 B)
📄
kmod.prov
(682 B)
📄
libtooldeps.sh
(718 B)
📄
macros
(42.96 KB)
📁
macros.d
📄
macros.perl
(473 B)
📄
macros.php
(192 B)
📄
macros.python
(906 B)
📄
maven.prov
(3.03 KB)
📄
maven.req
(17.26 KB)
📄
metainfo.prov
(438 B)
📄
mkinstalldirs
(3.46 KB)
📄
mono-find-provides
(1.08 KB)
📄
mono-find-requires
(1.87 KB)
📄
nodejs_native.req
(70 B)
📄
ocaml-find-provides.sh
(1.62 KB)
📄
ocaml-find-requires.sh
(2.08 KB)
📄
osgi.prov
(2.94 KB)
📄
osgi.req
(3.46 KB)
📄
pkgconfigdeps.sh
(1.34 KB)
📁
platform
📄
python-macro-helper
(634 B)
📄
pythondeps.sh
(921 B)
📄
pythondistdeps.py
(10.92 KB)
📁
redhat
📄
rpm.daily
(296 B)
📄
rpm.log
(61 B)
📄
rpm.supp
(688 B)
📄
rpm2cpio.sh
(1.22 KB)
📄
rpmdb_dump
(16.51 KB)
📄
rpmdb_load
(28.61 KB)
📄
rpmdb_loadcvt
(1.43 KB)
📄
rpmdb_recover
(16.51 KB)
📄
rpmdb_stat
(16.48 KB)
📄
rpmdb_upgrade
(12.45 KB)
📄
rpmdb_verify
(16.46 KB)
📄
rpmdeps
(16.94 KB)
📄
rpmpopt-4.14.3
(11.2 KB)
📄
rpmrc
(16.75 KB)
📄
scldeps.sh
(254 B)
📄
script.req
(322 B)
📄
sepdebugcrcfix
(15.85 KB)
📄
tgpg
(929 B)
Editing: alt-nodejs10-fixdep
#!/usr/bin/python2 """Modify a dependency listed in a package.json file""" # Copyright 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. import json import optparse import os import re import shutil import sys RE_VERSION = re.compile(r'\s*v?([<>=~^]{0,2})\s*([0-9][0-9\.\-]*)\s*') p = optparse.OptionParser( description='Modifies dependency entries in package.json files') p.add_option('-r', '--remove', action='store_true') p.add_option('--dev', action='store_const', const='devDependencies', dest='deptype', help='affect devDependencies') p.add_option('--optional', action='store_const', const='optionalDependencies', dest='deptype', help='affect optionalDependencies') p.add_option('--caret', action='store_true', help='convert all or specified dependencies to use the caret operator') options, args = p.parse_args() if not os.path.exists('package.json~'): shutil.copy2('package.json', 'package.json~') md = json.load(open('package.json')) deptype = options.deptype if options.deptype is not None else 'dependencies' if deptype not in md: md[deptype] = {} # convert alternate JSON dependency representations to a dictionary if not options.caret and not isinstance(md[deptype], dict): if isinstance(md[deptype], list): deps = md[deptype] md[deptype] = {} for dep in deps: md[deptype][dep] = '*' elif isinstance(md[deptype], basestring): md[deptype] = { md[deptype] : '*' } if options.remove: dep = args[0] del md[deptype][dep] elif options.caret: if not isinstance(md[deptype], dict): sys.stderr.write('All dependencies are unversioned. Unable to apply ' + 'caret operator.\n') sys.exit(2) deps = args if len(args) > 0 else md[deptype].keys() for dep in deps: if md[deptype][dep][0] == '^': continue elif md[deptype][dep][0] in ('~','0','1','2','3','4','5','6','7','8','9'): ver = re.match(RE_VERSION, md[deptype][dep]).group(2) md[deptype][dep] = '^' + ver else: sys.stderr.write('Attempted to convert non-numeric or tilde ' + 'dependency to caret. This is not permitted.\n') sys.exit(1) else: dep = args[0] if len(args) > 1: ver = args[1] else: ver = '*' md[deptype][dep] = ver fh = open('package.json', 'w') data = json.JSONEncoder(indent=4).encode(md) fh.write(data) fh.close()
Upload File
Create Folder