Debian Codegraph @

bin/mh_resolve_dependencies

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2
3 MH_VERSION=$(lsscip-shell system . . ls. /usr/share/maven-repo/org/debian/maven/maven-packager-utils/scip-shell filesystem . . `/usr/share/maven-repo/org/debian/maven/maven-packager-utils/`. | sedscip-shell system . . sed. 's|/||')
4 . /usr/share/maven-repo-helper/mh_lib.shscip-shell source . . `/usr/share/maven-repo-helper/mh_lib.sh`.
5
6 CLASSPATH="/usr/share/java/maven-repo-helper.jar:/usr/share/java/maven-packager-utils.jarscip-shell filesystem . . `/usr/share/java/maven-repo-helper.jar:/usr/share/java/maven-packager-utils.jar`."
7
8 syntaxscip-shell shell shell-project 0.0.0 syntax().()
9 {
10 echoscip-shell system . . echo. -e "Usage: mh_resolve_dependencies [option]... <package>"
11 echoscip-shell system . . echo. -e "Resolve the dependencies and generates the substvars"
12 echoscip-shell system . . echo. -e "file containing the list of dependent packages."
13 echoscip-shell system . . echo. -e ""
14 echoscip-shell system . . echo. -e "Where"
15 echoscip-shell system . . echo. -e "\t<package> is the name of the binary package,"
16 echoscip-shell system . . echo. -e "\t e.g. libcommons-lang-java. Default to the first binary"
17 echoscip-shell system . . echo. -e "\t found in the debian/control file"
18 echoscip-shell system . . echo. -e "Options:"
19 echoscip-shell system . . echo. -e "\t-h --help: show this text"
20 echoscip-shell system . . echo. -e "\t-V --version: show the version"
21 echoscip-shell system . . echo. -e "\t-p<package> --package=<package>: name of the package"
22 echoscip-shell system . . echo. -e "\t-j --javadoc: resolve the Javadoc dependencies"
23 echoscip-shell system . . echo. -e "\t-n --non-interactive: non interactive mode, don't ask questions"
24 echoscip-shell system . . echo. -e "\t-o --offline: don't ever connect to the internet, for Debian build"
25 echoscip-shell system . . echo. -e "\t compatibility."
26 echoscip-shell system . . echo. -e "\t-v --verbose: show more information while running"
27 echoscip-shell system . . echo. -e "\t-b --base-directory: path to root directory of package"
28 echoscip-shell system . . echo. -e "\t --non-explore: doesn't explore directories for pom.xml"
29 echoscip-shell system . . echo. -e "\t --build: build mode (don't write the .poms and rules files)"
30 echoscip-shell system . . echo. -e ""
31 echoscip-shell system . . echo. -e "Description:"
32 echoscip-shell system . . echo. -e "This tool reads the POM files defined in debian/$package.poms"
33 echoscip-shell system . . echo. -e "and scans the Maven repository in /usr/share/maven-repo."
34 echoscip-shell system . . echo. -e "It then extracts the dependencies required for the current"
35 echoscip-shell system . . echo. -e "package and store them in the file debian/$package.substvars"
36 echoscip-shell system . . echo. -e "where they can be read by debhelper."
37 echoscip-shell system . . echo. -e "The variables defined are:"
38 echoscip-shell system . . echo. -e " maven:Depends - the list of runtime dependencies"
39 echoscip-shell system . . echo. -e " maven:OptionalDepends - the list of optional runtime dependencies"
40 echoscip-shell system . . echo. -e " maven:CompileDepends - the list of compile-time dependencies"
41 echoscip-shell system . . echo. -e " maven:TestDepends - the list of test dependencies"
42 exit 1
43 }
44
45 ARGS="p package d javadoc v verbose n non-interactive o offline b base-directory non-explore build" parseargs "$@"
46
47 PACKAGE=$(getarg p package)
48 GEN_JAVADOC=$(getarg j javadoc)
49 NON_INTERACTIVE=$(getarg n non-interactive)
50 OFFLINE=$(getarg o offline)
51 VERBOSE=$(getarg v verbose)
52 BASE_DIR=$(getarg b base-directory)
53 NON_EXPLORE=$(getarg non-explore)
54 BUILD=$(getarg build)
55
56 if [scip-shell system . . `[`. -z "$PACKAGE" ]; then
57 if [scip-shell system . . `[`. "$ARGC" -gt "0" ]; then
58 PACKAGE="${ARGV[0]}"
59 else
60 PACKAGE=$(dh_listpackagesscip-shell system . . dh_listpackages. | headscip-shell system . . head. -1)
61 fi
62 fi
63
64 if [scip-shell system . . `[`. ! -e .debianVersion -a ! -e debian/stamp-poms-patched ]; then
65 touchscip-shell system . . touch. .debianVersion
66 CREATED_POMS=false
67 if [scip-shell system . . `[`. ! -e debian/${PACKAGE}.poms ]; then
68 CREATED_POMS=true
69 mh_lspoms $PACKAGE
70 fi
71 mh_patchpoms -p$PACKAGE --keep-pom-version
72 if [scip-shell system . . `[`. $CREATED_POMS ]; then
73 rmscip-shell system . . rm. debian/${PACKAGE}.poms
74 fi
75 fi
76
77 javascip-shell system . . java. $JAVA_OPTS -cp $CLASSPATH org.debian.maven.packager.DependenciesSolver ${NON_INTERACTIVE:+--non-interactive} ${NON_EXPLORE:+--non-explore} ${OFFLINE:+--offline} ${BUILD:+--build} ${GEN_JAVADOC:+--generate-javadoc} ${BASE_DIR:+--base-directory=$BASE_DIR} ${VERBOSE:+--verbose} --package=$PACKAGE --maven-repo=/usr/share/maven-repo
78
79 perlscip-shell system . . perl. -p -i -e 's/maven\./maven:/' debian/${PACKAGE}.substvars