File: bump-dependency-version

package info (click to toggle)
libconfig-model-dpkg-perl 3.017
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,048 kB
  • sloc: perl: 8,530; python: 242; makefile: 77; javascript: 16; sh: 1
file content (25 lines) | stat: -rw-r--r-- 817 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
doc: update required version of a dependency and commit the change
doc: parameters: pkg, version
doc: pkg can be a Perl regular expression to change related dependencies in one call
doc: example:
doc:   cme run bump-dependency-version -arg pkg=libconfig-model-perl -arg version=2.101
doc:   cme run bump-dependency-version -arg 'pkg=libuv1.*' -arg version=1.18.0
app: dpkg-control

---var
$var{change_it} = qq{
  s/^
    ($args{pkg})       # $1 package
    \\s*(\\([^)]+\\))? # $2 dep version (may be)
    \\s*(.*)           # $3 whatever's left
  /
    (\$3 ? qq!\$1 (>= $args{version}) \$3! : qq!\$1 (>= $args{version})!)
  /xe
}
---

load: ! source Build-Depends:=~"$change_it"
load: ! source Build-Depends-Indep:=~"$change_it"
load: ! binary:~ Depends:=~"$change_it"

commit: control: depends on $pkg >= $version